diff --git a/Cargo.lock b/Cargo.lock index 2a7fbe0be0..98939fe944 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9613,6 +9613,7 @@ dependencies = [ "alloy-consensus", "alloy-genesis", "alloy-network", + "alloy-op-hardforks", "alloy-primitives", "alloy-rpc-types-engine", "alloy-rpc-types-eth", diff --git a/crates/optimism/node/Cargo.toml b/crates/optimism/node/Cargo.toml index 8d5a816545..7e79b3a886 100644 --- a/crates/optimism/node/Cargo.toml +++ b/crates/optimism/node/Cargo.toml @@ -83,6 +83,7 @@ reth-rpc-eth-types.workspace = true reth-stages-types.workspace = true alloy-network.workspace = true +alloy-op-hardforks.workspace = true futures.workspace = true op-alloy-network.workspace = true diff --git a/crates/optimism/node/src/engine.rs b/crates/optimism/node/src/engine.rs index 758d7e4a10..92bd5c4b8d 100644 --- a/crates/optimism/node/src/engine.rs +++ b/crates/optimism/node/src/engine.rs @@ -299,23 +299,16 @@ mod test { use super::*; use crate::engine; + use alloy_op_hardforks::BASE_SEPOLIA_JOVIAN_TIMESTAMP; use alloy_primitives::{b64, Address, B256, B64}; use alloy_rpc_types_engine::PayloadAttributes; - use reth_chainspec::{ChainSpec, ForkCondition, Hardfork}; + use reth_chainspec::ChainSpec; use reth_optimism_chainspec::{OpChainSpec, BASE_SEPOLIA}; - use reth_optimism_forks::OpHardfork; use reth_provider::noop::NoopProvider; use reth_trie_common::KeccakKeyHasher; - const JOVIAN_TIMESTAMP: u64 = 1744909000; - fn get_chainspec() -> Arc { - let mut base_sepolia_spec = BASE_SEPOLIA.inner.clone(); - - // TODO: Remove this once we know the Jovian timestamp - base_sepolia_spec - .hardforks - .insert(OpHardfork::Jovian.boxed(), ForkCondition::Timestamp(JOVIAN_TIMESTAMP)); + let base_sepolia_spec = BASE_SEPOLIA.inner.clone(); Arc::new(OpChainSpec { inner: ChainSpec { @@ -427,7 +420,8 @@ mod test { fn test_well_formed_attributes_jovian_valid() { let validator = OpEngineValidator::new::(get_chainspec(), NoopProvider::default()); - let attributes = get_attributes(Some(b64!("0000000000000000")), Some(1), JOVIAN_TIMESTAMP); + let attributes = + get_attributes(Some(b64!("0000000000000000")), Some(1), BASE_SEPOLIA_JOVIAN_TIMESTAMP); let result = as EngineApiValidator< OpEngineTypes, @@ -442,7 +436,7 @@ mod test { fn test_malformed_attributes_jovian_with_eip_1559_params_none() { let validator = OpEngineValidator::new::(get_chainspec(), NoopProvider::default()); - let attributes = get_attributes(None, Some(1), JOVIAN_TIMESTAMP); + let attributes = get_attributes(None, Some(1), BASE_SEPOLIA_JOVIAN_TIMESTAMP); let result = as EngineApiValidator< OpEngineTypes, @@ -472,7 +466,8 @@ mod test { fn test_malformed_attributes_post_jovian_with_min_base_fee_none() { let validator = OpEngineValidator::new::(get_chainspec(), NoopProvider::default()); - let attributes = get_attributes(Some(b64!("0000000000000000")), None, JOVIAN_TIMESTAMP); + let attributes = + get_attributes(Some(b64!("0000000000000000")), None, BASE_SEPOLIA_JOVIAN_TIMESTAMP); let result = as EngineApiValidator< OpEngineTypes,