Skip to content

Commit 3f006c1

Browse files
xqftjrchatruc
andauthored
chore(l2): bump sp1 version to 4.1.7 (#2610)
Also update some docs --------- Co-authored-by: Javier Rodríguez Chatruc <[email protected]>
1 parent bb8cece commit 3f006c1

File tree

12 files changed

+21
-19
lines changed

12 files changed

+21
-19
lines changed

.github/workflows/main_prover.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: |
3535
. "$HOME/.cargo/env"
3636
curl -L https://sp1.succinct.xyz | bash
37-
~/.sp1/bin/sp1up --version 4.1.0
37+
~/.sp1/bin/sp1up --version 4.1.7
3838
3939
- name: Set up Docker Buildx
4040
if: ${{ always() && github.event_name == 'merge_group' }}

.github/workflows/pr-main_l2_prover.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: RISC-V SP1 toolchain install
3131
run: |
3232
curl -L https://sp1.succinct.xyz | bash
33-
~/.sp1/bin/sp1up --version 4.1.0
33+
~/.sp1/bin/sp1up --version 4.1.7
3434
- name: Check sp1
3535
run: |
3636
cargo check -p ethrex-prover -F sp1
@@ -75,7 +75,7 @@ jobs:
7575
- name: RISC-V SP1 toolchain install
7676
run: |
7777
curl -L https://sp1.succinct.xyz | bash
78-
~/.sp1/bin/sp1up --version 4.1.0
78+
~/.sp1/bin/sp1up --version 4.1.7
7979
- name: Build prover and SP1's zkVM
8080
run: |
8181
cd crates/l2/prover

Cargo.lock

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/l2/Cargo.toml

+5-4
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ ethereum-types.workspace = true
1616
ethrex-common.workspace = true
1717
ethrex-rlp.workspace = true
1818
ethrex-rpc.workspace = true
19-
ethrex-blockchain = { workspace = true, features = ["l2"] }
19+
ethrex-blockchain.workspace = true
2020
ethrex-storage.workspace = true
2121
ethrex-storage-rollup.workspace = true
2222
ethrex-trie.workspace = true
23-
ethrex-vm = { workspace = true, features = ["l2"] }
23+
ethrex-vm.workspace = true
2424
ethrex-levm.workspace = true
2525
ethrex-dev = { path = "../../crates/blockchain/dev", default-features = false }
2626
ethrex-metrics = { path = "../blockchain/metrics", default-features = false }
@@ -37,7 +37,7 @@ directories = "5.0.1"
3737
toml = { version = "0.8.19", features = ["parse"] }
3838
bincode = "1.3.3"
3939

40-
zkvm_interface = { path = "./prover/zkvm/interface/", features = ["l2"] }
40+
zkvm_interface = { path = "./prover/zkvm/interface/" }
4141

4242
[dev-dependencies]
4343
rand = "0.8.5"
@@ -54,5 +54,6 @@ unnecessary_cast = "warn"
5454
panic = "deny"
5555

5656
[features]
57-
default = []
57+
default = ["l2"]
5858
metrics = ["ethrex-metrics/l2"]
59+
l2 = ["ethrex-blockchain/l2", "ethrex-vm/l2", "zkvm_interface/l2"]

crates/l2/docs/prover.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ sequenceDiagram
6464
2. `rzup install cargo-risczero 1.2.0`
6565
- [SP1](https://docs.succinct.xyz/docs/sp1/introduction)
6666
1. `curl -L https://sp1up.succinct.xyz | bash`
67-
2. `sp1up --version 4.1.0`
67+
2. `sp1up --version 4.1.7`
6868
- [Pico](https://docs.brevis.network/)
6969
1. `cargo +nightly install --git https://github.com/brevis-network/pico pico-cli`
7070
2. `rustup install nightly-2024-11-27`

crates/l2/prover/Cargo.toml

+5-4
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ ethrex-rlp.workspace = true
2323
ethrex-blockchain.workspace = true
2424

2525
# l2
26-
ethrex-l2.workspace = true
26+
ethrex-l2 = { path = "../", default-features = false }
2727
ethrex-sdk.workspace = true
2828

2929
zkvm_interface = { path = "./zkvm/interface", default-features = false }
3030

3131
risc0-zkvm = { version = "1.2.2", optional = true }
3232
risc0-ethereum-contracts = { version = "1.3.1", optional = true }
3333

34-
sp1-sdk = { version = "4.1.1", optional = true }
35-
sp1-recursion-gnark-ffi = { version = "4.1.1", optional = true }
34+
sp1-sdk = { version = "4.1.7", optional = true }
35+
sp1-recursion-gnark-ffi = { version = "4.1.7", optional = true }
3636
pico-sdk = { git = "https://github.com/brevis-network/pico", optional = true, rev = "286feb9878d9e09347852e5bf127b8ff81a2b45c" }
3737

3838
[dev-dependencies]
@@ -56,11 +56,12 @@ risc0 = [
5656
]
5757
sp1 = ["zkvm_interface/sp1", "dep:sp1-sdk"]
5858

59-
gpu = ["risc0-zkvm/cuda", "sp1-sdk/cuda"]
59+
gpu = ["risc0-zkvm?/cuda", "sp1-sdk?/cuda"]
6060
l2 = [
6161
"ethrex-vm/l2",
6262
"zkvm_interface/l2",
6363
"ethrex-blockchain/l2",
64+
"ethrex-l2/l2",
6465
] # the prover can work with either l1 or l2 blocks
6566

6667
[lints.clippy]

crates/l2/prover/bench/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ ethrex-vm.workspace = true
99
ethrex-storage.workspace = true
1010
ethrex-rlp.workspace = true
1111
ethrex-prover.workspace = true
12-
ethrex-l2.workspace = true
1312
ethrex-trie.workspace = true
1413
ethrex-levm.workspace = true
1514

crates/l2/prover/bench/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Usage
44

5-
1. For now we only support SP1. Install their [toolchain](https://docs.succinct.xyz/docs/sp1/introduction) first.
5+
1. For now we only support SP1. Install their [toolchain](https://docs.succinct.xyz/docs/sp1/introduction) first (version 4.1.7).
66
2. Run:
77
1. `make sp1 RPC_URL=<json rpc url> BLOCK_NUMBER=<number, optional>` for execution without proving
88
2. `make prove-sp1 RPC_URL=<json rpc url> BLOCK_NUMBER=<number, optional>` for generating a proof.

crates/l2/prover/bench/src/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::{fs::File, io::Write};
22

33
use clap::Parser;
4-
use ethrex_l2::utils::prover::proving_systems::ProverType;
54
use ethrex_prover_bench::{
65
cache::{load_cache, write_cache, Cache},
76
rpc::{db::RpcDB, get_block, get_latest_block_number},

crates/l2/prover/bench/src/rpc/db.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,10 @@ fn get_potential_child_nodes(proof: &[NodeRLP], key: &PathRLP) -> Option<Vec<Nod
542542
let mut variants = Vec::with_capacity(node.partial.len());
543543
while {
544544
variants.push(Node::from(node.clone()));
545-
node.partial.next().is_some()
545+
node.partial.next();
546+
!node.partial.is_empty() // skip the last nibble, which is the leaf flag.
547+
// if we encode a leaf with its flag missing, it’s going to be encoded as an
548+
// extension.
546549
} {}
547550
Some(variants)
548551
}

crates/l2/prover/zkvm/interface/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ethrex-trie = { path = "../../../../common/trie", default-features = false }
2020

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

2626
[package.metadata.risc0]

crates/l2/prover/zkvm/interface/sp1/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2021"
66
[workspace]
77

88
[dependencies]
9-
sp1-zkvm = "4.1.0"
9+
sp1-zkvm = "4.1.7"
1010
zkvm_interface = { path = "../" }
1111

1212
ethrex-common = { path = "../../../../../common", default-features = false }

0 commit comments

Comments
 (0)