diff --git a/.github/workflows/main_prover.yaml b/.github/workflows/main_prover.yaml index ae05bbd168..96a71bde52 100644 --- a/.github/workflows/main_prover.yaml +++ b/.github/workflows/main_prover.yaml @@ -34,7 +34,7 @@ jobs: run: | . "$HOME/.cargo/env" curl -L https://sp1.succinct.xyz | bash - ~/.sp1/bin/sp1up --version 4.1.0 + ~/.sp1/bin/sp1up --version 4.1.7 - name: Set up Docker Buildx if: ${{ always() && github.event_name == 'merge_group' }} diff --git a/.github/workflows/pr-main_l2_prover.yaml b/.github/workflows/pr-main_l2_prover.yaml index 1da4a89443..b096cbccda 100644 --- a/.github/workflows/pr-main_l2_prover.yaml +++ b/.github/workflows/pr-main_l2_prover.yaml @@ -30,7 +30,7 @@ jobs: - name: RISC-V SP1 toolchain install run: | curl -L https://sp1.succinct.xyz | bash - ~/.sp1/bin/sp1up --version 4.1.0 + ~/.sp1/bin/sp1up --version 4.1.7 - name: Check sp1 run: | cargo check -p ethrex-prover -F sp1 @@ -75,7 +75,7 @@ jobs: - name: RISC-V SP1 toolchain install run: | curl -L https://sp1.succinct.xyz | bash - ~/.sp1/bin/sp1up --version 4.1.0 + ~/.sp1/bin/sp1up --version 4.1.7 - name: Build prover and SP1's zkVM run: | cd crates/l2/prover diff --git a/Cargo.lock b/Cargo.lock index bdd3b9507d..b6286145d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3322,7 +3322,6 @@ dependencies = [ "clap 4.5.36", "derive_more 1.0.0", "ethrex-common", - "ethrex-l2", "ethrex-levm", "ethrex-prover", "ethrex-rlp", diff --git a/crates/l2/Cargo.toml b/crates/l2/Cargo.toml index 0eb513805e..e9d2685d23 100644 --- a/crates/l2/Cargo.toml +++ b/crates/l2/Cargo.toml @@ -16,11 +16,11 @@ ethereum-types.workspace = true ethrex-common.workspace = true ethrex-rlp.workspace = true ethrex-rpc.workspace = true -ethrex-blockchain = { workspace = true, features = ["l2"] } +ethrex-blockchain.workspace = true ethrex-storage.workspace = true ethrex-storage-rollup.workspace = true ethrex-trie.workspace = true -ethrex-vm = { workspace = true, features = ["l2"] } +ethrex-vm.workspace = true ethrex-levm.workspace = true ethrex-dev = { path = "../../crates/blockchain/dev", default-features = false } ethrex-metrics = { path = "../blockchain/metrics", default-features = false } @@ -37,7 +37,7 @@ directories = "5.0.1" toml = { version = "0.8.19", features = ["parse"] } bincode = "1.3.3" -zkvm_interface = { path = "./prover/zkvm/interface/", features = ["l2"] } +zkvm_interface = { path = "./prover/zkvm/interface/" } [dev-dependencies] rand = "0.8.5" @@ -54,5 +54,6 @@ unnecessary_cast = "warn" panic = "deny" [features] -default = [] +default = ["l2"] metrics = ["ethrex-metrics/l2"] +l2 = ["ethrex-blockchain/l2", "ethrex-vm/l2", "zkvm_interface/l2"] diff --git a/crates/l2/docs/prover.md b/crates/l2/docs/prover.md index bf37f0e835..2f09585afa 100644 --- a/crates/l2/docs/prover.md +++ b/crates/l2/docs/prover.md @@ -64,7 +64,7 @@ sequenceDiagram 2. `rzup install cargo-risczero 1.2.0` - [SP1](https://docs.succinct.xyz/docs/sp1/introduction) 1. `curl -L https://sp1up.succinct.xyz | bash` - 2. `sp1up --version 4.1.0` + 2. `sp1up --version 4.1.7` - [Pico](https://docs.brevis.network/) 1. `cargo +nightly install --git https://github.com/brevis-network/pico pico-cli` 2. `rustup install nightly-2024-11-27` diff --git a/crates/l2/prover/Cargo.toml b/crates/l2/prover/Cargo.toml index 48afe19b91..25a644ca19 100644 --- a/crates/l2/prover/Cargo.toml +++ b/crates/l2/prover/Cargo.toml @@ -23,7 +23,7 @@ ethrex-rlp.workspace = true ethrex-blockchain.workspace = true # l2 -ethrex-l2.workspace = true +ethrex-l2 = { path = "../", default-features = false } ethrex-sdk.workspace = true zkvm_interface = { path = "./zkvm/interface", default-features = false } @@ -31,8 +31,8 @@ zkvm_interface = { path = "./zkvm/interface", default-features = false } risc0-zkvm = { version = "1.2.2", optional = true } risc0-ethereum-contracts = { version = "1.3.1", optional = true } -sp1-sdk = { version = "4.1.1", optional = true } -sp1-recursion-gnark-ffi = { version = "4.1.1", optional = true } +sp1-sdk = { version = "4.1.7", optional = true } +sp1-recursion-gnark-ffi = { version = "4.1.7", optional = true } pico-sdk = { git = "https://github.com/brevis-network/pico", optional = true, rev = "286feb9878d9e09347852e5bf127b8ff81a2b45c" } [dev-dependencies] @@ -56,11 +56,12 @@ risc0 = [ ] sp1 = ["zkvm_interface/sp1", "dep:sp1-sdk"] -gpu = ["risc0-zkvm/cuda", "sp1-sdk/cuda"] +gpu = ["risc0-zkvm?/cuda", "sp1-sdk?/cuda"] l2 = [ "ethrex-vm/l2", "zkvm_interface/l2", "ethrex-blockchain/l2", + "ethrex-l2/l2", ] # the prover can work with either l1 or l2 blocks [lints.clippy] diff --git a/crates/l2/prover/bench/Cargo.toml b/crates/l2/prover/bench/Cargo.toml index edb816968c..f7ad7ccd1f 100644 --- a/crates/l2/prover/bench/Cargo.toml +++ b/crates/l2/prover/bench/Cargo.toml @@ -9,7 +9,6 @@ ethrex-vm.workspace = true ethrex-storage.workspace = true ethrex-rlp.workspace = true ethrex-prover.workspace = true -ethrex-l2.workspace = true ethrex-trie.workspace = true ethrex-levm.workspace = true diff --git a/crates/l2/prover/bench/README.md b/crates/l2/prover/bench/README.md index 81f1123336..5ef3a51ad4 100644 --- a/crates/l2/prover/bench/README.md +++ b/crates/l2/prover/bench/README.md @@ -2,7 +2,7 @@ ## Usage -1. For now we only support SP1. Install their [toolchain](https://docs.succinct.xyz/docs/sp1/introduction) first. +1. For now we only support SP1. Install their [toolchain](https://docs.succinct.xyz/docs/sp1/introduction) first (version 4.1.7). 2. Run: 1. `make sp1 RPC_URL= BLOCK_NUMBER=` for execution without proving 2. `make prove-sp1 RPC_URL= BLOCK_NUMBER=` for generating a proof. diff --git a/crates/l2/prover/bench/src/main.rs b/crates/l2/prover/bench/src/main.rs index 96e97243ce..0b5eb0c3e3 100644 --- a/crates/l2/prover/bench/src/main.rs +++ b/crates/l2/prover/bench/src/main.rs @@ -1,7 +1,6 @@ use std::{fs::File, io::Write}; use clap::Parser; -use ethrex_l2::utils::prover::proving_systems::ProverType; use ethrex_prover_bench::{ cache::{load_cache, write_cache, Cache}, rpc::{db::RpcDB, get_block, get_latest_block_number}, diff --git a/crates/l2/prover/bench/src/rpc/db.rs b/crates/l2/prover/bench/src/rpc/db.rs index 6fc04c9d39..bdb1204cfb 100644 --- a/crates/l2/prover/bench/src/rpc/db.rs +++ b/crates/l2/prover/bench/src/rpc/db.rs @@ -542,7 +542,10 @@ fn get_potential_child_nodes(proof: &[NodeRLP], key: &PathRLP) -> Option