Commits
Click on a commit to change the comparison rangerevert: remove changes to database/provider.rs fix: improve RocksDB shard handling and cache provider in historical lookups
- Fix misleading comments in invariants.rs about sentinel shards
- Add doc comments and debug assertions for sorted indices requirement
- Add comprehensive shard split tests at NUM_OF_INDICES_IN_SHARD boundary
- Cache RocksDBProvider in HistoricalStateProviderRef using OnceCell refactor: extract fallback helper in RocksTx::history_info and improve comments refactor: remove RocksDBProvider caching from HistoricalStateProviderRef
The caching added unnecessary complexity for negligible benefit:
- RocksDBProvider is Arc-based (cheap to clone)
- The real cost is transaction creation, which wasn't cached
- std::cell::OnceCell is not Sync, constraining auto-traits
Now uses trait's default with_rocksdb_tx implementation directly. fix: add debug_assert for one-append-per-key invariant in RocksDBBatch
- Add tracking HashSets for touched account/storage history keys (debug only)
- Add early return for empty indices in append_*_history_shard methods
- Add debug_assert to catch duplicate appends for same key in one batch
- Document the one-append-per-key invariant in struct doc comment
The batch reads existing shards from committed DB state, not from pending
writes. Calling append twice for the same key would cause the second call
to overwrite the first, silently losing data. fix: add backticks for clippy doc_markdown lint chore: remove unused debug_assertions fields from RocksDBBatch Update crates/storage/provider/src/providers/rocksdb/provider.rs
Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com> feat(cli): add rocksdb feature flag to reth binary
- Add rocksdb feature to bin/reth propagating to reth-node-ethereum and reth-provider
- Add rocksdb feature to reth-node-ethereum forwarding to reth-node-builder
- Add rocksdb feature to reth-node-builder forwarding to reth-provider and reth-stages
- Fix missing debug_assertions-gated fields in RocksDBBatch::batch() constructor fix: address joshieDo's review comments
- Use edge feature instead of separate rocksdb feature for enabling RocksDB
- Remove 'expected on first run' warning logs from invariants.rs
- Keep Debug impl in historical.rs (required by lint) fix: remove unnecessary edge feature additions
RocksDB already propagates through existing edge feature chain:
reth-ethereum-cli/edge → reth-cli-commands/edge → reth-db-common/edge → reth-provider/rocksdb refactor: remove debug_assertions tracking from RocksDBBatch Apply suggestion from @yongkangc Apply suggestion from @yongkangc fix: restore manual Debug impl for HistoricalStateProviderRef, format code refactor: use derive(Debug) for HistoricalStateProviderRef