mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
feat: add StaticFileSegment::StorageChangeSets (#20896)
This commit is contained in:
@@ -31,6 +31,9 @@ pub struct StorageSettings {
|
||||
/// Whether this node should read and write account changesets from static files.
|
||||
#[serde(default)]
|
||||
pub account_changesets_in_static_files: bool,
|
||||
/// Whether this node should read and write storage changesets from static files.
|
||||
#[serde(default)]
|
||||
pub storage_changesets_in_static_files: bool,
|
||||
}
|
||||
|
||||
impl StorageSettings {
|
||||
@@ -59,6 +62,7 @@ impl StorageSettings {
|
||||
receipts_in_static_files: true,
|
||||
transaction_senders_in_static_files: true,
|
||||
account_changesets_in_static_files: true,
|
||||
storage_changesets_in_static_files: true,
|
||||
storages_history_in_rocksdb: false,
|
||||
transaction_hash_numbers_in_rocksdb: true,
|
||||
account_history_in_rocksdb: false,
|
||||
@@ -78,6 +82,7 @@ impl StorageSettings {
|
||||
transaction_hash_numbers_in_rocksdb: false,
|
||||
account_history_in_rocksdb: false,
|
||||
account_changesets_in_static_files: false,
|
||||
storage_changesets_in_static_files: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +122,12 @@ impl StorageSettings {
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the `storage_changesets_in_static_files` flag to the provided value.
|
||||
pub const fn with_storage_changesets_in_static_files(mut self, value: bool) -> Self {
|
||||
self.storage_changesets_in_static_files = value;
|
||||
self
|
||||
}
|
||||
|
||||
/// Returns `true` if any tables are configured to be stored in `RocksDB`.
|
||||
pub const fn any_in_rocksdb(&self) -> bool {
|
||||
self.transaction_hash_numbers_in_rocksdb ||
|
||||
|
||||
@@ -29,8 +29,8 @@ pub use blocks::*;
|
||||
pub use integer_list::IntegerList;
|
||||
pub use metadata::*;
|
||||
pub use reth_db_models::{
|
||||
AccountBeforeTx, ClientVersion, StaticFileBlockWithdrawals, StoredBlockBodyIndices,
|
||||
StoredBlockWithdrawals,
|
||||
AccountBeforeTx, ClientVersion, StaticFileBlockWithdrawals, StorageBeforeTx,
|
||||
StoredBlockBodyIndices, StoredBlockWithdrawals,
|
||||
};
|
||||
pub use sharded_key::ShardedKey;
|
||||
|
||||
@@ -230,6 +230,7 @@ impl_compression_for_compact!(
|
||||
StaticFileBlockWithdrawals,
|
||||
Bytecode,
|
||||
AccountBeforeTx,
|
||||
StorageBeforeTx,
|
||||
TransactionSigned,
|
||||
CompactU256,
|
||||
StageCheckpoint,
|
||||
|
||||
Reference in New Issue
Block a user