chore: remove trusted setups (#7274)

This commit is contained in:
0xAtreides
2024-03-21 16:57:30 +00:00
committed by GitHub
parent f4b5000a80
commit 6eb7397aa2
3 changed files with 8 additions and 43 deletions

View File

@@ -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<Node: FullNodeTypes> BuilderContext<Node> {
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<Arc<KzgSettings>> {
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.