Skip to content

Commit

Permalink
disable beacon call root in l2
Browse files Browse the repository at this point in the history
  • Loading branch information
xqft committed Nov 22, 2024
1 parent d20df52 commit 43d807b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion crates/l2/prover/zkvm/interface/guest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ zkvm_interface = { path = "../" }

ethrex-core = { path = "../../../../../common", default-features = false }
ethrex-rlp = { path = "../../../../../common/rlp" }
ethrex-vm = { path = "../../../../../vm", default-features = false }
ethrex-vm = { path = "../../../../../vm", default-features = false, features = [
"l2",
] }
ethrex-blockchain = { path = "../../../../../blockchain", default-features = false }

[build-dependencies]
Expand Down
9 changes: 7 additions & 2 deletions crates/vm/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,13 @@ cfg_if::cfg_if! {
let block_header = &block.header;
let spec_id = spec_id(&state.chain_config()?, block_header.timestamp);
//eip 4788: execute beacon_root_contract_call before block transactions
if block_header.parent_beacon_block_root.is_some() && spec_id == SpecId::CANCUN {
beacon_root_contract_call(state, block_header, spec_id)?;
cfg_if::cfg_if! {
if #[cfg(not(feature = "l2"))] {
//eip 4788: execute beacon_root_contract_call before block transactions
if block_header.parent_beacon_block_root.is_some() && spec_id == SpecId::CANCUN {
beacon_root_contract_call(state, block_header, spec_id)?;
}
}
}
let mut receipts = Vec::new();
let mut cumulative_gas_used = 0;
Expand Down

0 comments on commit 43d807b

Please sign in to comment.