feat(storage): wire RocksDB into DB Provider And Historical Provider [3/3] #20544
+1,223
−153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Complete RocksDB integration for history tables by wiring everything together. Closes #20388
This is PR 3/3 of a stacked PR series that splits #20412 for easier review.
Depends on: #20543 → #20542
Review focus
This is where behavior changes. Key areas:
Changes
EitherWriter / EitherReader
account_history_info()andstorage_history_info()methods toEitherReaderread_account_history_shards()andread_storage_history_shards()methods&mut RocksDBBatch) for shared batch commitsHistoricalStateProviderRef
account_history_lookup()to useEitherReaderwith RocksDB supportstorage_history_lookup()to useEitherReaderwith RocksDB supportRocksDBProviderFactory + StorageSettingsCache + NodePrimitivesProvidertrait boundsDatabaseProvider
pending_rocks_batchfield for shared RocksDB batchpending_history_index_last_shardscache for read-modify-write operationsappend_account_history_index_rocksdb()andappend_storage_history_index_rocksdb()unwind_account_history_indices_rocksdb()andunwind_storage_history_indices_rocksdb()HistoryWriterimpl to route to RocksDB when configuredcommit()tx_lookup.rs
EitherWriterfor transaction hash numbersStack