Skip to content

Commit

Permalink
chore: Update Maili Deps (#978)
Browse files Browse the repository at this point in the history
  • Loading branch information
refcell authored Jan 30, 2025
1 parent ebdc804 commit 32e5211
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 81 deletions.
84 changes: 35 additions & 49 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ kona-preimage = { path = "crates/proof-sdk/preimage", version = "0.2.1", default
kona-std-fpvm-proc = { path = "crates/proof-sdk/std-fpvm-proc", version = "0.1.2", default-features = false }

# Maili
maili-rpc = { version = "0.1.9", default-features = false }
maili-protocol = { version = "0.1.9", default-features = false }
maili-registry = { version = "0.1.9", default-features = false }
maili-genesis = { version = "0.1.9", default-features = false }
maili-rpc = { version = "0.1.11", default-features = false }
maili-protocol = { version = "0.1.11", default-features = false }
maili-registry = { version = "0.1.11", default-features = false }
maili-genesis = { version = "0.1.11", default-features = false }

# Alloy
alloy-rlp = { version = "0.3.11", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ workspace = true
kona-mpt.workspace = true

# Maili
maili-genesis.workspace = true
maili-genesis = { workspace = true, features = ["revm"] }

# Alloy
alloy-consensus = { workspace = true, features = ["k256"] }
Expand Down
27 changes: 1 addition & 26 deletions crates/executor/src/executor/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,6 @@ where
P: TrieDBProvider,
H: TrieHinter,
{
/// Returns the active [SpecId] for the executor.
///
/// ## Takes
/// - `timestamp`: The timestamp of the executing block.
///
/// ## Returns
/// The active [SpecId] for the executor.
pub(crate) fn revm_spec_id(&self, timestamp: u64) -> SpecId {
if self.config.is_isthmus_active(timestamp) {
SpecId::ISTHMUS
} else if self.config.is_holocene_active(timestamp) {
SpecId::HOLOCENE
} else if self.config.is_fjord_active(timestamp) {
SpecId::FJORD
} else if self.config.is_ecotone_active(timestamp) {
SpecId::ECOTONE
} else if self.config.is_canyon_active(timestamp) {
SpecId::CANYON
} else if self.config.is_regolith_active(timestamp) {
SpecId::REGOLITH
} else {
SpecId::BEDROCK
}
}

/// Returns the active [CfgEnvWithHandlerCfg] for the executor.
///
/// ## Takes
Expand All @@ -54,7 +29,7 @@ where
pub(crate) fn evm_cfg_env(&self, timestamp: u64) -> CfgEnvWithHandlerCfg {
let cfg_env = CfgEnv::default().with_chain_id(self.config.l2_chain_id);
let mut cfg_handler_env =
CfgEnvWithHandlerCfg::new_with_spec_id(cfg_env, self.revm_spec_id(timestamp));
CfgEnvWithHandlerCfg::new_with_spec_id(cfg_env, self.config.spec_id(timestamp));
cfg_handler_env.enable_optimism();
cfg_handler_env
}
Expand Down
2 changes: 1 addition & 1 deletion crates/executor/src/executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ where
&payload,
)?;
let initialized_block_env = Self::prepare_block_env(
self.revm_spec_id(payload.payload_attributes.timestamp),
self.config.spec_id(payload.payload_attributes.timestamp),
self.trie_db.parent_block_header(),
&payload,
&base_fee_params,
Expand Down

0 comments on commit 32e5211

Please sign in to comment.