diff --git a/crates/executor/src/config.rs b/crates/executor/src/config.rs index b6b5e4d0a226..3f161a30610d 100644 --- a/crates/executor/src/config.rs +++ b/crates/executor/src/config.rs @@ -20,8 +20,7 @@ pub fn revm_spec(chain_spec: &ChainSpec, for_block: BlockNumber) -> revm::SpecId b if chain_spec.fork_active(Hardfork::Petersburg, b) => revm::PETERSBURG, b if chain_spec.fork_active(Hardfork::Byzantium, b) => revm::BYZANTIUM, b if chain_spec.fork_active(Hardfork::SpuriousDragon, b) => revm::SPURIOUS_DRAGON, - b if chain_spec.fork_active(Hardfork::Eip150, b) => revm::TANGERINE, - b if chain_spec.fork_active(Hardfork::Eip158, b) => revm::TANGERINE, + b if chain_spec.fork_active(Hardfork::Tangerine, b) => revm::TANGERINE, b if chain_spec.fork_active(Hardfork::Homestead, b) => revm::HOMESTEAD, b if chain_spec.fork_active(Hardfork::Frontier, b) => revm::FRONTIER, _ => panic!("wrong configuration"), diff --git a/crates/primitives/src/chain_spec.rs b/crates/primitives/src/chain_spec.rs index ec9f386653ea..bfaa8e0283a5 100644 --- a/crates/primitives/src/chain_spec.rs +++ b/crates/primitives/src/chain_spec.rs @@ -18,8 +18,7 @@ pub static MAINNET: Lazy = Lazy::new(|| ChainSpec { (Hardfork::Frontier, 0), (Hardfork::Homestead, 1150000), (Hardfork::Dao, 1920000), - (Hardfork::Eip150, 2463000), - (Hardfork::Eip158, 2463000), + (Hardfork::Tangerine, 2463000), (Hardfork::SpuriousDragon, 2675000), (Hardfork::Byzantium, 4370000), (Hardfork::Constantinople, 7280000), @@ -201,8 +200,7 @@ impl From for ChainSpec { let hardfork_opts = vec![ (Hardfork::Homestead, genesis.config.homestead_block), (Hardfork::Dao, genesis.config.dao_fork_block), - (Hardfork::Eip150, genesis.config.eip150_block), - (Hardfork::Eip158, genesis.config.eip158_block), + (Hardfork::Tangerine, genesis.config.eip150_block), (Hardfork::SpuriousDragon, genesis.config.eip155_block), (Hardfork::Byzantium, genesis.config.byzantium_block), (Hardfork::Constantinople, genesis.config.constantinople_block), @@ -300,8 +298,7 @@ impl ChainSpecBuilder { /// Enables Tangerine pub fn tangerine_whistle_activated(mut self) -> Self { self = self.homestead_activated(); - self.hardforks.insert(Hardfork::Eip150, 0); - self.hardforks.insert(Hardfork::Eip158, 0); + self.hardforks.insert(Hardfork::Tangerine, 0); self } @@ -440,8 +437,7 @@ mod tests { .genesis_hash(empty_sealed.hash()) .with_fork(Hardfork::Frontier, 0) .with_fork(Hardfork::Homestead, 0) - .with_fork(Hardfork::Eip150, 0) - .with_fork(Hardfork::Eip158, 0) + .with_fork(Hardfork::Tangerine, 0) .with_fork(Hardfork::SpuriousDragon, 0) .with_fork(Hardfork::Byzantium, 0) .with_fork(Hardfork::Constantinople, 0) @@ -481,7 +477,7 @@ mod tests { .genesis_hash(empty_sealed.hash()) .with_fork(Hardfork::Frontier, 0) .with_fork(Hardfork::Homestead, 1) - .with_fork(Hardfork::Eip150, 1) + .with_fork(Hardfork::Tangerine, 1) .build(); assert_eq!(unique_spec.fork_id(2), duplicate_spec.fork_id(2)); diff --git a/crates/primitives/src/hardfork.rs b/crates/primitives/src/hardfork.rs index 0537497f8978..42ea1f160eb2 100644 --- a/crates/primitives/src/hardfork.rs +++ b/crates/primitives/src/hardfork.rs @@ -12,8 +12,7 @@ pub enum Hardfork { Frontier, Homestead, Dao, - Eip150, - Eip158, + Tangerine, SpuriousDragon, Byzantium, Constantinople, @@ -86,19 +85,18 @@ impl FromStr for Hardfork { "frontier" | "1" => Hardfork::Frontier, "homestead" | "2" => Hardfork::Homestead, "dao" | "3" => Hardfork::Dao, - "eip150" | "4" => Hardfork::Eip150, - "eip158" | "5" => Hardfork::Eip158, - "spuriousdragon" | "6" => Hardfork::SpuriousDragon, - "byzantium" | "7" => Hardfork::Byzantium, - "constantinople" | "8" => Hardfork::Constantinople, - "petersburg" | "9" => Hardfork::Petersburg, - "istanbul" | "10" => Hardfork::Istanbul, - "muirglacier" | "11" => Hardfork::Muirglacier, - "berlin" | "12" => Hardfork::Berlin, - "london" | "13" => Hardfork::London, - "arrowglacier" | "14" => Hardfork::ArrowGlacier, + "tangerine" | "4" => Hardfork::Tangerine, + "spuriousdragon" | "5" => Hardfork::SpuriousDragon, + "byzantium" | "6" => Hardfork::Byzantium, + "constantinople" | "7" => Hardfork::Constantinople, + "petersburg" | "8" => Hardfork::Petersburg, + "istanbul" | "9" => Hardfork::Istanbul, + "muirglacier" | "10" => Hardfork::Muirglacier, + "berlin" | "11" => Hardfork::Berlin, + "london" | "12" => Hardfork::London, + "arrowglacier" | "13" => Hardfork::ArrowGlacier, "grayglacier" => Hardfork::GrayGlacier, - "latest" | "15" => Hardfork::Latest, + "latest" | "14" => Hardfork::Latest, _ => return Err(format!("Unknown hardfork {s}")), }; Ok(hardfork)