Skip to content

chore(l2): bump sp1 version to 4.1.7 #2610

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

Merged
merged 5 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main_prover.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-main_l2_prover.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

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

9 changes: 5 additions & 4 deletions crates/l2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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"
Expand All @@ -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"]
2 changes: 1 addition & 1 deletion crates/l2/docs/prover.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
9 changes: 5 additions & 4 deletions crates/l2/prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ 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 }

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]
Expand All @@ -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]
Expand Down
1 change: 0 additions & 1 deletion crates/l2/prover/bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion crates/l2/prover/bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<json rpc url> BLOCK_NUMBER=<number, optional>` for execution without proving
2. `make prove-sp1 RPC_URL=<json rpc url> BLOCK_NUMBER=<number, optional>` for generating a proof.
Expand Down
1 change: 0 additions & 1 deletion crates/l2/prover/bench/src/main.rs
Original file line number Diff line number Diff line change
@@ -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},
Expand Down
5 changes: 4 additions & 1 deletion crates/l2/prover/bench/src/rpc/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,10 @@ fn get_potential_child_nodes(proof: &[NodeRLP], key: &PathRLP) -> Option<Vec<Nod
let mut variants = Vec::with_capacity(node.partial.len());
while {
variants.push(Node::from(node.clone()));
node.partial.next().is_some()
node.partial.next();
!node.partial.is_empty() // skip the last nibble, which is the leaf flag.
// if we encode a leaf with its flag missing, it’s going to be encoded as an
// extension.
} {}
Some(variants)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/l2/prover/zkvm/interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ethrex-trie = { path = "../../../../common/trie", default-features = false }

[build-dependencies]
risc0-build = { version = "1.2.2", optional = true }
sp1-build = { version = "4.1.1", optional = true }
sp1-build = { version = "4.1.7", optional = true }
pico-cli = { git = "https://github.com/brevis-network/pico", optional = true }

[package.metadata.risc0]
Expand Down
2 changes: 1 addition & 1 deletion crates/l2/prover/zkvm/interface/sp1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[workspace]

[dependencies]
sp1-zkvm = "4.1.0"
sp1-zkvm = "4.1.7"
zkvm_interface = { path = "../" }

ethrex-common = { path = "../../../../../common", default-features = false }
Expand Down
Loading