chore: introduce v2 storage flag and remove edge flag (#21868)

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: yongkangc <chiayongkang@hotmail.com>
This commit is contained in:
Dan Cline
2026-02-06 16:23:04 +00:00
committed by GitHub
parent 1383c151c9
commit 08c61535db
54 changed files with 857 additions and 399 deletions

View File

@@ -0,0 +1,17 @@
---
reth: minor
reth-cli-commands: minor
reth-e2e-test-utils: minor
reth-ethereum-cli: minor
reth-node-core: minor
reth-optimism-bin: minor
reth-optimism-cli: minor
reth-prune: patch
reth-stages: patch
reth-storage-api: minor
reth-storage-db-api: minor
reth-storage-db-common: patch
reth-storage-provider: patch
---
Introduced `--storage.v2` flag to control storage mode defaults, replacing the `edge` feature flag with `rocksdb` feature. The new flag enables v2 storage settings (static files + RocksDB routing) while individual `--static-files.*` and `--rocksdb.*` flags can still override defaults. Updated feature gates from `edge` to `rocksdb` across all affected crates.

View File

@@ -81,7 +81,16 @@ backon.workspace = true
tempfile.workspace = true
[features]
default = ["jemalloc", "otlp", "otlp-logs", "reth-revm/portable", "js-tracer", "keccak-cache-global", "asm-keccak"]
default = [
"jemalloc",
"otlp",
"otlp-logs",
"reth-revm/portable",
"js-tracer",
"keccak-cache-global",
"asm-keccak",
"rocksdb",
]
otlp = [
"reth-ethereum-cli/otlp",
@@ -180,7 +189,8 @@ min-trace-logs = [
"reth-node-core/min-trace-logs",
]
edge = ["reth-ethereum-cli/edge", "reth-node-core/edge"]
rocksdb = ["reth-ethereum-cli/rocksdb", "reth-node-core/rocksdb"]
edge = ["rocksdb"]
[[bin]]
name = "reth"

View File

@@ -133,4 +133,5 @@ arbitrary = [
"reth-ethereum-primitives/arbitrary",
]
edge = ["reth-db-common/edge", "reth-stages/rocksdb", "reth-provider/rocksdb", "reth-prune/rocksdb"]
rocksdb = ["reth-db-common/rocksdb", "reth-stages/rocksdb", "reth-provider/rocksdb", "reth-prune/rocksdb"]
edge = ["rocksdb"]

View File

@@ -19,7 +19,7 @@ use reth_node_builder::{
Node, NodeComponents, NodeComponentsBuilder, NodeTypes, NodeTypesWithDBAdapter,
};
use reth_node_core::{
args::{DatabaseArgs, DatadirArgs, RocksDbArgs, StaticFilesArgs},
args::{DatabaseArgs, DatadirArgs, RocksDbArgs, StaticFilesArgs, StorageArgs},
dirs::{ChainPath, DataDirPath},
};
use reth_provider::{
@@ -70,18 +70,59 @@ pub struct EnvironmentArgs<C: ChainSpecParser> {
/// All `RocksDB` related arguments
#[command(flatten)]
pub rocksdb: RocksDbArgs,
/// Storage mode configuration (v2 vs v1/legacy)
#[command(flatten)]
pub storage: StorageArgs,
}
impl<C: ChainSpecParser> EnvironmentArgs<C> {
/// Returns the effective storage settings derived from static-file and `RocksDB` CLI args.
/// Returns the effective storage settings derived from `--storage.v2`, static-file, and
/// `RocksDB` CLI args.
///
/// The base storage mode is determined by `--storage.v2`:
/// - When `--storage.v2` is set: uses [`StorageSettings::v2()`] defaults
/// - Otherwise: uses [`StorageSettings::v1()`] defaults
///
/// Individual `--static-files.*` and `--rocksdb.*` flags override the base when explicitly set.
pub fn storage_settings(&self) -> StorageSettings {
StorageSettings::base()
.with_receipts_in_static_files(self.static_files.receipts)
.with_transaction_senders_in_static_files(self.static_files.transaction_senders)
.with_account_changesets_in_static_files(self.static_files.account_changesets)
.with_transaction_hash_numbers_in_rocksdb(self.rocksdb.all || self.rocksdb.tx_hash)
.with_storages_history_in_rocksdb(self.rocksdb.all || self.rocksdb.storages_history)
.with_account_history_in_rocksdb(self.rocksdb.all || self.rocksdb.account_history)
let mut s = if self.storage.v2 { StorageSettings::v2() } else { StorageSettings::base() };
// Apply static files overrides (only when explicitly set)
if let Some(v) = self.static_files.receipts {
s = s.with_receipts_in_static_files(v);
}
if let Some(v) = self.static_files.transaction_senders {
s = s.with_transaction_senders_in_static_files(v);
}
if let Some(v) = self.static_files.account_changesets {
s = s.with_account_changesets_in_static_files(v);
}
if let Some(v) = self.static_files.storage_changesets {
s = s.with_storage_changesets_in_static_files(v);
}
// Apply rocksdb overrides
// --rocksdb.all sets all rocksdb flags to true
if self.rocksdb.all {
s = s
.with_transaction_hash_numbers_in_rocksdb(true)
.with_storages_history_in_rocksdb(true)
.with_account_history_in_rocksdb(true);
}
// Individual rocksdb flags override --rocksdb.all when explicitly set
if let Some(v) = self.rocksdb.tx_hash {
s = s.with_transaction_hash_numbers_in_rocksdb(v);
}
if let Some(v) = self.rocksdb.storages_history {
s = s.with_storages_history_in_rocksdb(v);
}
if let Some(v) = self.rocksdb.account_history {
s = s.with_account_history_in_rocksdb(v);
}
s
}
/// Initializes environment according to [`AccessRights`] and returns an instance of

View File

@@ -21,7 +21,7 @@ use std::{
};
use tracing::{info, warn};
#[cfg(all(unix, feature = "edge"))]
#[cfg(all(unix, feature = "rocksdb"))]
mod rocksdb;
/// Interval for logging progress during checksum computation.
@@ -73,7 +73,7 @@ enum Subcommand {
limit: Option<usize>,
},
/// Calculates the checksum of a RocksDB table
#[cfg(all(unix, feature = "edge"))]
#[cfg(all(unix, feature = "rocksdb"))]
Rocksdb {
/// The RocksDB table
#[arg(value_enum)]
@@ -100,7 +100,7 @@ impl Command {
Subcommand::StaticFile { segment, start_block, end_block, limit } => {
checksum_static_file(tool, segment, start_block, end_block, limit)?;
}
#[cfg(all(unix, feature = "edge"))]
#[cfg(all(unix, feature = "rocksdb"))]
Subcommand::Rocksdb { table, limit } => {
rocksdb::checksum_rocksdb(tool, table, limit)?;
}

View File

@@ -121,7 +121,7 @@ impl Command {
account_history_in_rocksdb: _,
account_changesets_in_static_files: _,
storage_changesets_in_static_files: _,
} = settings.unwrap_or_else(StorageSettings::legacy);
} = settings.unwrap_or_else(StorageSettings::v1);
// Update the setting based on the key
match cmd {

View File

@@ -11,7 +11,7 @@ use reth_node_core::{
args::{
DatabaseArgs, DatadirArgs, DebugArgs, DevArgs, EngineArgs, EraArgs, MetricArgs,
NetworkArgs, PayloadBuilderArgs, PruningArgs, RocksDbArgs, RpcServerArgs, StaticFilesArgs,
TxPoolArgs,
StorageArgs, TxPoolArgs,
},
node_config::NodeConfig,
version,
@@ -119,6 +119,10 @@ pub struct NodeCommand<C: ChainSpecParser, Ext: clap::Args + fmt::Debug = NoArgs
#[command(flatten, next_help_heading = "Static Files")]
pub static_files: StaticFilesArgs,
/// Storage mode configuration (v2 vs v1/legacy)
#[command(flatten)]
pub storage: StorageArgs,
/// Additional cli arguments
#[command(flatten, next_help_heading = "Extension")]
pub ext: Ext,
@@ -175,6 +179,7 @@ where
engine,
era,
static_files,
storage,
ext,
} = self;
@@ -200,6 +205,7 @@ where
engine,
era,
static_files,
storage,
};
let data_dir = node_config.datadir();

View File

@@ -12,7 +12,7 @@ use reth_node_metrics::{
server::{MetricServer, MetricServerConfig},
version::VersionInfo,
};
#[cfg(all(unix, feature = "edge"))]
#[cfg(all(unix, feature = "rocksdb"))]
use reth_provider::RocksDBProviderFactory;
use reth_prune::PrunerBuilder;
use reth_static_file::StaticFileProducer;
@@ -122,7 +122,7 @@ impl<C: ChainSpecParser<ChainSpec: EthChainSpec + EthereumHardforks>> PruneComma
}
// Flush and compact RocksDB to reclaim disk space after pruning
#[cfg(all(unix, feature = "edge"))]
#[cfg(all(unix, feature = "rocksdb"))]
{
info!(target: "reth::cli", "Flushing and compacting RocksDB...");
provider_factory.rocksdb_provider().flush_and_compact()?;

View File

@@ -76,7 +76,8 @@ path = "tests/e2e-testsuite/main.rs"
[[test]]
name = "rocksdb"
path = "tests/rocksdb/main.rs"
required-features = ["edge"]
required-features = ["rocksdb"]
[features]
edge = ["reth-node-core/edge", "reth-provider/rocksdb", "reth-cli-commands/edge"]
rocksdb = ["reth-node-core/rocksdb", "reth-provider/rocksdb", "reth-cli-commands/rocksdb"]
edge = ["rocksdb"]

View File

@@ -96,6 +96,15 @@ where
self
}
/// Enables v2 storage defaults (`--storage.v2`), routing tx hashes, history
/// indices, etc. to `RocksDB` and changesets/senders to static files.
pub fn with_storage_v2(self) -> Self {
self.with_node_config_modifier(|mut config| {
config.storage.v2 = true;
config
})
}
/// Builds and launches the test nodes.
pub async fn build(
self,

View File

@@ -1,6 +1,6 @@
//! E2E tests for `RocksDB` provider functionality.
#![cfg(all(feature = "edge", unix))]
#![cfg(all(feature = "rocksdb", unix))]
use alloy_consensus::BlockHeader;
use alloy_primitives::B256;
@@ -13,7 +13,7 @@ use reth_e2e_test_utils::{transaction::TransactionTestContext, wallet, E2ETestSe
use reth_node_core::args::RocksDbArgs;
use reth_node_ethereum::EthereumNode;
use reth_payload_builder::EthPayloadBuilderAttributes;
use reth_provider::{RocksDBProviderFactory, StorageSettings};
use reth_provider::RocksDBProviderFactory;
use std::{sync::Arc, time::Duration};
const ROCKSDB_POLL_TIMEOUT: Duration = Duration::from_secs(60);
@@ -96,23 +96,19 @@ fn test_attributes_generator(timestamp: u64) -> EthPayloadBuilderAttributes {
EthPayloadBuilderAttributes::new(B256::ZERO, attributes)
}
/// Verifies that `RocksDB` CLI defaults match `StorageSettings::base()`.
/// Verifies that `RocksDB` CLI defaults are `None` (deferred to storage mode).
#[test]
fn test_rocksdb_defaults_match_storage_settings() {
fn test_rocksdb_defaults_are_none() {
let args = RocksDbArgs::default();
let settings = StorageSettings::base();
assert_eq!(
args.tx_hash, settings.transaction_hash_numbers_in_rocksdb,
"tx_hash default should match StorageSettings::base()"
assert!(args.tx_hash.is_none(), "tx_hash default should be None (deferred to --storage.v2)");
assert!(
args.storages_history.is_none(),
"storages_history default should be None (deferred to --storage.v2)"
);
assert_eq!(
args.storages_history, settings.storages_history_in_rocksdb,
"storages_history default should match StorageSettings::base()"
);
assert_eq!(
args.account_history, settings.account_history_in_rocksdb,
"account_history default should match StorageSettings::base()"
assert!(
args.account_history.is_none(),
"account_history default should be None (deferred to --storage.v2)"
);
}
@@ -125,6 +121,7 @@ async fn test_rocksdb_node_startup() -> Result<()> {
let (nodes, _tasks, _wallet) =
E2ETestSetupBuilder::<EthereumNode, _>::new(1, chain_spec, test_attributes_generator)
.with_storage_v2()
.build()
.await?;
@@ -152,6 +149,7 @@ async fn test_rocksdb_block_mining() -> Result<()> {
let (mut nodes, _tasks, _wallet) =
E2ETestSetupBuilder::<EthereumNode, _>::new(1, chain_spec, test_attributes_generator)
.with_storage_v2()
.build()
.await?;
@@ -208,6 +206,7 @@ async fn test_rocksdb_transaction_queries() -> Result<()> {
chain_spec.clone(),
test_attributes_generator,
)
.with_storage_v2()
.with_tree_config_modifier(|config| config.with_persistence_threshold(0))
.build()
.await?;
@@ -274,6 +273,7 @@ async fn test_rocksdb_multi_tx_same_block() -> Result<()> {
chain_spec.clone(),
test_attributes_generator,
)
.with_storage_v2()
.with_tree_config_modifier(|config| config.with_persistence_threshold(0))
.build()
.await?;
@@ -341,6 +341,7 @@ async fn test_rocksdb_txs_across_blocks() -> Result<()> {
chain_spec.clone(),
test_attributes_generator,
)
.with_storage_v2()
.with_tree_config_modifier(|config| config.with_persistence_threshold(0))
.build()
.await?;
@@ -425,6 +426,7 @@ async fn test_rocksdb_pending_tx_not_in_storage() -> Result<()> {
chain_spec.clone(),
test_attributes_generator,
)
.with_storage_v2()
.with_tree_config_modifier(|config| config.with_persistence_threshold(0))
.build()
.await?;
@@ -488,6 +490,7 @@ async fn test_rocksdb_reorg_unwind() -> Result<()> {
chain_spec.clone(),
test_attributes_generator,
)
.with_storage_v2()
.with_tree_config_modifier(|config| config.with_persistence_threshold(0))
.build()
.await?;

View File

@@ -89,4 +89,5 @@ min-trace-logs = [
"reth-node-core/min-trace-logs",
]
edge = ["reth-cli-commands/edge"]
rocksdb = ["reth-cli-commands/rocksdb"]
edge = ["rocksdb"]

View File

@@ -90,8 +90,11 @@ min-info-logs = ["tracing/release_max_level_info"]
min-debug-logs = ["tracing/release_max_level_debug"]
min-trace-logs = ["tracing/release_max_level_trace"]
# Marker feature for edge/unstable builds - captured by vergen in build.rs
edge = ["reth-storage-api/edge"]
# Route supported tables to RocksDB instead of MDBX
rocksdb = ["reth-storage-api/rocksdb"]
# Marker feature for edge/unstable builds - enables rocksdb and sets v2 defaults
edge = ["rocksdb"]
[build-dependencies]
vergen = { workspace = true, features = ["build", "cargo", "emit_and_set"] }

View File

@@ -84,5 +84,9 @@ pub use static_files::{StaticFilesArgs, MINIMAL_BLOCKS_PER_FILE};
mod rocksdb;
pub use rocksdb::{RocksDbArgs, RocksDbArgsError};
/// `StorageArgs` for configuring storage mode (v2 vs v1/legacy).
mod storage;
pub use storage::StorageArgs;
mod error;
pub mod types;

View File

@@ -1,34 +1,15 @@
//! clap [Args](clap::Args) for `RocksDB` table routing configuration
use clap::{ArgAction, Args};
use reth_storage_api::StorageSettings;
/// Default value for `tx_hash` routing flag.
///
/// Derived from [`StorageSettings::base()`] to ensure CLI defaults match storage defaults.
const fn default_tx_hash_in_rocksdb() -> bool {
StorageSettings::base().transaction_hash_numbers_in_rocksdb
}
/// Default value for `storages_history` routing flag.
///
/// Derived from [`StorageSettings::base()`] to ensure CLI defaults match storage defaults.
const fn default_storages_history_in_rocksdb() -> bool {
StorageSettings::base().storages_history_in_rocksdb
}
/// Default value for `account_history` routing flag.
///
/// Derived from [`StorageSettings::base()`] to ensure CLI defaults match storage defaults.
const fn default_account_history_in_rocksdb() -> bool {
StorageSettings::base().account_history_in_rocksdb
}
/// Parameters for `RocksDB` table routing configuration.
///
/// These flags control which database tables are stored in `RocksDB` instead of MDBX.
/// All flags are genesis-initialization-only: changing them after genesis requires a re-sync.
#[derive(Debug, Args, PartialEq, Eq, Clone, Copy)]
///
/// When `--storage.v2` is used, the defaults for these flags change to enable `RocksDB` routing.
/// Individual flags can still override those defaults when explicitly set.
#[derive(Debug, Args, PartialEq, Eq, Clone, Copy, Default)]
#[command(next_help_heading = "RocksDB")]
pub struct RocksDbArgs {
/// Route all supported tables to `RocksDB` instead of MDBX.
@@ -41,49 +22,39 @@ pub struct RocksDbArgs {
/// Route tx hash -> number table to `RocksDB` instead of MDBX.
///
/// This is a genesis-initialization-only flag: changing it after genesis requires a re-sync.
/// Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
#[arg(long = "rocksdb.tx-hash", default_value_t = default_tx_hash_in_rocksdb(), action = ArgAction::Set)]
pub tx_hash: bool,
/// Defaults to the base storage mode (v1: false, v2: true).
#[arg(long = "rocksdb.tx-hash", action = ArgAction::Set)]
pub tx_hash: Option<bool>,
/// Route storages history tables to `RocksDB` instead of MDBX.
///
/// This is a genesis-initialization-only flag: changing it after genesis requires a re-sync.
/// Defaults to `false`.
#[arg(long = "rocksdb.storages-history", default_value_t = default_storages_history_in_rocksdb(), action = ArgAction::Set)]
pub storages_history: bool,
/// Defaults to the base storage mode (v1: false, v2: true).
#[arg(long = "rocksdb.storages-history", action = ArgAction::Set)]
pub storages_history: Option<bool>,
/// Route account history tables to `RocksDB` instead of MDBX.
///
/// This is a genesis-initialization-only flag: changing it after genesis requires a re-sync.
/// Defaults to `false`.
#[arg(long = "rocksdb.account-history", default_value_t = default_account_history_in_rocksdb(), action = ArgAction::Set)]
pub account_history: bool,
}
impl Default for RocksDbArgs {
fn default() -> Self {
Self {
all: false,
tx_hash: default_tx_hash_in_rocksdb(),
storages_history: default_storages_history_in_rocksdb(),
account_history: default_account_history_in_rocksdb(),
}
}
/// Defaults to the base storage mode (v1: false, v2: true).
#[arg(long = "rocksdb.account-history", action = ArgAction::Set)]
pub account_history: Option<bool>,
}
impl RocksDbArgs {
/// Validates the `RocksDB` arguments.
///
/// Returns an error if `--rocksdb.all` is used with any individual flag set to `false`.
/// Returns an error if `--rocksdb.all` is used with any individual flag explicitly set to
/// `false`.
pub const fn validate(&self) -> Result<(), RocksDbArgsError> {
if self.all {
if !self.tx_hash {
if matches!(self.tx_hash, Some(false)) {
return Err(RocksDbArgsError::ConflictingFlags("tx-hash"));
}
if !self.storages_history {
if matches!(self.storages_history, Some(false)) {
return Err(RocksDbArgsError::ConflictingFlags("storages-history"));
}
if !self.account_history {
if matches!(self.account_history, Some(false)) {
return Err(RocksDbArgsError::ConflictingFlags("account-history"));
}
}
@@ -114,31 +85,17 @@ mod tests {
fn test_default_rocksdb_args() {
let args = CommandParser::<RocksDbArgs>::parse_from(["reth"]).args;
assert_eq!(args, RocksDbArgs::default());
assert!(!args.all);
assert!(args.tx_hash.is_none());
assert!(args.storages_history.is_none());
assert!(args.account_history.is_none());
}
#[test]
fn test_parse_all_flag() {
let args = CommandParser::<RocksDbArgs>::parse_from(["reth", "--rocksdb.all"]).args;
assert!(args.all);
assert_eq!(args.tx_hash, default_tx_hash_in_rocksdb());
}
#[test]
fn test_defaults_match_storage_settings() {
let args = RocksDbArgs::default();
let settings = StorageSettings::base();
assert_eq!(
args.tx_hash, settings.transaction_hash_numbers_in_rocksdb,
"tx_hash default should match StorageSettings::base()"
);
assert_eq!(
args.storages_history, settings.storages_history_in_rocksdb,
"storages_history default should match StorageSettings::base()"
);
assert_eq!(
args.account_history, settings.account_history_in_rocksdb,
"account_history default should match StorageSettings::base()"
);
assert!(args.tx_hash.is_none());
}
#[test]
@@ -151,15 +108,26 @@ mod tests {
])
.args;
assert!(!args.all);
assert!(args.tx_hash);
assert!(!args.storages_history);
assert!(args.account_history);
assert_eq!(args.tx_hash, Some(true));
assert_eq!(args.storages_history, Some(false));
assert_eq!(args.account_history, Some(true));
}
#[test]
fn test_validate_all_with_none_ok() {
let args =
RocksDbArgs { all: true, tx_hash: None, storages_history: None, account_history: None };
assert!(args.validate().is_ok());
}
#[test]
fn test_validate_all_with_true_ok() {
let args =
RocksDbArgs { all: true, tx_hash: true, storages_history: true, account_history: true };
let args = RocksDbArgs {
all: true,
tx_hash: Some(true),
storages_history: Some(true),
account_history: Some(true),
};
assert!(args.validate().is_ok());
}
@@ -167,25 +135,25 @@ mod tests {
fn test_validate_all_with_false_errors() {
let args = RocksDbArgs {
all: true,
tx_hash: false,
storages_history: true,
account_history: true,
tx_hash: Some(false),
storages_history: None,
account_history: None,
};
assert_eq!(args.validate(), Err(RocksDbArgsError::ConflictingFlags("tx-hash")));
let args = RocksDbArgs {
all: true,
tx_hash: true,
storages_history: false,
account_history: true,
tx_hash: None,
storages_history: Some(false),
account_history: None,
};
assert_eq!(args.validate(), Err(RocksDbArgsError::ConflictingFlags("storages-history")));
let args = RocksDbArgs {
all: true,
tx_hash: true,
storages_history: true,
account_history: false,
tx_hash: None,
storages_history: None,
account_history: Some(false),
};
assert_eq!(args.validate(), Err(RocksDbArgsError::ConflictingFlags("account-history")));
}

View File

@@ -2,23 +2,17 @@
use clap::Args;
use reth_config::config::{BlocksPerFileConfig, StaticFilesConfig};
use reth_storage_api::StorageSettings;
/// Blocks per static file when running in `--minimal` node.
///
/// 10000 blocks per static file allows us to prune all history every 10k blocks.
pub const MINIMAL_BLOCKS_PER_FILE: u64 = 10000;
/// Default value for static file storage flags.
///
/// When the `edge` feature is enabled, defaults to `true` to enable edge storage features.
/// Otherwise defaults to `false` for legacy behavior.
const fn default_static_file_flag() -> bool {
cfg!(feature = "edge")
}
/// Parameters for static files configuration
#[derive(Debug, Args, PartialEq, Eq, Clone, Copy)]
///
/// When `--storage.v2` is used, the defaults for the storage flags change to enable static file
/// storage. Individual flags can still override those defaults when explicitly set.
#[derive(Debug, Args, PartialEq, Eq, Clone, Copy, Default)]
#[command(next_help_heading = "Static Files")]
pub struct StaticFilesArgs {
/// Number of blocks per file for the headers segment.
@@ -51,8 +45,10 @@ pub struct StaticFilesArgs {
///
/// Note: This setting can only be configured at genesis initialization. Once
/// the node has been initialized, changing this flag requires re-syncing from scratch.
#[arg(long = "static-files.receipts", default_value_t = default_static_file_flag(), action = clap::ArgAction::Set)]
pub receipts: bool,
///
/// Defaults to the base storage mode (v1: false, v2: true).
#[arg(long = "static-files.receipts", action = clap::ArgAction::Set)]
pub receipts: Option<bool>,
/// Store transaction senders in static files instead of the database.
///
@@ -61,8 +57,10 @@ pub struct StaticFilesArgs {
///
/// Note: This setting can only be configured at genesis initialization. Once
/// the node has been initialized, changing this flag requires re-syncing from scratch.
#[arg(long = "static-files.transaction-senders", default_value_t = default_static_file_flag(), action = clap::ArgAction::Set)]
pub transaction_senders: bool,
///
/// Defaults to the base storage mode (v1: false, v2: true).
#[arg(long = "static-files.transaction-senders", action = clap::ArgAction::Set)]
pub transaction_senders: Option<bool>,
/// Store account changesets in static files.
///
@@ -71,8 +69,10 @@ pub struct StaticFilesArgs {
///
/// Note: This setting can only be configured at genesis initialization. Once
/// the node has been initialized, changing this flag requires re-syncing from scratch.
#[arg(long = "static-files.account-change-sets", default_value_t = default_static_file_flag(), action = clap::ArgAction::Set)]
pub account_changesets: bool,
///
/// Defaults to the base storage mode (v1: false, v2: true).
#[arg(long = "static-files.account-change-sets", action = clap::ArgAction::Set)]
pub account_changesets: Option<bool>,
/// Store storage changesets in static files.
///
@@ -81,8 +81,10 @@ pub struct StaticFilesArgs {
///
/// Note: This setting can only be configured at genesis initialization. Once
/// the node has been initialized, changing this flag requires re-syncing from scratch.
#[arg(long = "static-files.storage-change-sets", default_value_t = default_static_file_flag(), action = clap::ArgAction::Set)]
pub storage_changesets: bool,
///
/// Defaults to the base storage mode (v1: false, v2: true).
#[arg(long = "static-files.storage-change-sets", action = clap::ArgAction::Set)]
pub storage_changesets: Option<bool>,
}
impl StaticFilesArgs {
@@ -122,34 +124,4 @@ impl StaticFilesArgs {
},
}
}
/// Converts the static files arguments into [`StorageSettings`].
pub const fn to_settings(&self) -> StorageSettings {
#[cfg(feature = "edge")]
let base = StorageSettings::edge();
#[cfg(not(feature = "edge"))]
let base = StorageSettings::legacy();
base.with_receipts_in_static_files(self.receipts)
.with_transaction_senders_in_static_files(self.transaction_senders)
.with_account_changesets_in_static_files(self.account_changesets)
.with_storage_changesets_in_static_files(self.storage_changesets)
}
}
impl Default for StaticFilesArgs {
fn default() -> Self {
Self {
blocks_per_file_headers: None,
blocks_per_file_transactions: None,
blocks_per_file_receipts: None,
blocks_per_file_transaction_senders: None,
blocks_per_file_account_change_sets: None,
blocks_per_file_storage_change_sets: None,
receipts: default_static_file_flag(),
transaction_senders: default_static_file_flag(),
account_changesets: default_static_file_flag(),
storage_changesets: default_static_file_flag(),
}
}
}

View File

@@ -0,0 +1,50 @@
//! clap [Args](clap::Args) for storage mode configuration
use clap::{ArgAction, Args};
/// Parameters for storage mode configuration.
///
/// This controls whether the node uses v2 storage defaults (with `RocksDB` and static file
/// optimizations) or v1/legacy storage defaults.
#[derive(Debug, Args, PartialEq, Eq, Clone, Copy, Default)]
#[command(next_help_heading = "Storage")]
pub struct StorageArgs {
/// Enable v2 storage defaults (static files + `RocksDB` routing).
///
/// When enabled, the node uses optimized storage settings:
/// - Receipts and transaction senders in static files
/// - History indices in `RocksDB` (accounts, storages, transaction hashes)
/// - Account and storage changesets in static files
///
/// This is a genesis-initialization-only setting: changing it after genesis requires a
/// re-sync.
///
/// Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*`
/// flags.
#[arg(long = "storage.v2", action = ArgAction::SetTrue)]
pub v2: bool,
}
#[cfg(test)]
mod tests {
use super::*;
use clap::Parser;
#[derive(Parser)]
struct CommandParser {
#[command(flatten)]
args: StorageArgs,
}
#[test]
fn test_default_storage_args() {
let args = CommandParser::parse_from(["reth"]).args;
assert!(!args.v2);
}
#[test]
fn test_parse_v2_flag() {
let args = CommandParser::parse_from(["reth", "--storage.v2"]).args;
assert!(args.v2);
}
}

View File

@@ -3,7 +3,7 @@
use crate::{
args::{
DatabaseArgs, DatadirArgs, DebugArgs, DevArgs, EngineArgs, NetworkArgs, PayloadBuilderArgs,
PruningArgs, RocksDbArgs, RpcServerArgs, StaticFilesArgs, TxPoolArgs,
PruningArgs, RocksDbArgs, RpcServerArgs, StaticFilesArgs, StorageArgs, TxPoolArgs,
},
dirs::{ChainPath, DataDirPath},
utils::get_single_header,
@@ -154,6 +154,9 @@ pub struct NodeConfig<ChainSpec> {
/// All `RocksDB` table routing arguments
pub rocksdb: RocksDbArgs,
/// Storage mode configuration (v2 vs v1/legacy)
pub storage: StorageArgs,
}
impl NodeConfig<ChainSpec> {
@@ -186,6 +189,7 @@ impl<ChainSpec> NodeConfig<ChainSpec> {
era: EraArgs::default(),
static_files: StaticFilesArgs::default(),
rocksdb: RocksDbArgs::default(),
storage: StorageArgs::default(),
}
}
@@ -261,6 +265,7 @@ impl<ChainSpec> NodeConfig<ChainSpec> {
era,
static_files,
rocksdb,
storage,
..
} = self;
NodeConfig {
@@ -281,6 +286,7 @@ impl<ChainSpec> NodeConfig<ChainSpec> {
era,
static_files,
rocksdb,
storage,
}
}
@@ -357,16 +363,52 @@ impl<ChainSpec> NodeConfig<ChainSpec> {
self.pruning.prune_config(&self.chain)
}
/// Returns the effective storage settings derived from static-file and `RocksDB` CLI args.
/// Returns the effective storage settings derived from `--storage.v2`, static-file, and
/// `RocksDB` CLI args.
///
/// The base storage mode is determined by `--storage.v2`:
/// - When `--storage.v2` is set: uses [`StorageSettings::v2()`] defaults
/// - Otherwise: uses [`StorageSettings::v1()`] defaults
///
/// Individual `--static-files.*` and `--rocksdb.*` flags override the base when explicitly set.
pub const fn storage_settings(&self) -> StorageSettings {
StorageSettings::base()
.with_receipts_in_static_files(self.static_files.receipts)
.with_transaction_senders_in_static_files(self.static_files.transaction_senders)
.with_account_changesets_in_static_files(self.static_files.account_changesets)
.with_storage_changesets_in_static_files(self.static_files.storage_changesets)
.with_transaction_hash_numbers_in_rocksdb(self.rocksdb.all || self.rocksdb.tx_hash)
.with_storages_history_in_rocksdb(self.rocksdb.all || self.rocksdb.storages_history)
.with_account_history_in_rocksdb(self.rocksdb.all || self.rocksdb.account_history)
let mut s = if self.storage.v2 { StorageSettings::v2() } else { StorageSettings::base() };
// Apply static files overrides (only when explicitly set)
if let Some(v) = self.static_files.receipts {
s = s.with_receipts_in_static_files(v);
}
if let Some(v) = self.static_files.transaction_senders {
s = s.with_transaction_senders_in_static_files(v);
}
if let Some(v) = self.static_files.account_changesets {
s = s.with_account_changesets_in_static_files(v);
}
if let Some(v) = self.static_files.storage_changesets {
s = s.with_storage_changesets_in_static_files(v);
}
// Apply rocksdb overrides
// --rocksdb.all sets all rocksdb flags to true
if self.rocksdb.all {
s = s
.with_transaction_hash_numbers_in_rocksdb(true)
.with_storages_history_in_rocksdb(true)
.with_account_history_in_rocksdb(true);
}
// Individual rocksdb flags override --rocksdb.all when explicitly set
if let Some(v) = self.rocksdb.tx_hash {
s = s.with_transaction_hash_numbers_in_rocksdb(v);
}
if let Some(v) = self.rocksdb.storages_history {
s = s.with_storages_history_in_rocksdb(v);
}
if let Some(v) = self.rocksdb.account_history {
s = s.with_account_history_in_rocksdb(v);
}
s
}
/// Returns the max block that the node should run to, looking it up from the network if
@@ -564,6 +606,7 @@ impl<ChainSpec> NodeConfig<ChainSpec> {
era: self.era,
static_files: self.static_files,
rocksdb: self.rocksdb,
storage: self.storage,
}
}
@@ -606,6 +649,7 @@ impl<ChainSpec> Clone for NodeConfig<ChainSpec> {
era: self.era.clone(),
static_files: self.static_files,
rocksdb: self.rocksdb,
storage: self.storage,
}
}
}

View File

@@ -492,7 +492,7 @@ mod tests {
// Enable RocksDB storage for transaction hash numbers
db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_hash_numbers_in_rocksdb(true),
StorageSettings::v1().with_transaction_hash_numbers_in_rocksdb(true),
);
let provider = db.factory.database_provider_rw().unwrap();
@@ -579,7 +579,7 @@ mod tests {
// Enable RocksDB storage for transaction hash numbers
db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_hash_numbers_in_rocksdb(true),
StorageSettings::v1().with_transaction_hash_numbers_in_rocksdb(true),
);
let to_block: BlockNumber = 6;

View File

@@ -122,8 +122,8 @@ test-utils = [
"reth-ethereum-primitives?/test-utils",
"reth-evm-ethereum/test-utils",
]
rocksdb = ["reth-provider/rocksdb"]
edge = ["reth-provider/edge", "reth-db-common/edge", "rocksdb"]
rocksdb = ["reth-provider/rocksdb", "reth-db-common/rocksdb"]
edge = ["rocksdb"]
[[bench]]
name = "criterion"

View File

@@ -1261,9 +1261,8 @@ mod tests {
// but no receipt data is written.
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_receipts_in_static_files(true),
);
factory
.set_storage_settings_cache(StorageSettings::v1().with_receipts_in_static_files(true));
// Setup with block 1
let provider_rw = factory.database_provider_rw().unwrap();

View File

@@ -678,7 +678,7 @@ mod tests {
// Enable RocksDB for account history
db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_account_history_in_rocksdb(true),
StorageSettings::v1().with_account_history_in_rocksdb(true),
);
db.commit(|tx| {
@@ -723,7 +723,7 @@ mod tests {
let db = TestStageDB::default();
db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_account_history_in_rocksdb(true),
StorageSettings::v1().with_account_history_in_rocksdb(true),
);
db.commit(|tx| {
@@ -774,7 +774,7 @@ mod tests {
let db = TestStageDB::default();
db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_account_history_in_rocksdb(true),
StorageSettings::v1().with_account_history_in_rocksdb(true),
);
db.commit(|tx| {

View File

@@ -704,7 +704,7 @@ mod tests {
let db = TestStageDB::default();
db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_storages_history_in_rocksdb(true),
StorageSettings::v1().with_storages_history_in_rocksdb(true),
);
db.commit(|tx| {
@@ -750,7 +750,7 @@ mod tests {
let db = TestStageDB::default();
db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_storages_history_in_rocksdb(true),
StorageSettings::v1().with_storages_history_in_rocksdb(true),
);
db.commit(|tx| {
@@ -805,7 +805,7 @@ mod tests {
let db = TestStageDB::default();
db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_storages_history_in_rocksdb(true),
StorageSettings::v1().with_storages_history_in_rocksdb(true),
);
db.commit(|tx| {
@@ -854,7 +854,7 @@ mod tests {
let db = TestStageDB::default();
db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_storages_history_in_rocksdb(true),
StorageSettings::v1().with_storages_history_in_rocksdb(true),
);
db.commit(|tx| {
@@ -921,7 +921,7 @@ mod tests {
let db = TestStageDB::default();
db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_storages_history_in_rocksdb(true),
StorageSettings::v1().with_storages_history_in_rocksdb(true),
);
let num_blocks = (NUM_OF_INDICES_IN_SHARD * 2 + 100) as u64;

View File

@@ -494,7 +494,7 @@ mod tests {
let runner = SenderRecoveryTestRunner::default();
runner.db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_senders_in_static_files(true),
StorageSettings::v1().with_transaction_senders_in_static_files(true),
);
let input = ExecInput {
target: Some(target),

View File

@@ -619,7 +619,7 @@ mod tests {
// Enable RocksDB for transaction hash numbers
runner.db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_hash_numbers_in_rocksdb(true),
StorageSettings::v1().with_transaction_hash_numbers_in_rocksdb(true),
);
let input = ExecInput {
@@ -687,7 +687,7 @@ mod tests {
// Enable RocksDB for transaction hash numbers
runner.db.factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_hash_numbers_in_rocksdb(true),
StorageSettings::v1().with_transaction_hash_numbers_in_rocksdb(true),
);
// Insert blocks with transactions

View File

@@ -94,4 +94,5 @@ op = [
"reth-primitives-traits/op",
]
bench = []
edge = []
rocksdb = []
edge = ["rocksdb"]

View File

@@ -37,27 +37,22 @@ pub struct StorageSettings {
}
impl StorageSettings {
/// Returns the default base `StorageSettings` for this build.
/// Returns the default base `StorageSettings`.
///
/// When the `edge` feature is enabled, returns `Self::edge()`.
/// Otherwise, returns [`Self::legacy()`].
/// Always returns [`Self::v1()`]. Use the `--storage.v2` CLI flag to opt into
/// [`Self::v2()`] at runtime. The `rocksdb` feature only makes the v2 backend
/// *available*; it does not activate it by default.
pub const fn base() -> Self {
#[cfg(feature = "edge")]
{
Self::edge()
}
#[cfg(not(feature = "edge"))]
{
Self::legacy()
}
Self::v1()
}
/// Creates `StorageSettings` for edge nodes with all storage features enabled:
/// Creates `StorageSettings` for v2 nodes with all storage features enabled:
/// - Receipts and transaction senders in static files
/// - History indices in `RocksDB` (storages, accounts, transaction hashes)
/// - Account changesets in static files
#[cfg(feature = "edge")]
pub const fn edge() -> Self {
/// - Account and storage changesets in static files
///
/// Use this when the `--storage.v2` CLI flag is set.
pub const fn v2() -> Self {
Self {
receipts_in_static_files: true,
transaction_senders_in_static_files: true,
@@ -69,12 +64,12 @@ impl StorageSettings {
}
}
/// Creates `StorageSettings` for legacy nodes.
/// Creates `StorageSettings` for v1/legacy nodes.
///
/// This explicitly sets `receipts_in_static_files` and `transaction_senders_in_static_files` to
/// `false`, ensuring older nodes continue writing receipts and transaction senders to the
/// database when receipt pruning is enabled.
pub const fn legacy() -> Self {
pub const fn v1() -> Self {
Self {
receipts_in_static_files: false,
transaction_senders_in_static_files: false,

View File

@@ -46,7 +46,8 @@ reth-db = { workspace = true, features = ["mdbx"] }
reth-provider = { workspace = true, features = ["test-utils"] }
[features]
edge = ["reth-db-api/edge", "reth-provider/rocksdb"]
rocksdb = ["reth-db-api/rocksdb", "reth-provider/rocksdb"]
edge = ["rocksdb"]
[lints]
workspace = true

View File

@@ -118,14 +118,7 @@ where
+ AsRef<PF::ProviderRW>,
PF::ChainSpec: EthChainSpec<Header = <PF::Primitives as NodePrimitives>::BlockHeader>,
{
#[cfg(feature = "edge")]
{
init_genesis_with_settings(factory, StorageSettings::edge())
}
#[cfg(not(feature = "edge"))]
{
init_genesis_with_settings(factory, StorageSettings::legacy())
}
init_genesis_with_settings(factory, StorageSettings::base())
}
/// Write the genesis block if it has not already been written with [`StorageSettings`].
@@ -177,7 +170,7 @@ where
return Err(InitStorageError::UninitializedDatabase)
}
let stored = factory.storage_settings()?.unwrap_or_else(StorageSettings::legacy);
let stored = factory.storage_settings()?.unwrap_or_else(StorageSettings::v1);
if stored != genesis_storage_settings {
warn!(
target: "reth::storage",
@@ -970,7 +963,7 @@ mod tests {
)
};
#[cfg(feature = "edge")]
#[cfg(feature = "rocksdb")]
{
let settings = factory.cached_storage_settings();
let rocksdb = factory.rocksdb_provider();
@@ -999,7 +992,7 @@ mod tests {
assert_eq!(storages, expected_storages);
}
#[cfg(not(feature = "edge"))]
#[cfg(not(feature = "rocksdb"))]
{
let (accounts, storages) = collect_from_mdbx(&factory);
assert_eq!(accounts, expected_accounts);
@@ -1010,12 +1003,12 @@ mod tests {
#[test]
fn warn_storage_settings_mismatch() {
let factory = create_test_provider_factory_with_chain_spec(MAINNET.clone());
init_genesis_with_settings(&factory, StorageSettings::legacy()).unwrap();
init_genesis_with_settings(&factory, StorageSettings::v1()).unwrap();
// Request different settings - should warn but succeed
let result = init_genesis_with_settings(
&factory,
StorageSettings::legacy().with_receipts_in_static_files(true),
StorageSettings::v1().with_receipts_in_static_files(true),
);
// Should succeed (warning is logged, not an error)
@@ -1025,7 +1018,7 @@ mod tests {
#[test]
fn allow_same_storage_settings() {
let factory = create_test_provider_factory_with_chain_spec(MAINNET.clone());
let settings = StorageSettings::legacy().with_receipts_in_static_files(true);
let settings = StorageSettings::v1().with_receipts_in_static_files(true);
init_genesis_with_settings(&factory, settings).unwrap();
let result = init_genesis_with_settings(&factory, settings);

View File

@@ -87,8 +87,8 @@ rand.workspace = true
tokio = { workspace = true, features = ["sync", "macros", "rt-multi-thread"] }
[features]
edge = ["reth-storage-api/edge", "rocksdb"]
rocksdb = ["dep:rocksdb"]
rocksdb = ["reth-storage-api/rocksdb", "dep:rocksdb"]
edge = ["rocksdb"]
test-utils = [
"reth-db/test-utils",
"reth-nippy-jar/test-utils",

View File

@@ -1162,7 +1162,7 @@ mod tests {
for transaction_senders_in_static_files in [false, true] {
factory.set_storage_settings_cache(
StorageSettings::legacy()
StorageSettings::v1()
.with_transaction_senders_in_static_files(transaction_senders_in_static_files),
);
@@ -1235,7 +1235,7 @@ mod rocksdb_tests {
// Enable RocksDB for transaction hash numbers
factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_hash_numbers_in_rocksdb(true),
StorageSettings::v1().with_transaction_hash_numbers_in_rocksdb(true),
);
let hash1 = B256::from([1u8; 32]);
@@ -1279,7 +1279,7 @@ mod rocksdb_tests {
// Enable RocksDB for transaction hash numbers
factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_hash_numbers_in_rocksdb(true),
StorageSettings::v1().with_transaction_hash_numbers_in_rocksdb(true),
);
let hash = B256::from([1u8; 32]);
@@ -1833,7 +1833,7 @@ mod rocksdb_tests {
// Enable RocksDB for transaction hash numbers
factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_hash_numbers_in_rocksdb(true),
StorageSettings::v1().with_transaction_hash_numbers_in_rocksdb(true),
);
let hash1 = B256::from([1u8; 32]);
@@ -1893,7 +1893,7 @@ mod rocksdb_tests {
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_account_history_in_rocksdb(true),
StorageSettings::v1().with_account_history_in_rocksdb(true),
);
let provider = factory.database_provider_ro().unwrap();

View File

@@ -105,7 +105,7 @@ impl<N: ProviderNodeTypes> ProviderFactory<N> {
// to read persisted settings, falling back to legacy defaults if none exist.
//
// Both factory and all providers it creates should share these cached settings.
let legacy_settings = StorageSettings::legacy();
let legacy_settings = StorageSettings::v1();
let storage_settings = DatabaseProvider::<_, N>::new(
db.tx()?,
chain_spec.clone(),

View File

@@ -4110,7 +4110,7 @@ mod tests {
// Legacy mode (receipts in DB) - should be prunable
{
let factory = create_test_provider_factory();
let storage_settings = StorageSettings::legacy();
let storage_settings = StorageSettings::v1();
factory.set_storage_settings_cache(storage_settings);
let factory = factory.with_prune_modes(PruneModes {
receipts: Some(PruneMode::Before(100)),
@@ -4147,7 +4147,7 @@ mod tests {
// Static files mode
{
let factory = create_test_provider_factory();
let storage_settings = StorageSettings::legacy().with_receipts_in_static_files(true);
let storage_settings = StorageSettings::v1().with_receipts_in_static_files(true);
factory.set_storage_settings_cache(storage_settings);
let factory = factory.with_prune_modes(PruneModes {
receipts: Some(PruneMode::Before(2)),

View File

@@ -502,7 +502,7 @@ mod tests {
// Create a test provider factory for MDBX
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy()
StorageSettings::v1()
.with_transaction_hash_numbers_in_rocksdb(true)
.with_storages_history_in_rocksdb(true),
);
@@ -525,7 +525,7 @@ mod tests {
// Create a test provider factory for MDBX
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_hash_numbers_in_rocksdb(true),
StorageSettings::v1().with_transaction_hash_numbers_in_rocksdb(true),
);
// Set a checkpoint indicating we should have processed up to block 100
@@ -557,7 +557,7 @@ mod tests {
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_hash_numbers_in_rocksdb(true),
StorageSettings::v1().with_transaction_hash_numbers_in_rocksdb(true),
);
// Generate blocks with real transactions and insert them
@@ -625,7 +625,7 @@ mod tests {
// Create a test provider factory for MDBX
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_storages_history_in_rocksdb(true),
StorageSettings::v1().with_storages_history_in_rocksdb(true),
);
// Set a checkpoint indicating we should have processed up to block 100
@@ -665,7 +665,7 @@ mod tests {
// Create a test provider factory for MDBX with NO checkpoint
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_storages_history_in_rocksdb(true),
StorageSettings::v1().with_storages_history_in_rocksdb(true),
);
let provider = factory.database_provider_ro().unwrap();
@@ -691,7 +691,7 @@ mod tests {
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_hash_numbers_in_rocksdb(true),
StorageSettings::v1().with_transaction_hash_numbers_in_rocksdb(true),
);
// Generate blocks with real transactions (blocks 0-2, 6 transactions total)
@@ -747,7 +747,7 @@ mod tests {
// Create a test provider factory for MDBX
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_hash_numbers_in_rocksdb(true),
StorageSettings::v1().with_transaction_hash_numbers_in_rocksdb(true),
);
// Generate blocks with real transactions:
@@ -859,7 +859,7 @@ mod tests {
// Create a test provider factory for MDBX
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_storages_history_in_rocksdb(true),
StorageSettings::v1().with_storages_history_in_rocksdb(true),
);
// Set a checkpoint indicating we should have processed up to block 100
@@ -903,7 +903,7 @@ mod tests {
// Create a test provider factory for MDBX
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_account_history_in_rocksdb(true),
StorageSettings::v1().with_account_history_in_rocksdb(true),
);
// Set a checkpoint indicating we should have processed up to block 100
@@ -938,7 +938,7 @@ mod tests {
// Create a test provider factory for MDBX
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_transaction_hash_numbers_in_rocksdb(true),
StorageSettings::v1().with_transaction_hash_numbers_in_rocksdb(true),
);
// Generate random blocks with unique transactions
@@ -1051,7 +1051,7 @@ mod tests {
// Create a test provider factory for MDBX
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_account_history_in_rocksdb(true),
StorageSettings::v1().with_account_history_in_rocksdb(true),
);
// Set a checkpoint indicating we should have processed up to block 100
@@ -1093,7 +1093,7 @@ mod tests {
// Create a test provider factory for MDBX with NO checkpoint
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_account_history_in_rocksdb(true),
StorageSettings::v1().with_account_history_in_rocksdb(true),
);
let provider = factory.database_provider_ro().unwrap();
@@ -1141,7 +1141,7 @@ mod tests {
// Create a test provider factory for MDBX
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_account_history_in_rocksdb(true),
StorageSettings::v1().with_account_history_in_rocksdb(true),
);
// Write account changesets to static files for blocks 0-100
@@ -1228,7 +1228,7 @@ mod tests {
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy()
StorageSettings::v1()
.with_storages_history_in_rocksdb(true)
.with_storage_changesets_in_static_files(true),
);
@@ -1352,7 +1352,7 @@ mod tests {
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy()
StorageSettings::v1()
.with_storages_history_in_rocksdb(true)
.with_storage_changesets_in_static_files(true),
);
@@ -1458,7 +1458,7 @@ mod tests {
// Create test provider factory
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy()
StorageSettings::v1()
.with_account_history_in_rocksdb(true)
.with_account_changesets_in_static_files(true),
);
@@ -1579,7 +1579,7 @@ mod tests {
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy()
StorageSettings::v1()
.with_account_history_in_rocksdb(true)
.with_account_changesets_in_static_files(true),
);
@@ -1669,7 +1669,7 @@ mod tests {
// Create a test provider factory
let factory = create_test_provider_factory();
factory.set_storage_settings_cache(
StorageSettings::legacy().with_storages_history_in_rocksdb(true),
StorageSettings::v1().with_storages_history_in_rocksdb(true),
);
// Write storage changesets to static files for blocks 0-100

View File

@@ -170,7 +170,7 @@ mod tests {
#[test]
fn test_legacy_settings_skip_rocksdb_tx_creation() {
let provider = TestProvider::new(StorageSettings::legacy());
let provider = TestProvider::new(StorageSettings::v1());
let result = provider.with_rocksdb_tx(|tx| {
assert!(tx.is_none(), "legacy settings should pass None tx");
@@ -184,7 +184,7 @@ mod tests {
#[test]
fn test_rocksdb_settings_create_tx() {
let settings =
StorageSettings { account_history_in_rocksdb: true, ..StorageSettings::legacy() };
StorageSettings { account_history_in_rocksdb: true, ..StorageSettings::v1() };
let provider = TestProvider::new(settings);
let result = provider.with_rocksdb_tx(|tx| {

View File

@@ -36,7 +36,8 @@ serde_json = { workspace = true, optional = true }
[features]
default = ["std"]
edge = ["reth-db-api/edge"]
rocksdb = ["reth-db-api/rocksdb"]
edge = ["rocksdb"]
std = [
"reth-chainspec/std",
"alloy-consensus/std",

View File

@@ -12,6 +12,7 @@
- [`reth db checksum`](./reth/db/checksum.mdx)
- [`reth db checksum mdbx`](./reth/db/checksum/mdbx.mdx)
- [`reth db checksum static-file`](./reth/db/checksum/static-file.mdx)
- [`reth db checksum rocksdb`](./reth/db/checksum/rocksdb.mdx)
- [`reth db diff`](./reth/db/diff.mdx)
- [`reth db get`](./reth/db/get.mdx)
- [`reth db get mdbx`](./reth/db/get/mdbx.mdx)

View File

@@ -135,7 +135,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -145,7 +146,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -155,7 +157,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -165,7 +168,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -177,27 +181,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout

View File

@@ -11,6 +11,7 @@ Usage: reth db checksum [OPTIONS] <COMMAND>
Commands:
mdbx Calculates the checksum of a database table
static-file Calculates the checksum of a static file segment
rocksdb Calculates the checksum of a RocksDB table
help Print this message or the help of the given subcommand(s)
Options:

View File

@@ -0,0 +1,178 @@
# reth db checksum rocksdb
Calculates the checksum of a RocksDB table
```bash
$ reth db checksum rocksdb --help
```
```txt
Usage: reth db checksum rocksdb [OPTIONS] <TABLE>
Arguments:
<TABLE>
The RocksDB table
Possible values:
- transaction-hash-numbers: Transaction hash to transaction number mapping
- accounts-history: Account history indices
- storages-history: Storage history indices
Options:
--limit <LIMIT>
The maximum number of records to checksum
-h, --help
Print help (see a summary with '-h')
Datadir:
--chain <CHAIN_OR_PATH>
The chain this node is running.
Possible values are either a built-in chain or the path to a chain specification file.
Built-in chains:
mainnet, sepolia, holesky, hoodi, dev
[default: mainnet]
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
[default: terminal]
--log.stdout.filter <FILTER>
The filter to use for logs written to stdout
[default: ]
--log.file.format <FORMAT>
The format to use for logs written to the log file
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
[default: terminal]
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.file.directory <PATH>
The path to put log files in
[default: <CACHE_DIR>/logs]
--log.file.name <NAME>
The prefix name of the log files
[default: reth.log]
--log.file.max-size <SIZE>
The maximum size (in MB) of one log file
[default: 200]
--log.file.max-files <COUNT>
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
[default: 5]
--log.journald
Write logs to journald
--log.journald.filter <FILTER>
The filter to use for logs written to journald
[default: error]
--color <COLOR>
Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting
Possible values:
- always: Colors on
- auto: Auto-detect
- never: Colors off
[default: always]
--logs-otlp[=<URL>]
Enable `Opentelemetry` logs export to an OTLP endpoint.
If no value provided, defaults based on protocol: - HTTP: `http://localhost:4318/v1/logs` - gRPC: `http://localhost:4317`
Example: --logs-otlp=http://collector:4318/v1/logs
[env: OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=]
--logs-otlp.filter <FILTER>
Set a filter directive for the OTLP logs exporter. This controls the verbosity of logs sent to the OTLP endpoint. It follows the same syntax as the `RUST_LOG` environment variable.
Example: --logs-otlp.filter=info,reth=debug
Defaults to INFO if not specified.
[default: info]
Display:
-v, --verbosity...
Set the minimum log level.
-v Errors
-vv Warnings
-vvv Info
-vvvv Debug
-vvvvv Traces (warning: very verbose!)
-q, --quiet
Silence all log output
Tracing:
--tracing-otlp[=<URL>]
Enable `Opentelemetry` tracing export to an OTLP endpoint.
If no value provided, defaults based on protocol: - HTTP: `http://localhost:4318/v1/traces` - gRPC: `http://localhost:4317`
Example: --tracing-otlp=http://collector:4318/v1/traces
[env: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=]
--tracing-otlp-protocol <PROTOCOL>
OTLP transport protocol to use for exporting traces and logs.
- `http`: expects endpoint path to end with `/v1/traces` or `/v1/logs` - `grpc`: expects endpoint without a path
Defaults to HTTP if not specified.
Possible values:
- http: HTTP/Protobuf transport, port 4318, requires `/v1/traces` path
- grpc: gRPC transport, port 4317
[env: OTEL_EXPORTER_OTLP_PROTOCOL=]
[default: http]
--tracing-otlp.filter <FILTER>
Set a filter directive for the OTLP tracer. This controls the verbosity of spans and events sent to the OTLP endpoint. It follows the same syntax as the `RUST_LOG` environment variable.
Example: --tracing-otlp.filter=info,reth=debug,hyper_util=off
Defaults to TRACE if not specified.
[default: debug]
--tracing-otlp.sample-ratio <RATIO>
Trace sampling ratio to control the percentage of traces to export.
Valid range: 0.0 to 1.0 - 1.0, default: Sample all traces - 0.01: Sample 1% of traces - 0.0: Disable sampling
Example: --tracing-otlp.sample-ratio=0.0.
[env: OTEL_TRACES_SAMPLER_ARG=]
```

View File

@@ -118,7 +118,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -128,7 +129,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -138,7 +140,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -148,7 +151,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -160,27 +164,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
-u, --url <URL>
Specify a snapshot URL or let the command propose a default one.

View File

@@ -118,7 +118,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -128,7 +129,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -138,7 +140,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -148,7 +151,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -160,27 +164,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
--first-block-number <first-block-number>
Optional first block number to export from the db.
It is by default 0.

View File

@@ -118,7 +118,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -128,7 +129,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -138,7 +140,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -148,7 +151,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -160,27 +164,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
--path <IMPORT_ERA_PATH>
The path to a directory for import.

View File

@@ -118,7 +118,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -128,7 +129,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -138,7 +140,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -148,7 +151,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -160,27 +164,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
--no-state
Disables stages that require state.

View File

@@ -118,7 +118,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -128,7 +129,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -138,7 +140,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -148,7 +151,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -160,27 +164,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
--without-evm
Specifies whether to initialize the state without relying on EVM historical data.

View File

@@ -118,7 +118,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -128,7 +129,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -138,7 +140,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -148,7 +151,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -160,27 +164,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout

View File

@@ -916,25 +916,22 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Engine:
@@ -1066,7 +1063,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -1076,7 +1074,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -1086,7 +1085,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -1096,9 +1096,20 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
Ress:
--ress.enable
Enable support for `ress` subprotocol

View File

@@ -118,7 +118,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -128,7 +129,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -138,7 +140,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -148,7 +151,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -160,27 +164,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
Metrics:
--metrics <PROMETHEUS>
Enable Prometheus metrics.

View File

@@ -118,7 +118,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -128,7 +129,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -138,7 +140,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -148,7 +151,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -160,27 +164,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
--from <FROM>
The height to start at

View File

@@ -118,7 +118,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -128,7 +129,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -138,7 +140,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -148,7 +151,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -160,27 +164,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
<STAGE>
Possible values:
- headers: The headers stage within the pipeline

View File

@@ -125,7 +125,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -135,7 +136,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -145,7 +147,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -155,7 +158,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -167,27 +171,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout

View File

@@ -118,7 +118,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -128,7 +129,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -138,7 +140,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -148,7 +151,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -160,27 +164,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
--metrics <SOCKET>
Enable Prometheus metrics.

View File

@@ -123,7 +123,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.transaction-senders <TRANSACTION_SENDERS>
@@ -133,7 +134,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.account-change-sets <ACCOUNT_CHANGESETS>
@@ -143,7 +145,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
--static-files.storage-change-sets <STORAGE_CHANGESETS>
@@ -153,7 +156,8 @@ Static Files:
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
[default: false]
Defaults to the base storage mode (v1: false, v2: true).
[possible values: true, false]
RocksDB:
@@ -165,27 +169,34 @@ RocksDB:
--rocksdb.tx-hash <TX_HASH>
Route tx hash -> number table to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `true` when the `edge` feature is enabled, `false` otherwise.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.storages-history <STORAGES_HISTORY>
Route storages history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
--rocksdb.account-history <ACCOUNT_HISTORY>
Route account history tables to `RocksDB` instead of MDBX.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to `false`.
This is a genesis-initialization-only flag: changing it after genesis requires a re-sync. Defaults to the base storage mode (v1: false, v2: true).
[default: false]
[possible values: true, false]
Storage:
--storage.v2
Enable v2 storage defaults (static files + `RocksDB` routing).
When enabled, the node uses optimized storage settings: - Receipts and transaction senders in static files - History indices in `RocksDB` (accounts, storages, transaction hashes) - Account and storage changesets in static files
This is a genesis-initialization-only setting: changing it after genesis requires a re-sync.
Individual settings can still be overridden with `--static-files.*` and `--rocksdb.*` flags.
--offline
If this is enabled, then all stages except headers, bodies, and sender recovery will be unwound

View File

@@ -58,6 +58,10 @@ export const rethCliSidebar: SidebarItem = {
{
text: "reth db checksum static-file",
link: "/cli/reth/db/checksum/static-file"
},
{
text: "reth db checksum rocksdb",
link: "/cli/reth/db/checksum/rocksdb"
}
]
},