Skip to content

Commit

Permalink
add frontier by default on genesis to chainspec impl
Browse files Browse the repository at this point in the history
  • Loading branch information
joshieDo committed Jan 27, 2025
1 parent 33bf34b commit 1d271cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/chainspec/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ impl From<Genesis> for ChainSpec {
fn from(genesis: Genesis) -> Self {
// Block-based hardforks
let hardfork_opts = [
(EthereumHardfork::Frontier.boxed(), Some(0)),
(EthereumHardfork::Homestead.boxed(), genesis.config.homestead_block),
(EthereumHardfork::Dao.boxed(), genesis.config.dao_fork_block),
(EthereumHardfork::Tangerine.boxed(), genesis.config.eip150_block),
Expand Down Expand Up @@ -2367,6 +2368,7 @@ Post-merge hard forks (timestamp based):

let hardforks: Vec<_> = chain_spec.hardforks.forks_iter().map(|(h, _)| h).collect();
let expected_hardforks = vec![
EthereumHardfork::Frontier.boxed(),
EthereumHardfork::Homestead.boxed(),
EthereumHardfork::Dao.boxed(),
EthereumHardfork::Tangerine.boxed(),
Expand Down
2 changes: 2 additions & 0 deletions crates/optimism/chainspec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ impl From<Genesis> for OpChainSpec {

// Block-based hardforks
let hardfork_opts = [
(EthereumHardfork::Frontier.boxed(), Some(0)),
(EthereumHardfork::Homestead.boxed(), genesis.config.homestead_block),
(EthereumHardfork::Tangerine.boxed(), genesis.config.eip150_block),
(EthereumHardfork::SpuriousDragon.boxed(), genesis.config.eip155_block),
Expand Down Expand Up @@ -987,6 +988,7 @@ mod tests {

let hardforks: Vec<_> = chain_spec.hardforks.forks_iter().map(|(h, _)| h).collect();
let expected_hardforks = vec![
EthereumHardfork::Frontier.boxed(),
EthereumHardfork::Homestead.boxed(),
EthereumHardfork::Tangerine.boxed(),
EthereumHardfork::SpuriousDragon.boxed(),
Expand Down

0 comments on commit 1d271cf

Please sign in to comment.