From 97f7fac299562c470dc9553e4cd6c39806fda555 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Fri, 13 Dec 2024 10:45:41 -0500 Subject: [PATCH 1/2] Hack, return holocene revm spec id --- crates/optimism/evm/src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/optimism/evm/src/config.rs b/crates/optimism/evm/src/config.rs index b32b0929424d..54621418dea3 100644 --- a/crates/optimism/evm/src/config.rs +++ b/crates/optimism/evm/src/config.rs @@ -13,7 +13,7 @@ pub fn revm_spec_by_timestamp_after_bedrock( timestamp: u64, ) -> revm_primitives::SpecId { if chain_spec.fork(OpHardfork::Isthmus).active_at_timestamp(timestamp) { - todo!() + revm_primitives::HOLOCENE // todo: replace } else if chain_spec.fork(OpHardfork::Holocene).active_at_timestamp(timestamp) { revm_primitives::HOLOCENE } else if chain_spec.fork(OpHardfork::Granite).active_at_timestamp(timestamp) { @@ -34,7 +34,7 @@ pub fn revm_spec_by_timestamp_after_bedrock( /// Map the latest active hardfork at the given block to a revm [`SpecId`](revm_primitives::SpecId). pub fn revm_spec(chain_spec: &OpChainSpec, block: &Head) -> revm_primitives::SpecId { if chain_spec.fork(OpHardfork::Isthmus).active_at_head(block) { - todo!() + revm_primitives::HOLOCENE // todo: replace } else if chain_spec.fork(OpHardfork::Holocene).active_at_head(block) { revm_primitives::HOLOCENE } else if chain_spec.fork(OpHardfork::Granite).active_at_head(block) { From 7825a2707add25a57a489c581e3d2a976c574914 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Fri, 13 Dec 2024 13:45:42 -0500 Subject: [PATCH 2/2] Fix lint --- crates/optimism/evm/src/config.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/optimism/evm/src/config.rs b/crates/optimism/evm/src/config.rs index 54621418dea3..e595b653ed18 100644 --- a/crates/optimism/evm/src/config.rs +++ b/crates/optimism/evm/src/config.rs @@ -12,10 +12,10 @@ pub fn revm_spec_by_timestamp_after_bedrock( chain_spec: &OpChainSpec, timestamp: u64, ) -> revm_primitives::SpecId { - if chain_spec.fork(OpHardfork::Isthmus).active_at_timestamp(timestamp) { + if chain_spec.fork(OpHardfork::Isthmus).active_at_timestamp(timestamp) || + chain_spec.fork(OpHardfork::Holocene).active_at_timestamp(timestamp) + { revm_primitives::HOLOCENE // todo: replace - } else if chain_spec.fork(OpHardfork::Holocene).active_at_timestamp(timestamp) { - revm_primitives::HOLOCENE } else if chain_spec.fork(OpHardfork::Granite).active_at_timestamp(timestamp) { revm_primitives::GRANITE } else if chain_spec.fork(OpHardfork::Fjord).active_at_timestamp(timestamp) { @@ -33,10 +33,10 @@ pub fn revm_spec_by_timestamp_after_bedrock( /// Map the latest active hardfork at the given block to a revm [`SpecId`](revm_primitives::SpecId). pub fn revm_spec(chain_spec: &OpChainSpec, block: &Head) -> revm_primitives::SpecId { - if chain_spec.fork(OpHardfork::Isthmus).active_at_head(block) { + if chain_spec.fork(OpHardfork::Isthmus).active_at_head(block) || + chain_spec.fork(OpHardfork::Holocene).active_at_head(block) + { revm_primitives::HOLOCENE // todo: replace - } else if chain_spec.fork(OpHardfork::Holocene).active_at_head(block) { - revm_primitives::HOLOCENE } else if chain_spec.fork(OpHardfork::Granite).active_at_head(block) { revm_primitives::GRANITE } else if chain_spec.fork(OpHardfork::Fjord).active_at_head(block) {