diff --git a/bin/reth/src/commands/node/mod.rs b/bin/reth/src/commands/node/mod.rs index 1f404bd419..786d6d1a12 100644 --- a/bin/reth/src/commands/node/mod.rs +++ b/bin/reth/src/commands/node/mod.rs @@ -76,10 +76,6 @@ pub struct NodeCommand { #[arg(long, conflicts_with = "instance", global = true)] pub with_unused_ports: bool, - /// Overrides the KZG trusted setup by reading from the supplied file. - #[arg(long, value_name = "PATH")] - pub trusted_setup_file: Option, - /// All networking related arguments #[command(flatten)] pub network: NetworkArgs, @@ -150,7 +146,6 @@ impl NodeCommand { config, chain, metrics, - trusted_setup_file, instance, with_unused_ports, network, @@ -170,7 +165,6 @@ impl NodeCommand { chain, metrics, instance, - trusted_setup_file, network, rpc, txpool, diff --git a/crates/node-builder/src/builder.rs b/crates/node-builder/src/builder.rs index 03d99a590f..b8c70c531c 100644 --- a/crates/node-builder/src/builder.rs +++ b/crates/node-builder/src/builder.rs @@ -41,10 +41,7 @@ use reth_node_core::{ primitives::{kzg::KzgSettings, Head}, utils::write_peers_to_file, }; -use reth_primitives::{ - constants::eip4844::{LoadKzgSettingsError, MAINNET_KZG_TRUSTED_SETUP}, - format_ether, ChainSpec, -}; +use reth_primitives::{constants::eip4844::MAINNET_KZG_TRUSTED_SETUP, format_ether, ChainSpec}; use reth_provider::{providers::BlockchainProvider, ChainSpecProvider, ProviderFactory}; use reth_prune::PrunerBuilder; use reth_revm::EvmProcessorFactory; @@ -1104,16 +1101,9 @@ impl BuilderContext { self.config().txpool.pool_config() } - /// Loads the trusted setup params from a given file path or falls back to - /// `MAINNET_KZG_TRUSTED_SETUP`. + /// Loads `MAINNET_KZG_TRUSTED_SETUP`. pub fn kzg_settings(&self) -> eyre::Result> { - if let Some(ref trusted_setup_file) = self.config().trusted_setup_file { - let trusted_setup = KzgSettings::load_trusted_setup_file(trusted_setup_file) - .map_err(LoadKzgSettingsError::KzgError)?; - Ok(Arc::new(trusted_setup)) - } else { - Ok(Arc::clone(&MAINNET_KZG_TRUSTED_SETUP)) - } + Ok(Arc::clone(&MAINNET_KZG_TRUSTED_SETUP)) } /// Returns the config for payload building. diff --git a/crates/node-core/src/node_config.rs b/crates/node-core/src/node_config.rs index e6fb0aec73..97a1be1749 100644 --- a/crates/node-core/src/node_config.rs +++ b/crates/node-core/src/node_config.rs @@ -41,9 +41,7 @@ use reth_network::{ }; use reth_node_api::ConfigureEvm; use reth_primitives::{ - constants::eip4844::{LoadKzgSettingsError, MAINNET_KZG_TRUSTED_SETUP}, - kzg::KzgSettings, - stage::StageId, + constants::eip4844::MAINNET_KZG_TRUSTED_SETUP, kzg::KzgSettings, stage::StageId, BlockHashOrNumber, BlockNumber, ChainSpec, Head, SealedHeader, TxHash, B256, MAINNET, }; use reth_provider::{ @@ -169,9 +167,6 @@ pub struct NodeConfig { /// - WS_RPC_PORT: default + `instance` * 2 - 2 pub instance: u16, - /// Overrides the KZG trusted setup by reading from the supplied file. - pub trusted_setup_file: Option, - /// All networking related arguments pub network: NetworkArgs, @@ -235,12 +230,6 @@ impl NodeConfig { self } - /// Set the trusted setup file for the node - pub fn with_trusted_setup_file(mut self, trusted_setup_file: impl Into) -> Self { - self.trusted_setup_file = Some(trusted_setup_file.into()); - self - } - /// Set the network args for the node pub fn with_network(mut self, network: NetworkArgs) -> Self { self.network = network; @@ -594,16 +583,9 @@ impl NodeConfig { Ok(pipeline) } - /// Loads the trusted setup params from a given file path or falls back to - /// `MAINNET_KZG_TRUSTED_SETUP`. + /// Loads 'MAINNET_KZG_TRUSTED_SETUP' pub fn kzg_settings(&self) -> eyre::Result> { - if let Some(ref trusted_setup_file) = self.trusted_setup_file { - let trusted_setup = KzgSettings::load_trusted_setup_file(trusted_setup_file) - .map_err(LoadKzgSettingsError::KzgError)?; - Ok(Arc::new(trusted_setup)) - } else { - Ok(Arc::clone(&MAINNET_KZG_TRUSTED_SETUP)) - } + Ok(Arc::clone(&MAINNET_KZG_TRUSTED_SETUP)) } /// Installs the prometheus recorder. @@ -729,7 +711,7 @@ impl NodeConfig { // try to look up the header in the database if let Some(header) = header { info!(target: "reth::cli", ?tip, "Successfully looked up tip block in the database"); - return Ok(header.number) + return Ok(header.number); } Ok(self.fetch_tip_from_network(client, tip.into()).await?.number) @@ -751,7 +733,7 @@ impl NodeConfig { match get_single_header(&client, tip).await { Ok(tip_header) => { info!(target: "reth::cli", ?tip, "Successfully fetched tip"); - return Ok(tip_header) + return Ok(tip_header); } Err(error) => { error!(target: "reth::cli", %error, "Failed to fetch the tip. Retrying..."); @@ -924,7 +906,6 @@ impl Default for NodeConfig { chain: MAINNET.clone(), metrics: None, instance: 1, - trusted_setup_file: None, network: NetworkArgs::default(), rpc: RpcServerArgs::default(), txpool: TxPoolArgs::default(),