Commits
Click on a commit to change the comparison rangefix(rocksdb): add assume_history_complete flag to fix test semantics
When testing RocksDB with identical data to MDBX, both backends should
return the same results. The MaybeInPlainState fallback (for hybrid
storage safety) was causing test failures because MDBX returns
NotYetWritten when querying before first history entry.
Added assume_history_complete flag to RocksTx that:
- When false (default): returns MaybeInPlainState for hybrid storage
- When true: returns NotYetWritten to match MDBX semantics for tests
This preserves the correct hybrid storage behavior in production while
allowing tests with identical data to verify semantic equivalence. fix: clippy warnings and add missing import for rocksdb provider fix: add backticks to remaining RocksDB in doc comments fix: add backticks to static_file in doc comment and improve observability
- Fix clippy doc_markdown warning: add backticks around 'static_file'
- Fix TODO link: use issue #18983 instead of PR #20340
- Add observability logs for empty RocksDB history tables with non-zero checkpoint
- Add debug_assert + warning when duplicate history indices are detected
Amp-Thread-ID: https://ampcode.com/threads/T-019be55f-a227-7054-ac77-61654cb7c823 fix(rocksdb): enforce history indices require changesets in static files
Per Joshie's feedback, the proper fix for RocksDB history divergence is not
changing commit order, but enforcing the architectural invariant:
RocksDB history indices (AccountsHistory, StoragesHistory) are derived data
that index into changesets. They can only be safely stored in RocksDB when
changesets are in static files (crash-stable), not MDBX (can be unwound).
Changes:
- Revert commit order back to: static_file → RocksDB → MDBX
- Add StorageSettings::validate() to enforce the constraint
- Add validation at genesis init with clear error message
- Update invariants.rs documentation
- Add tests for validation logic
The constraint: account_history_in_rocksdb OR storages_history_in_rocksdb
requires account_changesets_in_static_files=true fix(rocksdb): validate storage settings on database load
Add validation at ProviderFactory creation to catch invalid configurations
when loading an existing database, not just at genesis init.
This ensures nodes with pre-existing invalid configurations (RocksDB history
without changesets in static files) fail with a clear error message rather
than experiencing subtle divergence bugs.
Added InvalidStorageSettings error variant to ProviderError.