mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
Compare commits
6 Commits
pageviz
...
feat/rocks
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
512039fc67 | ||
|
|
8f861da4fd | ||
|
|
fa72fa3104 | ||
|
|
c4b8d38d79 | ||
|
|
dbdbc6b56b | ||
|
|
1f5653634c |
@@ -9,7 +9,7 @@ use reth_cli::chainspec::ChainSpecParser;
|
||||
use reth_config::{config::EtlConfig, Config};
|
||||
use reth_consensus::noop::NoopConsensus;
|
||||
use reth_db::{init_db, open_db_read_only, DatabaseEnv};
|
||||
use reth_db_common::init::init_genesis_with_settings;
|
||||
use reth_db_common::init::init_genesis_with_overrides;
|
||||
use reth_downloaders::{bodies::noop::NoopBodiesDownloader, headers::noop::NoopHeaderDownloader};
|
||||
use reth_eth_wire::NetPrimitivesFor;
|
||||
use reth_evm::{noop::NoopEvmConfig, ConfigureEvm};
|
||||
@@ -19,7 +19,7 @@ use reth_node_builder::{
|
||||
Node, NodeComponents, NodeComponentsBuilder, NodeTypes, NodeTypesWithDBAdapter,
|
||||
};
|
||||
use reth_node_core::{
|
||||
args::{DatabaseArgs, DatadirArgs, StaticFilesArgs},
|
||||
args::{DatabaseArgs, DatadirArgs, StorageArgs},
|
||||
dirs::{ChainPath, DataDirPath},
|
||||
};
|
||||
use reth_provider::{
|
||||
@@ -27,7 +27,7 @@ use reth_provider::{
|
||||
BlockchainProvider, NodeTypesForProvider, RocksDBProvider, StaticFileProvider,
|
||||
StaticFileProviderBuilder,
|
||||
},
|
||||
ProviderFactory, StaticFileProviderFactory,
|
||||
ProviderFactory, StaticFileProviderFactory, StorageSettings,
|
||||
};
|
||||
use reth_stages::{sets::DefaultStages, Pipeline, PipelineTarget};
|
||||
use reth_static_file::StaticFileProducer;
|
||||
@@ -63,9 +63,9 @@ pub struct EnvironmentArgs<C: ChainSpecParser> {
|
||||
#[command(flatten)]
|
||||
pub db: DatabaseArgs,
|
||||
|
||||
/// All static files related arguments
|
||||
/// All storage related arguments (static files + RocksDB tables)
|
||||
#[command(flatten)]
|
||||
pub static_files: StaticFilesArgs,
|
||||
pub storage: StorageArgs,
|
||||
}
|
||||
|
||||
impl<C: ChainSpecParser> EnvironmentArgs<C> {
|
||||
@@ -131,7 +131,9 @@ impl<C: ChainSpecParser> EnvironmentArgs<C> {
|
||||
self.create_provider_factory(&config, db, sfp, rocksdb_provider, access)?;
|
||||
if access.is_read_write() {
|
||||
debug!(target: "reth::cli", chain=%self.chain.chain(), genesis=?self.chain.genesis_hash(), "Initializing genesis");
|
||||
init_genesis_with_settings(&provider_factory, self.static_files.to_settings())?;
|
||||
let overrides = self.storage.to_overrides();
|
||||
let settings = self.storage.to_settings(StorageSettings::legacy());
|
||||
init_genesis_with_overrides(&provider_factory, settings, overrides)?;
|
||||
}
|
||||
|
||||
Ok(Environment { config, provider_factory, data_dir })
|
||||
|
||||
@@ -10,7 +10,7 @@ use reth_node_builder::NodeBuilder;
|
||||
use reth_node_core::{
|
||||
args::{
|
||||
DatabaseArgs, DatadirArgs, DebugArgs, DevArgs, EngineArgs, EraArgs, MetricArgs,
|
||||
NetworkArgs, PayloadBuilderArgs, PruningArgs, RpcServerArgs, StaticFilesArgs, TxPoolArgs,
|
||||
NetworkArgs, PayloadBuilderArgs, PruningArgs, RpcServerArgs, StorageArgs, TxPoolArgs,
|
||||
},
|
||||
node_config::NodeConfig,
|
||||
version,
|
||||
@@ -110,9 +110,9 @@ pub struct NodeCommand<C: ChainSpecParser, Ext: clap::Args + fmt::Debug = NoArgs
|
||||
#[command(flatten, next_help_heading = "ERA")]
|
||||
pub era: EraArgs,
|
||||
|
||||
/// All static files related arguments
|
||||
#[command(flatten, next_help_heading = "Static Files")]
|
||||
pub static_files: StaticFilesArgs,
|
||||
/// All storage related arguments (static files + RocksDB tables)
|
||||
#[command(flatten)]
|
||||
pub storage: StorageArgs,
|
||||
|
||||
/// Additional cli arguments
|
||||
#[command(flatten, next_help_heading = "Extension")]
|
||||
@@ -168,7 +168,7 @@ where
|
||||
pruning,
|
||||
engine,
|
||||
era,
|
||||
static_files,
|
||||
storage,
|
||||
ext,
|
||||
} = self;
|
||||
|
||||
@@ -189,7 +189,7 @@ where
|
||||
pruning,
|
||||
engine,
|
||||
era,
|
||||
static_files,
|
||||
storage,
|
||||
};
|
||||
|
||||
let data_dir = node_config.datadir();
|
||||
|
||||
@@ -42,7 +42,7 @@ use reth_chainspec::{Chain, EthChainSpec, EthereumHardforks};
|
||||
use reth_config::{config::EtlConfig, PruneConfig};
|
||||
use reth_consensus::noop::NoopConsensus;
|
||||
use reth_db_api::{database::Database, database_metrics::DatabaseMetrics};
|
||||
use reth_db_common::init::{init_genesis_with_settings, InitStorageError};
|
||||
use reth_db_common::init::{init_genesis_with_overrides, InitStorageError};
|
||||
use reth_downloaders::{bodies::noop::NoopBodiesDownloader, headers::noop::NoopHeaderDownloader};
|
||||
use reth_engine_local::MiningMode;
|
||||
use reth_evm::{noop::NoopEvmConfig, ConfigureEvm};
|
||||
@@ -68,7 +68,7 @@ use reth_provider::{
|
||||
providers::{NodeTypesForProvider, ProviderNodeTypes, RocksDBProvider, StaticFileProvider},
|
||||
BlockHashReader, BlockNumReader, DatabaseProviderFactory, ProviderError, ProviderFactory,
|
||||
ProviderResult, RocksDBProviderFactory, StageCheckpointReader, StaticFileProviderBuilder,
|
||||
StaticFileProviderFactory,
|
||||
StaticFileProviderFactory, StorageSettings,
|
||||
};
|
||||
use reth_prune::{PruneModes, PrunerBuilder};
|
||||
use reth_rpc_builder::config::RethRpcServerConfig;
|
||||
@@ -171,8 +171,10 @@ impl LaunchContext {
|
||||
toml_config.peers.trusted_nodes_only = config.network.trusted_only;
|
||||
|
||||
// Merge static file CLI arguments with config file, giving priority to CLI
|
||||
toml_config.static_files =
|
||||
config.static_files.merge_with_config(toml_config.static_files, config.pruning.minimal);
|
||||
toml_config.static_files = config
|
||||
.storage
|
||||
.static_files
|
||||
.merge_with_config(toml_config.static_files, config.pruning.minimal);
|
||||
|
||||
Ok(toml_config)
|
||||
}
|
||||
@@ -676,19 +678,19 @@ where
|
||||
|
||||
/// Convenience function to [`Self::init_genesis`]
|
||||
pub fn with_genesis(self) -> Result<Self, InitStorageError> {
|
||||
init_genesis_with_settings(
|
||||
self.provider_factory(),
|
||||
self.node_config().static_files.to_settings(),
|
||||
)?;
|
||||
self.init_genesis()?;
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
/// Write the genesis block and state if it has not already been written
|
||||
/// Write the genesis block and state if it has not already been written.
|
||||
///
|
||||
/// Validates that any explicitly set CLI storage flags match the stored settings.
|
||||
pub fn init_genesis(&self) -> Result<B256, InitStorageError> {
|
||||
init_genesis_with_settings(
|
||||
self.provider_factory(),
|
||||
self.node_config().static_files.to_settings(),
|
||||
)
|
||||
let storage_args = &self.node_config().storage;
|
||||
let overrides = storage_args.to_overrides();
|
||||
let settings = storage_args.to_settings(StorageSettings::legacy());
|
||||
|
||||
init_genesis_with_overrides(self.provider_factory(), settings, overrides)
|
||||
}
|
||||
|
||||
/// Creates a new `WithMeteredProvider` container and attaches it to the
|
||||
|
||||
@@ -80,5 +80,9 @@ pub use era::{DefaultEraHost, EraArgs, EraSourceArgs};
|
||||
mod static_files;
|
||||
pub use static_files::{StaticFilesArgs, MINIMAL_BLOCKS_PER_FILE};
|
||||
|
||||
/// `StorageArgs` for configuring storage (static files + RocksDB tables).
|
||||
mod storage;
|
||||
pub use storage::StorageArgs;
|
||||
|
||||
mod error;
|
||||
pub mod types;
|
||||
|
||||
71
crates/node/core/src/args/storage.rs
Normal file
71
crates/node/core/src/args/storage.rs
Normal file
@@ -0,0 +1,71 @@
|
||||
//! clap [Args](clap::Args) for storage configuration (static files + RocksDB tables)
|
||||
|
||||
use clap::{ArgAction, Args};
|
||||
use reth_provider::{StorageSettings, StorageSettingsOverrides};
|
||||
|
||||
use super::StaticFilesArgs;
|
||||
|
||||
/// Parameters for storage configuration
|
||||
#[derive(Debug, Args, PartialEq, Eq, Default, Clone, Copy)]
|
||||
#[command(next_help_heading = "Storage")]
|
||||
pub struct StorageArgs {
|
||||
/// Static files related flags.
|
||||
#[command(flatten)]
|
||||
pub static_files: StaticFilesArgs,
|
||||
|
||||
/// Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
///
|
||||
/// 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 = "storage.tx-hash-in-rocksdb", action = ArgAction::Set)]
|
||||
pub tx_hash_in_rocksdb: Option<bool>,
|
||||
|
||||
/// Store storages history in `RocksDB` instead of MDBX.
|
||||
///
|
||||
/// 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 = "storage.storages-history-in-rocksdb", action = ArgAction::Set)]
|
||||
pub storages_history_in_rocksdb: Option<bool>,
|
||||
|
||||
/// Store account history in `RocksDB` instead of MDBX.
|
||||
///
|
||||
/// 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 = "storage.account-history-in-rocksdb", action = ArgAction::Set)]
|
||||
pub account_history_in_rocksdb: Option<bool>,
|
||||
}
|
||||
|
||||
impl StorageArgs {
|
||||
/// Converts CLI storage arguments into [`StorageSettings`].
|
||||
///
|
||||
/// Uses the provided default settings for any flags not explicitly set.
|
||||
pub const fn to_settings(&self, defaults: StorageSettings) -> StorageSettings {
|
||||
let base = self.static_files.to_settings();
|
||||
|
||||
let tx_hash = match self.tx_hash_in_rocksdb {
|
||||
Some(v) => v,
|
||||
None => defaults.transaction_hash_numbers_in_rocksdb,
|
||||
};
|
||||
let storages_history = match self.storages_history_in_rocksdb {
|
||||
Some(v) => v,
|
||||
None => defaults.storages_history_in_rocksdb,
|
||||
};
|
||||
let account_history = match self.account_history_in_rocksdb {
|
||||
Some(v) => v,
|
||||
None => defaults.account_history_in_rocksdb,
|
||||
};
|
||||
|
||||
base.with_transaction_hash_numbers_in_rocksdb(tx_hash)
|
||||
.with_storages_history_in_rocksdb(storages_history)
|
||||
.with_account_history_in_rocksdb(account_history)
|
||||
}
|
||||
|
||||
/// Returns the overrides for `RocksDB` settings that were explicitly set via CLI.
|
||||
pub const fn to_overrides(&self) -> StorageSettingsOverrides {
|
||||
StorageSettingsOverrides {
|
||||
transaction_hash_numbers_in_rocksdb: self.tx_hash_in_rocksdb,
|
||||
storages_history_in_rocksdb: self.storages_history_in_rocksdb,
|
||||
account_history_in_rocksdb: self.account_history_in_rocksdb,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
use crate::{
|
||||
args::{
|
||||
DatabaseArgs, DatadirArgs, DebugArgs, DevArgs, EngineArgs, NetworkArgs, PayloadBuilderArgs,
|
||||
PruningArgs, RpcServerArgs, StaticFilesArgs, TxPoolArgs,
|
||||
PruningArgs, RpcServerArgs, StorageArgs, TxPoolArgs,
|
||||
},
|
||||
dirs::{ChainPath, DataDirPath},
|
||||
utils::get_single_header,
|
||||
@@ -148,8 +148,8 @@ pub struct NodeConfig<ChainSpec> {
|
||||
/// All ERA import related arguments with --era prefix
|
||||
pub era: EraArgs,
|
||||
|
||||
/// All static files related arguments
|
||||
pub static_files: StaticFilesArgs,
|
||||
/// All storage related arguments (static files + `RocksDB` tables)
|
||||
pub storage: StorageArgs,
|
||||
}
|
||||
|
||||
impl NodeConfig<ChainSpec> {
|
||||
@@ -180,7 +180,7 @@ impl<ChainSpec> NodeConfig<ChainSpec> {
|
||||
datadir: DatadirArgs::default(),
|
||||
engine: EngineArgs::default(),
|
||||
era: EraArgs::default(),
|
||||
static_files: StaticFilesArgs::default(),
|
||||
storage: StorageArgs::default(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ impl<ChainSpec> NodeConfig<ChainSpec> {
|
||||
pruning,
|
||||
engine,
|
||||
era,
|
||||
static_files,
|
||||
storage,
|
||||
..
|
||||
} = self;
|
||||
NodeConfig {
|
||||
@@ -273,7 +273,7 @@ impl<ChainSpec> NodeConfig<ChainSpec> {
|
||||
pruning,
|
||||
engine,
|
||||
era,
|
||||
static_files,
|
||||
storage,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -543,7 +543,7 @@ impl<ChainSpec> NodeConfig<ChainSpec> {
|
||||
pruning: self.pruning,
|
||||
engine: self.engine,
|
||||
era: self.era,
|
||||
static_files: self.static_files,
|
||||
storage: self.storage,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -584,7 +584,7 @@ impl<ChainSpec> Clone for NodeConfig<ChainSpec> {
|
||||
datadir: self.datadir.clone(),
|
||||
engine: self.engine.clone(),
|
||||
era: self.era.clone(),
|
||||
static_files: self.static_files,
|
||||
storage: self.storage,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,4 +108,120 @@ impl StorageSettings {
|
||||
self.account_history_in_rocksdb ||
|
||||
self.storages_history_in_rocksdb
|
||||
}
|
||||
|
||||
/// Validates that the given overrides match this settings.
|
||||
///
|
||||
/// Returns `Ok(())` if all explicitly set overrides match, or an error describing
|
||||
/// the mismatches.
|
||||
pub fn validate_overrides(
|
||||
&self,
|
||||
overrides: &StorageSettingsOverrides,
|
||||
) -> Result<(), StorageSettingsMismatch> {
|
||||
let mut mismatches = Vec::new();
|
||||
|
||||
if let Some(cli_value) = overrides
|
||||
.transaction_hash_numbers_in_rocksdb
|
||||
.filter(|&v| v != self.transaction_hash_numbers_in_rocksdb)
|
||||
{
|
||||
mismatches.push(SettingMismatch {
|
||||
name: "transaction_hash_numbers_in_rocksdb",
|
||||
flag: "--storage.tx-hash-in-rocksdb",
|
||||
db_value: self.transaction_hash_numbers_in_rocksdb,
|
||||
cli_value,
|
||||
});
|
||||
}
|
||||
|
||||
if let Some(cli_value) =
|
||||
overrides.storages_history_in_rocksdb.filter(|&v| v != self.storages_history_in_rocksdb)
|
||||
{
|
||||
mismatches.push(SettingMismatch {
|
||||
name: "storages_history_in_rocksdb",
|
||||
flag: "--storage.storages-history-in-rocksdb",
|
||||
db_value: self.storages_history_in_rocksdb,
|
||||
cli_value,
|
||||
});
|
||||
}
|
||||
|
||||
if let Some(cli_value) =
|
||||
overrides.account_history_in_rocksdb.filter(|&v| v != self.account_history_in_rocksdb)
|
||||
{
|
||||
mismatches.push(SettingMismatch {
|
||||
name: "account_history_in_rocksdb",
|
||||
flag: "--storage.account-history-in-rocksdb",
|
||||
db_value: self.account_history_in_rocksdb,
|
||||
cli_value,
|
||||
});
|
||||
}
|
||||
|
||||
if mismatches.is_empty() {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(StorageSettingsMismatch { mismatches })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Overrides for storage settings that were explicitly set via CLI.
|
||||
///
|
||||
/// `None` means the flag was not provided (use DB value), `Some(v)` means the user
|
||||
/// explicitly requested this value.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
||||
pub struct StorageSettingsOverrides {
|
||||
/// Override for `transaction_hash_numbers_in_rocksdb`.
|
||||
pub transaction_hash_numbers_in_rocksdb: Option<bool>,
|
||||
/// Override for `storages_history_in_rocksdb`.
|
||||
pub storages_history_in_rocksdb: Option<bool>,
|
||||
/// Override for `account_history_in_rocksdb`.
|
||||
pub account_history_in_rocksdb: Option<bool>,
|
||||
}
|
||||
|
||||
impl StorageSettingsOverrides {
|
||||
/// Returns `true` if any override is set.
|
||||
pub const fn any_set(&self) -> bool {
|
||||
self.transaction_hash_numbers_in_rocksdb.is_some() ||
|
||||
self.storages_history_in_rocksdb.is_some() ||
|
||||
self.account_history_in_rocksdb.is_some()
|
||||
}
|
||||
}
|
||||
|
||||
/// A single setting mismatch between CLI and DB.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SettingMismatch {
|
||||
/// The setting name.
|
||||
pub name: &'static str,
|
||||
/// The CLI flag name.
|
||||
pub flag: &'static str,
|
||||
/// The value stored in the database.
|
||||
pub db_value: bool,
|
||||
/// The value provided via CLI.
|
||||
pub cli_value: bool,
|
||||
}
|
||||
|
||||
/// Error when CLI storage settings don't match database settings.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct StorageSettingsMismatch {
|
||||
/// The list of mismatched settings.
|
||||
pub mismatches: Vec<SettingMismatch>,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for StorageSettingsMismatch {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
writeln!(
|
||||
f,
|
||||
"Storage settings mismatch: database was initialized with different RocksDB storage layout."
|
||||
)?;
|
||||
writeln!(f)?;
|
||||
writeln!(f, "Conflicts:")?;
|
||||
for m in &self.mismatches {
|
||||
writeln!(f, " - {} {}: db={}, cli={}", m.flag, m.name, m.db_value, m.cli_value)?;
|
||||
}
|
||||
writeln!(f)?;
|
||||
writeln!(f, "These flags are genesis-only. To proceed:")?;
|
||||
writeln!(f, " 1) Remove the conflicting CLI flags (recommended), or")?;
|
||||
writeln!(f, " 2) Wipe the database and re-sync with the desired flags.")?;
|
||||
writeln!(f)?;
|
||||
write!(f, "Inspect current DB settings: `reth db settings get`")
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for StorageSettingsMismatch {}
|
||||
|
||||
@@ -15,9 +15,10 @@ use reth_primitives_traits::{
|
||||
use reth_provider::{
|
||||
errors::provider::ProviderResult, providers::StaticFileWriter, BlockHashReader, BlockNumReader,
|
||||
BundleStateInit, ChainSpecProvider, DBProvider, DatabaseProviderFactory, ExecutionOutcome,
|
||||
HashingWriter, HeaderProvider, HistoryWriter, MetadataWriter, OriginalValuesKnown,
|
||||
ProviderError, RevertsInit, StageCheckpointReader, StageCheckpointWriter, StateWriteConfig,
|
||||
StateWriter, StaticFileProviderFactory, StorageSettings, StorageSettingsCache, TrieWriter,
|
||||
HashingWriter, HeaderProvider, HistoryWriter, MetadataProvider, MetadataWriter,
|
||||
OriginalValuesKnown, ProviderError, RevertsInit, StageCheckpointReader, StageCheckpointWriter,
|
||||
StateWriteConfig, StateWriter, StaticFileProviderFactory, StorageSettings,
|
||||
StorageSettingsCache, StorageSettingsMismatch, StorageSettingsOverrides, TrieWriter,
|
||||
};
|
||||
use reth_stages_types::{StageCheckpoint, StageId};
|
||||
use reth_static_file_types::StaticFileSegment;
|
||||
@@ -75,6 +76,15 @@ pub enum InitStorageError {
|
||||
/// State root doesn't match the expected one.
|
||||
#[error("state root mismatch: {_0}")]
|
||||
StateRootMismatch(GotExpected<B256>),
|
||||
/// CLI storage settings don't match the stored database settings.
|
||||
#[error("{_0}")]
|
||||
StorageSettingsMismatch(StorageSettingsMismatch),
|
||||
}
|
||||
|
||||
impl From<StorageSettingsMismatch> for InitStorageError {
|
||||
fn from(error: StorageSettingsMismatch) -> Self {
|
||||
Self::StorageSettingsMismatch(error)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<DatabaseError> for InitStorageError {
|
||||
@@ -92,6 +102,7 @@ where
|
||||
+ StageCheckpointReader
|
||||
+ BlockHashReader
|
||||
+ StorageSettingsCache,
|
||||
PF::Provider: MetadataProvider,
|
||||
PF::ProviderRW: StaticFileProviderFactory<Primitives = PF::Primitives>
|
||||
+ StageCheckpointWriter
|
||||
+ HistoryWriter
|
||||
@@ -100,6 +111,7 @@ where
|
||||
+ StateWriter
|
||||
+ TrieWriter
|
||||
+ MetadataWriter
|
||||
+ MetadataProvider
|
||||
+ ChainSpecProvider
|
||||
+ AsRef<PF::ProviderRW>,
|
||||
PF::ChainSpec: EthChainSpec<Header = <PF::Primitives as NodePrimitives>::BlockHeader>,
|
||||
@@ -115,6 +127,9 @@ where
|
||||
}
|
||||
|
||||
/// Write the genesis block if it has not already been written with [`StorageSettings`].
|
||||
///
|
||||
/// This is a convenience wrapper around [`init_genesis_with_overrides`] that does not validate
|
||||
/// any CLI overrides against stored settings.
|
||||
pub fn init_genesis_with_settings<PF>(
|
||||
factory: &PF,
|
||||
genesis_storage_settings: StorageSettings,
|
||||
@@ -126,6 +141,7 @@ where
|
||||
+ StageCheckpointReader
|
||||
+ BlockHashReader
|
||||
+ StorageSettingsCache,
|
||||
PF::Provider: MetadataProvider,
|
||||
PF::ProviderRW: StaticFileProviderFactory<Primitives = PF::Primitives>
|
||||
+ StageCheckpointWriter
|
||||
+ HistoryWriter
|
||||
@@ -134,6 +150,44 @@ where
|
||||
+ StateWriter
|
||||
+ TrieWriter
|
||||
+ MetadataWriter
|
||||
+ MetadataProvider
|
||||
+ ChainSpecProvider
|
||||
+ AsRef<PF::ProviderRW>,
|
||||
PF::ChainSpec: EthChainSpec<Header = <PF::Primitives as NodePrimitives>::BlockHeader>,
|
||||
{
|
||||
init_genesis_with_overrides(
|
||||
factory,
|
||||
genesis_storage_settings,
|
||||
StorageSettingsOverrides::default(),
|
||||
)
|
||||
}
|
||||
|
||||
/// Write the genesis block if it has not already been written with [`StorageSettings`].
|
||||
///
|
||||
/// If the genesis block already exists, validates that any explicitly set CLI overrides
|
||||
/// match the stored settings. Returns an error if there's a mismatch.
|
||||
pub fn init_genesis_with_overrides<PF>(
|
||||
factory: &PF,
|
||||
genesis_storage_settings: StorageSettings,
|
||||
overrides: StorageSettingsOverrides,
|
||||
) -> Result<B256, InitStorageError>
|
||||
where
|
||||
PF: DatabaseProviderFactory
|
||||
+ StaticFileProviderFactory<Primitives: NodePrimitives<BlockHeader: Compact>>
|
||||
+ ChainSpecProvider
|
||||
+ StageCheckpointReader
|
||||
+ BlockHashReader
|
||||
+ StorageSettingsCache,
|
||||
PF::Provider: MetadataProvider,
|
||||
PF::ProviderRW: StaticFileProviderFactory<Primitives = PF::Primitives>
|
||||
+ StageCheckpointWriter
|
||||
+ HistoryWriter
|
||||
+ HeaderProvider
|
||||
+ HashingWriter
|
||||
+ StateWriter
|
||||
+ TrieWriter
|
||||
+ MetadataWriter
|
||||
+ MetadataProvider
|
||||
+ ChainSpecProvider
|
||||
+ AsRef<PF::ProviderRW>,
|
||||
PF::ChainSpec: EthChainSpec<Header = <PF::Primitives as NodePrimitives>::BlockHeader>,
|
||||
@@ -159,6 +213,14 @@ where
|
||||
return Err(InitStorageError::UninitializedDatabase)
|
||||
}
|
||||
|
||||
// Validate CLI overrides against stored settings if any are explicitly set
|
||||
if overrides.any_set() {
|
||||
let provider = factory.database_provider_ro()?;
|
||||
let stored_settings =
|
||||
provider.storage_settings()?.unwrap_or_else(StorageSettings::legacy);
|
||||
stored_settings.validate_overrides(&overrides)?;
|
||||
}
|
||||
|
||||
debug!("Genesis already written, skipping.");
|
||||
return Ok(hash)
|
||||
}
|
||||
|
||||
@@ -45,8 +45,9 @@ pub use revm_database::states::OriginalValuesKnown;
|
||||
// reexport traits to avoid breaking changes
|
||||
pub use reth_static_file_types as static_file;
|
||||
pub use reth_storage_api::{
|
||||
HistoryWriter, MetadataProvider, MetadataWriter, StateWriteConfig, StatsReader,
|
||||
StorageSettings, StorageSettingsCache,
|
||||
HistoryWriter, MetadataProvider, MetadataWriter, SettingMismatch, StateWriteConfig,
|
||||
StatsReader, StorageSettings, StorageSettingsCache, StorageSettingsMismatch,
|
||||
StorageSettingsOverrides,
|
||||
};
|
||||
/// Re-export provider error.
|
||||
pub use reth_storage_errors::provider::{ProviderError, ProviderResult};
|
||||
|
||||
@@ -101,7 +101,9 @@ pub mod metadata;
|
||||
#[cfg(feature = "db-api")]
|
||||
pub use metadata::{MetadataProvider, MetadataWriter, StorageSettingsCache};
|
||||
#[cfg(feature = "db-api")]
|
||||
pub use reth_db_api::models::StorageSettings;
|
||||
pub use reth_db_api::models::{
|
||||
SettingMismatch, StorageSettings, StorageSettingsMismatch, StorageSettingsOverrides,
|
||||
};
|
||||
|
||||
mod full;
|
||||
pub use full::*;
|
||||
|
||||
@@ -145,6 +145,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
Logging:
|
||||
--log.stdout.format <FORMAT>
|
||||
The format to use for logs written to stdout
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--chunk-len <CHUNK_LEN>
|
||||
Chunk byte length to read from file.
|
||||
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--chunk-len <CHUNK_LEN>
|
||||
Chunk byte length to read from file.
|
||||
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--without-evm
|
||||
Specifies whether to initialize the state without relying on EVM historical data.
|
||||
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
Logging:
|
||||
--log.stdout.format <FORMAT>
|
||||
The format to use for logs written to stdout
|
||||
|
||||
@@ -1024,6 +1024,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
Rollup:
|
||||
--rollup.sequencer <SEQUENCER>
|
||||
Endpoint for the sequencer mempool (can be both HTTP and WS)
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
Logging:
|
||||
--log.stdout.format <FORMAT>
|
||||
The format to use for logs written to stdout
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--from <FROM>
|
||||
The height to start at
|
||||
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
<STAGE>
|
||||
Possible values:
|
||||
- headers: The headers stage within the pipeline
|
||||
|
||||
@@ -136,6 +136,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
Logging:
|
||||
--log.stdout.format <FORMAT>
|
||||
The format to use for logs written to stdout
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--metrics <SOCKET>
|
||||
Enable Prometheus metrics.
|
||||
|
||||
|
||||
@@ -134,6 +134,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--offline
|
||||
If this is enabled, then all stages except headers, bodies, and sender recovery will be unwound
|
||||
|
||||
|
||||
@@ -145,6 +145,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
Logging:
|
||||
--log.stdout.format <FORMAT>
|
||||
The format to use for logs written to stdout
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
-u, --url <URL>
|
||||
Specify a snapshot URL or let the command propose a default one.
|
||||
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--first-block-number <first-block-number>
|
||||
Optional first block number to export from the db.
|
||||
It is by default 0.
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--path <IMPORT_ERA_PATH>
|
||||
The path to a directory for import.
|
||||
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--no-state
|
||||
Disables stages that require state.
|
||||
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--without-evm
|
||||
Specifies whether to initialize the state without relying on EVM historical data.
|
||||
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
Logging:
|
||||
--log.stdout.format <FORMAT>
|
||||
The format to use for logs written to stdout
|
||||
|
||||
@@ -1024,6 +1024,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
Ress:
|
||||
--ress.enable
|
||||
Enable support for `ress` subprotocol
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
Logging:
|
||||
--log.stdout.format <FORMAT>
|
||||
The format to use for logs written to stdout
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--from <FROM>
|
||||
The height to start at
|
||||
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
<STAGE>
|
||||
Possible values:
|
||||
- headers: The headers stage within the pipeline
|
||||
|
||||
@@ -136,6 +136,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
Logging:
|
||||
--log.stdout.format <FORMAT>
|
||||
The format to use for logs written to stdout
|
||||
|
||||
@@ -129,6 +129,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--metrics <SOCKET>
|
||||
Enable Prometheus metrics.
|
||||
|
||||
|
||||
@@ -134,6 +134,27 @@ 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.
|
||||
|
||||
--storage.tx-hash-in-rocksdb <TX_HASH_IN_ROCKSDB>
|
||||
Store transaction hash -> number mapping in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.storages-history-in-rocksdb <STORAGES_HISTORY_IN_ROCKSDB>
|
||||
Store storages history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--storage.account-history-in-rocksdb <ACCOUNT_HISTORY_IN_ROCKSDB>
|
||||
Store account history in `RocksDB` instead of MDBX.
|
||||
|
||||
Note: This setting can only be configured at genesis initialization. Once the node has been initialized, changing this flag requires re-syncing from scratch.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--offline
|
||||
If this is enabled, then all stages except headers, bodies, and sender recovery will be unwound
|
||||
|
||||
|
||||
Reference in New Issue
Block a user