diff --git a/bins/revme/src/cmd/statetest/runner.rs b/bins/revme/src/cmd/statetest/runner.rs index de9aaec269..7ac4564c5e 100644 --- a/bins/revme/src/cmd/statetest/runner.rs +++ b/bins/revme/src/cmd/statetest/runner.rs @@ -336,7 +336,7 @@ pub fn execute_test_suite( // Enable EOF in Prague tests. let spec_id = if spec_name == SpecName::Prague { - SpecId::PRAGUE_EOF + SpecId::OSAKA } else { spec_name.to_spec_id() }; diff --git a/crates/precompile/src/lib.rs b/crates/precompile/src/lib.rs index 1167028e9f..55eeee9fe5 100644 --- a/crates/precompile/src/lib.rs +++ b/crates/precompile/src/lib.rs @@ -292,7 +292,7 @@ impl PrecompileSpecId { ISTANBUL | MUIR_GLACIER => Self::ISTANBUL, BERLIN | LONDON | ARROW_GLACIER | GRAY_GLACIER | MERGE | SHANGHAI => Self::BERLIN, CANCUN => Self::CANCUN, - PRAGUE | PRAGUE_EOF => Self::PRAGUE, + PRAGUE | OSAKA => Self::PRAGUE, LATEST => Self::LATEST, #[cfg(feature = "optimism")] BEDROCK | REGOLITH | CANYON => Self::BERLIN, diff --git a/crates/primitives/src/specification.rs b/crates/primitives/src/specification.rs index 13ade0f4d6..e28a944cc7 100644 --- a/crates/primitives/src/specification.rs +++ b/crates/primitives/src/specification.rs @@ -29,7 +29,7 @@ pub enum SpecId { SHANGHAI = 16, // Shanghai 17034870 (Timestamp: 1681338455) CANCUN = 17, // Cancun 19426587 (Timestamp: 1710338135) PRAGUE = 18, // Prague TBD - PRAGUE_EOF = 19, // Prague+EOF TBD + OSAKA = 19, // Prague+EOF TBD #[default] LATEST = u8::MAX, } @@ -68,7 +68,7 @@ pub enum SpecId { GRANITE = 23, HOLOCENE = 24, PRAGUE = 25, - PRAGUE_EOF = 26, + OSAKA = 26, #[default] LATEST = u8::MAX, } @@ -111,7 +111,7 @@ impl From<&str> for SpecId { "Shanghai" => Self::SHANGHAI, "Cancun" => Self::CANCUN, "Prague" => Self::PRAGUE, - "PragueEOF" => Self::PRAGUE_EOF, + "Osaka" => Self::OSAKA, #[cfg(feature = "optimism")] "Bedrock" => SpecId::BEDROCK, #[cfg(feature = "optimism")] @@ -153,7 +153,7 @@ impl From for &'static str { SpecId::SHANGHAI => "Shanghai", SpecId::CANCUN => "Cancun", SpecId::PRAGUE => "Prague", - SpecId::PRAGUE_EOF => "PragueEOF", + SpecId::OSAKA => "Osaka", #[cfg(feature = "optimism")] SpecId::BEDROCK => "Bedrock", #[cfg(feature = "optimism")] @@ -214,7 +214,7 @@ spec!(MERGE, MergeSpec); spec!(SHANGHAI, ShanghaiSpec); spec!(CANCUN, CancunSpec); spec!(PRAGUE, PragueSpec); -spec!(PRAGUE_EOF, PragueEofSpec); +spec!(OSAKA, OsakaSpec); spec!(LATEST, LatestSpec); @@ -297,8 +297,8 @@ macro_rules! spec_to_generic { use $crate::PragueSpec as SPEC; $e } - $crate::SpecId::PRAGUE_EOF => { - use $crate::PragueEofSpec as SPEC; + $crate::SpecId::OSAKA => { + use $crate::OsakaSpec as SPEC; $e } } @@ -368,8 +368,8 @@ macro_rules! spec_to_generic { use $crate::PragueSpec as SPEC; $e } - $crate::SpecId::PRAGUE_EOF => { - use $crate::PragueEofSpec as SPEC; + $crate::SpecId::OSAKA => { + use $crate::OsakaSpec as SPEC; $e } $crate::SpecId::BEDROCK => { @@ -445,7 +445,7 @@ mod tests { #[cfg(feature = "optimism")] spec_to_generic!(HOLOCENE, assert_eq!(SPEC::SPEC_ID, HOLOCENE)); spec_to_generic!(PRAGUE, assert_eq!(SPEC::SPEC_ID, PRAGUE)); - spec_to_generic!(PRAGUE_EOF, assert_eq!(SPEC::SPEC_ID, PRAGUE_EOF)); + spec_to_generic!(OSAKA, assert_eq!(SPEC::SPEC_ID, OSAKA)); spec_to_generic!(LATEST, assert_eq!(SPEC::SPEC_ID, LATEST)); } } diff --git a/crates/revm/src/context/evm_context.rs b/crates/revm/src/context/evm_context.rs index 9a432b81f9..206bd6129c 100644 --- a/crates/revm/src/context/evm_context.rs +++ b/crates/revm/src/context/evm_context.rs @@ -282,7 +282,7 @@ impl EvmContext { } // Prague EOF - if spec_id.is_enabled_in(PRAGUE_EOF) && inputs.init_code.starts_with(&EOF_MAGIC_BYTES) { + if spec_id.is_enabled_in(OSAKA) && inputs.init_code.starts_with(&EOF_MAGIC_BYTES) { return return_error(InstructionResult::CreateInitCodeStartingEF00); } diff --git a/crates/revm/src/evm.rs b/crates/revm/src/evm.rs index fb5e9f3f2e..88ac100e01 100644 --- a/crates/revm/src/evm.rs +++ b/crates/revm/src/evm.rs @@ -348,7 +348,7 @@ impl Evm<'_, EXT, DB> { )?, TxKind::Create => { // if first byte of data is magic 0xEF00, then it is EOFCreate. - if spec_id.is_enabled_in(SpecId::PRAGUE_EOF) + if spec_id.is_enabled_in(SpecId::OSAKA) && ctx.env().tx.data.starts_with(&EOF_MAGIC_BYTES) { exec.eofcreate(