diff --git a/Cargo.lock b/Cargo.lock index 627c537fa..e818a21de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9333,7 +9333,7 @@ dependencies = [ [[package]] name = "revm" version = "10.0.0" -source = "git+https://github.com/bnb-chain/revm?rev=dfca3edd9732372e19dea88462eaece1e74824f1#dfca3edd9732372e19dea88462eaece1e74824f1" +source = "git+https://github.com/bnb-chain/revm?rev=e4bf75d62e36077fb3904c400332da0376c03383#e4bf75d62e36077fb3904c400332da0376c03383" dependencies = [ "auto_impl", "cfg-if", @@ -9365,7 +9365,7 @@ dependencies = [ [[package]] name = "revm-interpreter" version = "6.0.0" -source = "git+https://github.com/bnb-chain/revm?rev=dfca3edd9732372e19dea88462eaece1e74824f1#dfca3edd9732372e19dea88462eaece1e74824f1" +source = "git+https://github.com/bnb-chain/revm?rev=e4bf75d62e36077fb3904c400332da0376c03383#e4bf75d62e36077fb3904c400332da0376c03383" dependencies = [ "revm-primitives", "serde", @@ -9374,7 +9374,7 @@ dependencies = [ [[package]] name = "revm-precompile" version = "8.0.0" -source = "git+https://github.com/bnb-chain/revm?rev=dfca3edd9732372e19dea88462eaece1e74824f1#dfca3edd9732372e19dea88462eaece1e74824f1" +source = "git+https://github.com/bnb-chain/revm?rev=e4bf75d62e36077fb3904c400332da0376c03383#e4bf75d62e36077fb3904c400332da0376c03383" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9402,7 +9402,7 @@ dependencies = [ [[package]] name = "revm-primitives" version = "5.0.0" -source = "git+https://github.com/bnb-chain/revm?rev=dfca3edd9732372e19dea88462eaece1e74824f1#dfca3edd9732372e19dea88462eaece1e74824f1" +source = "git+https://github.com/bnb-chain/revm?rev=e4bf75d62e36077fb3904c400332da0376c03383#e4bf75d62e36077fb3904c400332da0376c03383" dependencies = [ "alloy-primitives", "auto_impl", diff --git a/Cargo.toml b/Cargo.toml index a633b07fc..a7c9ae4c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -506,11 +506,11 @@ test-fuzz = "5" iai-callgrind = "0.11" [patch.crates-io] -revm = { git = "https://github.com/bnb-chain/revm", rev = "dfca3edd9732372e19dea88462eaece1e74824f1" } -revm-interpreter = { git = "https://github.com/bnb-chain/revm", rev = "dfca3edd9732372e19dea88462eaece1e74824f1" } -revm-precompile = { git = "https://github.com/bnb-chain/revm", rev = "dfca3edd9732372e19dea88462eaece1e74824f1" } -revm-primitives = { git = "https://github.com/bnb-chain/revm", rev = "dfca3edd9732372e19dea88462eaece1e74824f1" } +revm = { git = "https://github.com/bnb-chain/revm", rev = "e4bf75d62e36077fb3904c400332da0376c03383" } +revm-interpreter = { git = "https://github.com/bnb-chain/revm", rev = "e4bf75d62e36077fb3904c400332da0376c03383" } +revm-precompile = { git = "https://github.com/bnb-chain/revm", rev = "e4bf75d62e36077fb3904c400332da0376c03383" } +revm-primitives = { git = "https://github.com/bnb-chain/revm", rev = "e4bf75d62e36077fb3904c400332da0376c03383" } alloy-chains = { git = "https://github.com/bnb-chain/alloy-chains-rs.git", rev = "b7c5379cf47345181f8dce350acafb958f47152a" } [patch."https://github.com/bluealloy/revm"] -revm = { git = "https://github.com/bnb-chain/revm", rev = "dfca3edd9732372e19dea88462eaece1e74824f1" } \ No newline at end of file +revm = { git = "https://github.com/bnb-chain/revm", rev = "e4bf75d62e36077fb3904c400332da0376c03383" } \ No newline at end of file diff --git a/crates/ethereum-forks/src/hardfork.rs b/crates/ethereum-forks/src/hardfork.rs index e8930490f..1d66df0a6 100644 --- a/crates/ethereum-forks/src/hardfork.rs +++ b/crates/ethereum-forks/src/hardfork.rs @@ -97,6 +97,9 @@ pub enum Hardfork { Feynman, /// BSC `FeynmanFix` hardfork FeynmanFix, + /// `Fermat` + #[cfg(all(feature = "optimism", feature = "opbnb"))] + Fermat, /// Canyon: /// . #[cfg(feature = "optimism")] @@ -110,9 +113,6 @@ pub enum Hardfork { /// `PreContractForkBlock` #[cfg(all(feature = "optimism", feature = "opbnb"))] PreContractForkBlock, - /// `Fermat` - #[cfg(all(feature = "optimism", feature = "opbnb"))] - Fermat, // ArbOS20Atlas, /// BSC `Haber` hardfork Haber, diff --git a/crates/primitives/src/revm/config.rs b/crates/primitives/src/revm/config.rs index 928fd9bcb..4a99eb020 100644 --- a/crates/primitives/src/revm/config.rs +++ b/crates/primitives/src/revm/config.rs @@ -11,10 +11,10 @@ pub fn revm_spec_by_timestamp_after_merge( ) -> revm_primitives::SpecId { #[cfg(feature = "optimism")] if chain_spec.is_optimism() { - return if chain_spec.fork(Hardfork::Haber).active_at_timestamp(timestamp) { - revm_primitives::HABER - } else if chain_spec.fork(Hardfork::Fjord).active_at_timestamp(timestamp) { + return if chain_spec.fork(Hardfork::Fjord).active_at_timestamp(timestamp) { revm_primitives::FJORD + } else if chain_spec.fork(Hardfork::Haber).active_at_timestamp(timestamp) { + revm_primitives::HABER } else if chain_spec.fork(Hardfork::Ecotone).active_at_timestamp(timestamp) { revm_primitives::ECOTONE } else if chain_spec.fork(Hardfork::Canyon).active_at_timestamp(timestamp) { @@ -62,10 +62,10 @@ pub fn revm_spec_by_timestamp_after_merge( pub fn revm_spec(chain_spec: &ChainSpec, block: Head) -> revm_primitives::SpecId { #[cfg(feature = "optimism")] if chain_spec.is_optimism() { - if chain_spec.fork(Hardfork::Haber).active_at_head(&block) { - return revm_primitives::HABER - } else if chain_spec.fork(Hardfork::Fjord).active_at_head(&block) { + if chain_spec.fork(Hardfork::Fjord).active_at_head(&block) { return revm_primitives::FJORD + } else if chain_spec.fork(Hardfork::Haber).active_at_head(&block) { + return revm_primitives::HABER } else if chain_spec.fork(Hardfork::Ecotone).active_at_head(&block) { return revm_primitives::ECOTONE } else if chain_spec.fork(Hardfork::Canyon).active_at_head(&block) {