Skip to content

Commit 72a085e

Browse files
committed
fix specs and conditional op/taiko flags, todo: taiko handlers
1 parent 3ec69ee commit 72a085e

File tree

12 files changed

+103
-586
lines changed

12 files changed

+103
-586
lines changed

crates/interpreter/src/instruction_result.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl From<HaltReason> for InstructionResult {
8787
HaltReason::CallNotAllowedInsideStatic => Self::CallNotAllowedInsideStatic,
8888
HaltReason::OutOfFunds => Self::OutOfFunds,
8989
HaltReason::CallTooDeep => Self::CallTooDeep,
90-
#[cfg(feature = "optimism")]
90+
#[cfg(all(feature = "optimism", not(feature = "taiko")))]
9191
HaltReason::FailedDeposit => Self::FatalExternalError,
9292
}
9393
}

crates/interpreter/src/instructions/opcode.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -857,21 +857,26 @@ pub const fn spec_opcode_gas(spec_id: SpecId) -> &'static [OpInfo; 256] {
857857
TABLE
858858
}
859859
)*
860-
#[cfg(feature = "optimism")]
860+
#[cfg(all(feature = "optimism", not(feature = "taiko")))]
861861
SpecId::BEDROCK => {
862862
const TABLE: &[OpInfo;256] = &make_gas_table(SpecId::BEDROCK);
863863
TABLE
864864
}
865-
#[cfg(feature = "optimism")]
865+
#[cfg(all(feature = "optimism", not(feature = "taiko")))]
866866
SpecId::REGOLITH => {
867867
const TABLE: &[OpInfo;256] = &make_gas_table(SpecId::REGOLITH);
868868
TABLE
869869
}
870-
#[cfg(feature = "optimism")]
870+
#[cfg(all(feature = "optimism", not(feature = "taiko")))]
871871
SpecId::CANYON => {
872872
const TABLE: &[OpInfo;256] = &make_gas_table(SpecId::CANYON);
873873
TABLE
874874
}
875+
#[cfg(all(feature = "taiko", not(feature = "optimism")))]
876+
SpecId::KATLA => {
877+
const TABLE: &[OpInfo;256] = &make_gas_table(SpecId::KATLA);
878+
TABLE
879+
}
875880
}
876881
};
877882
}

crates/precompile/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,10 @@ impl PrecompileSpecId {
256256
BERLIN | LONDON | ARROW_GLACIER | GRAY_GLACIER | MERGE | SHANGHAI => Self::BERLIN,
257257
CANCUN => Self::CANCUN,
258258
LATEST => Self::LATEST,
259-
#[cfg(feature = "optimism")]
259+
#[cfg(all(feature = "optimism", not(feature = "taiko")))]
260260
BEDROCK | REGOLITH | CANYON => Self::BERLIN,
261+
#[cfg(all(feature = "taiko", not(feature = "optimism")))]
262+
KATLA => Self::BERLIN, // TODO(Cecilia): what is this?
261263
}
262264
}
263265
}

0 commit comments

Comments
 (0)