Skip to content

Fix replay use fallback #4039

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

Draft
wants to merge 12 commits into
base: fix_execution_witness_serde
Choose a base branch
from
171 changes: 169 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion cmd/ef_tests/blockchain/test_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ async fn re_run_stateless(

let program_input = ProgramInput {
blocks,
db: witness,
db: ethrex_vm::prover_db::WitnessProof::Witness(witness),
elasticity_multiplier: ethrex_common::types::ELASTICITY_MULTIPLIER,
..Default::default()
};
Expand Down
12 changes: 11 additions & 1 deletion cmd/ethrex_replay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ ethrex-common.workspace = true
ethrex-vm.workspace = true
ethrex-levm.workspace = true
ethrex-rpc.workspace = true
ethrex-p2p.workspace = true
ethrex-storage.workspace = true
ethrex-trie.workspace = true
ethrex-rlp.workspace = true

ethrex-l2 = { path = "../../crates/l2", default-features = false }
zkvm_interface = { path = "../../crates/l2/prover/zkvm/interface", default-features = false }
ethrex-prover = { path = "../../crates/l2/prover", default-features = false }

Expand All @@ -24,12 +29,17 @@ eyre.workspace = true
tokio = { version = "1.21", default-features = false, features = ["full"] }
clap.workspace = true
charming = { version = "0.4.0", features = ["ssr"] }
lazy_static.workspace = true
bytes.workspace = true
again = "0.1.2"
futures-util = "0.3.31"
tokio-utils = "0.1.2"


[features]
risc0 = ["zkvm_interface/risc0", "ethrex-prover/risc0"]
sp1 = ["zkvm_interface/sp1", "ethrex-prover/sp1"]
gpu = ["ethrex-prover/gpu"]
l2 = ["zkvm_interface/l2", "ethrex-prover/l2"]
l2 = ["zkvm_interface/l2", "ethrex-prover/l2", "ethrex-l2/l2"]
profiling = ["ethrex-prover/profiling"]
ci = []
9 changes: 5 additions & 4 deletions cmd/ethrex_replay/src/cache.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use ethrex_common::types::Block;
use ethrex_common::types::blobs_bundle;
use ethrex_common::types::{Block, block_execution_witness::ExecutionWitnessResult};
use ethrex_vm::prover_db::WitnessProof;
use serde::{Deserialize, Serialize};
use serde_with::serde_as;
use std::{
Expand All @@ -19,17 +20,17 @@ pub struct L2Fields {
#[derive(Serialize, Deserialize)]
pub struct Cache {
pub blocks: Vec<Block>,
pub witness: ExecutionWitnessResult,
pub proof: WitnessProof,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(flatten)]
pub l2_fields: Option<L2Fields>,
}

impl Cache {
pub fn new(blocks: Vec<Block>, witness: ExecutionWitnessResult) -> Self {
pub fn new(blocks: Vec<Block>, proof: WitnessProof) -> Self {
Self {
blocks,
witness,
proof,
l2_fields: None,
}
}
Expand Down
Loading
Loading