Skip to content

Conversation

@yongkangc
Copy link
Member

@yongkangc yongkangc commented Jan 2, 2026

Add validation to error when CLI storage flags differ from persisted settings, instead of silently ignoring user input.

Closes #20482

Users changing storage flags (e.g., --static-files.receipts) after genesis get no feedback - the node silently uses stored settings.

Solution

Compare CLI settings against stored settings at startup. On mismatch, return actionable error:

Storage settings mismatch!

Stored in DB: { receipts_in_static_files: false, ... }
From CLI:     { receipts_in_static_files: true, ... }

Storage flags cannot be changed after genesis.
Either remove the conflicting CLI flags, or delete the database and re-sync.
  • Validation in CLI layer, not storage layer (keeps ProviderFactory simple)
  • Only compares CLI-configurable fields via static_file_settings_eq() - RocksDB flags are ignored since they're not exposed in CLI

Add validation to detect when CLI storage flags differ from persisted
settings, preventing silent configuration mismatches that could confuse
users.

Closes #20482
@github-project-automation github-project-automation bot moved this to Backlog in Reth Tracker Jan 2, 2026
@github-actions github-actions bot added A-db Related to the database C-enhancement New feature or request labels Jan 2, 2026
@yongkangc
Copy link
Member Author

blocked by #20393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-db Related to the database C-enhancement New feature or request

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Add configuration validation for RocksDB flags at startup

2 participants