Skip to content

Commit

Permalink
fix sepolia spec
Browse files Browse the repository at this point in the history
  • Loading branch information
invocamanman committed Oct 3, 2024
1 parent 7c97db5 commit b5ad4ef
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions crates/primitives/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use reth_chainspec::{
BaseFeeParams, BaseFeeParamsKind, Chain, ChainHardforks, ChainSpec, DepositContract,
EthereumHardfork, ForkCondition, OptimismHardfork,
};
use reth_primitives::{constants::ETHEREUM_BLOCK_GAS_LIMIT, MAINNET_GENESIS_HASH};
use reth_primitives::{constants::ETHEREUM_BLOCK_GAS_LIMIT, MAINNET_GENESIS_HASH, SEPOLIA_GENESIS_HASH};
use revm_primitives::{address, b256, U256};

/// Returns the [ChainSpec] for Ethereum mainnet.
Expand Down Expand Up @@ -124,8 +124,8 @@ pub fn sepolia() -> ChainSpec {
chain: Chain::sepolia(),
// We don't need the genesis state. Using default to save cycles.
genesis: Default::default(),
genesis_hash: Some(MAINNET_GENESIS_HASH),
paris_block_and_final_difficulty: Some((0, U256::ZERO)),
genesis_hash: Some(SEPOLIA_GENESIS_HASH),
paris_block_and_final_difficulty: Some((1735371, U256::from(17_000_000_000_000_000u64))),
// For some reasons a state root mismatch error arises if we don't force activate everything
// before and including Shanghai.
hardforks: ChainHardforks::new(vec![
Expand All @@ -141,23 +141,21 @@ pub fn sepolia() -> ChainSpec {
(EthereumHardfork::MuirGlacier.boxed(), ForkCondition::Block(0)),
(EthereumHardfork::Berlin.boxed(), ForkCondition::Block(0)),
(EthereumHardfork::London.boxed(), ForkCondition::Block(0)),
(EthereumHardfork::ArrowGlacier.boxed(), ForkCondition::Block(0)),
(EthereumHardfork::GrayGlacier.boxed(), ForkCondition::Block(0)),
(
EthereumHardfork::Paris.boxed(),
ForkCondition::TTD { fork_block: Some(0), total_difficulty: U256::ZERO },
ForkCondition::TTD { fork_block: Some(1735371), total_difficulty: U256::from(17_000_000_000_000_000u64) },
),
(EthereumHardfork::Shanghai.boxed(), ForkCondition::Timestamp(0)),
(EthereumHardfork::Cancun.boxed(), ForkCondition::Timestamp(1710338135)),
(EthereumHardfork::Shanghai.boxed(), ForkCondition::Timestamp(1677557088)),
(EthereumHardfork::Cancun.boxed(), ForkCondition::Timestamp(1706655072)),
]),
deposit_contract: Some(DepositContract::new(
address!("00000000219ab540356cbb839cbe05303d7705fa"),
11052984,
address!("7f02c3e3c98b133055b8b348b2ac625669ed295d"),
1273020,
b256!("649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5"),
)),
base_fee_params: BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()),
max_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
prune_delete_limit: 20000,
prune_delete_limit: 10000,
};
spec.genesis.config.dao_fork_support = true;
spec
Expand Down

0 comments on commit b5ad4ef

Please sign in to comment.