Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename PRAGUE_EOF to OSAKA #1822

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bins/revme/src/cmd/statetest/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
};
Expand Down
2 changes: 1 addition & 1 deletion crates/precompile/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
20 changes: 10 additions & 10 deletions crates/primitives/src/specification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down Expand Up @@ -68,7 +68,7 @@ pub enum SpecId {
GRANITE = 23,
HOLOCENE = 24,
PRAGUE = 25,
PRAGUE_EOF = 26,
OSAKA = 26,
#[default]
LATEST = u8::MAX,
}
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -153,7 +153,7 @@ impl From<SpecId> 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")]
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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
}
}
Expand Down Expand Up @@ -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 => {
Expand Down Expand Up @@ -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));
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/revm/src/context/evm_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ impl<DB: Database> EvmContext<DB> {
}

// 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);
}

Expand Down
2 changes: 1 addition & 1 deletion crates/revm/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ impl<EXT, DB: Database> 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(
Expand Down