mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: rm chainspec max gas limit (#13308)
This commit is contained in:
@ -49,9 +49,6 @@ pub trait EthChainSpec: Send + Sync + Unpin + Debug {
|
||||
/// The genesis block specification.
|
||||
fn genesis(&self) -> &Genesis;
|
||||
|
||||
/// The block gas limit.
|
||||
fn max_gas_limit(&self) -> u64;
|
||||
|
||||
/// The bootnodes for the chain, if any.
|
||||
fn bootnodes(&self) -> Option<Vec<NodeRecord>>;
|
||||
|
||||
@ -105,10 +102,6 @@ impl EthChainSpec for ChainSpec {
|
||||
self.genesis()
|
||||
}
|
||||
|
||||
fn max_gas_limit(&self) -> u64 {
|
||||
self.max_gas_limit
|
||||
}
|
||||
|
||||
fn bootnodes(&self) -> Option<Vec<NodeRecord>> {
|
||||
self.bootnodes()
|
||||
}
|
||||
|
||||
@ -1,8 +1,15 @@
|
||||
pub use alloy_eips::eip1559::BaseFeeParams;
|
||||
|
||||
use crate::{constants::MAINNET_DEPOSIT_CONTRACT, once_cell_set, EthChainSpec, LazyLock, OnceLock};
|
||||
use alloc::{boxed::Box, sync::Arc, vec::Vec};
|
||||
use alloy_chains::{Chain, NamedChain};
|
||||
use alloy_consensus::constants::EMPTY_WITHDRAWALS;
|
||||
use alloy_consensus::{
|
||||
constants::{
|
||||
DEV_GENESIS_HASH, EMPTY_WITHDRAWALS, HOLESKY_GENESIS_HASH, MAINNET_GENESIS_HASH,
|
||||
SEPOLIA_GENESIS_HASH,
|
||||
},
|
||||
Header,
|
||||
};
|
||||
use alloy_eips::{
|
||||
eip1559::INITIAL_BASE_FEE, eip6110::MAINNET_DEPOSIT_CONTRACT_ADDRESS,
|
||||
eip7685::EMPTY_REQUESTS_HASH,
|
||||
@ -10,14 +17,6 @@ use alloy_eips::{
|
||||
use alloy_genesis::Genesis;
|
||||
use alloy_primitives::{address, b256, Address, BlockNumber, B256, U256};
|
||||
use derive_more::From;
|
||||
|
||||
use alloy_consensus::{
|
||||
constants::{
|
||||
DEV_GENESIS_HASH, HOLESKY_GENESIS_HASH, MAINNET_GENESIS_HASH, SEPOLIA_GENESIS_HASH,
|
||||
},
|
||||
Header,
|
||||
};
|
||||
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT;
|
||||
use reth_ethereum_forks::{
|
||||
ChainHardforks, DisplayHardforks, EthereumHardfork, EthereumHardforks, ForkCondition,
|
||||
ForkFilter, ForkFilterKey, ForkHash, ForkId, Hardfork, Hardforks, Head, DEV_HARDFORKS,
|
||||
@ -29,8 +28,6 @@ use reth_network_peers::{
|
||||
use reth_primitives_traits::SealedHeader;
|
||||
use reth_trie_common::root::state_root_ref_unhashed;
|
||||
|
||||
use crate::{constants::MAINNET_DEPOSIT_CONTRACT, once_cell_set, EthChainSpec, LazyLock, OnceLock};
|
||||
|
||||
/// The Ethereum mainnet spec
|
||||
pub static MAINNET: LazyLock<Arc<ChainSpec>> = LazyLock::new(|| {
|
||||
let mut spec = ChainSpec {
|
||||
@ -52,7 +49,6 @@ pub static MAINNET: LazyLock<Arc<ChainSpec>> = LazyLock::new(|| {
|
||||
b256!("649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5"),
|
||||
)),
|
||||
base_fee_params: BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()),
|
||||
max_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
prune_delete_limit: 20000,
|
||||
};
|
||||
spec.genesis.config.dao_fork_support = true;
|
||||
@ -77,7 +73,6 @@ pub static SEPOLIA: LazyLock<Arc<ChainSpec>> = LazyLock::new(|| {
|
||||
b256!("649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5"),
|
||||
)),
|
||||
base_fee_params: BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()),
|
||||
max_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
prune_delete_limit: 10000,
|
||||
};
|
||||
spec.genesis.config.dao_fork_support = true;
|
||||
@ -100,7 +95,6 @@ pub static HOLESKY: LazyLock<Arc<ChainSpec>> = LazyLock::new(|| {
|
||||
b256!("649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5"),
|
||||
)),
|
||||
base_fee_params: BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()),
|
||||
max_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
prune_delete_limit: 10000,
|
||||
};
|
||||
spec.genesis.config.dao_fork_support = true;
|
||||
@ -208,9 +202,6 @@ pub struct ChainSpec {
|
||||
/// The parameters that configure how a block's base fee is computed
|
||||
pub base_fee_params: BaseFeeParamsKind,
|
||||
|
||||
/// The maximum gas limit
|
||||
pub max_gas_limit: u64,
|
||||
|
||||
/// The delete limit for pruner, per run.
|
||||
pub prune_delete_limit: usize,
|
||||
}
|
||||
@ -226,7 +217,6 @@ impl Default for ChainSpec {
|
||||
hardforks: Default::default(),
|
||||
deposit_contract: Default::default(),
|
||||
base_fee_params: BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()),
|
||||
max_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
prune_delete_limit: MAINNET.prune_delete_limit,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user