Skip to content

Commit d0c72e5

Browse files
committed
Update sp1
1 parent 1c098b5 commit d0c72e5

File tree

19 files changed

+3689
-2659
lines changed

19 files changed

+3689
-2659
lines changed

batcher/Cargo.lock

Lines changed: 1857 additions & 872 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[package]
2+
name = "aligned-batcher"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
tokio-tungstenite = "0.21.0"
8+
futures-util = "0.3.30"
9+
tokio = { version = "1.37.0", features = ["rt", "rt-multi-thread", "macros"] }
10+
log = "0.4.21"
11+
env_logger = "0.11.3"
12+
serde_json = "1.0.117"
13+
serde = { version = "1.0.201", features = ["derive"] }
14+
clap = { version = "4.5.4", features = ["derive"] }
15+
sha3 = "0.10.8"
16+
aws-config = "1.4.0"
17+
aws-sdk-s3 = "1.29.0"
18+
bytes = "1.7.1"
19+
hex = "0.4.3"
20+
dotenvy = "0.15.0"
21+
anyhow = "1.0.83"
22+
ethers = { version = "2.0", features = ["ws", "rustls"] }
23+
lambdaworks-crypto = { git = "https://github.com/lambdaclass/lambdaworks.git", rev = "efd46f0b0aea3aa95d94bba7de86cb96611b40d3", features = ["serde"] }
24+
serde_yaml = "0.9.34"
25+
sp1-sdk = { git = "https://github.com/succinctlabs/sp1.git", rev = "v4.1.3" }
26+
risc0-zkvm = { git = "https://github.com/risc0/risc0", tag = "v1.1.2" }
27+
bincode = "1.3.3"
28+
aligned-sdk = { path = "../aligned-sdk" }
29+
ciborium = "=0.2.2"
30+
priority-queue = "2.1.0"
31+
reqwest = { version = "0.12", features = ["json"] }
32+
33+
once_cell = "1.20.2"
34+
warp = "0.3.7"
35+
prometheus = { version = "0.13.4", features = ["process"] }
36+
backon = "1.2.0"

batcher/aligned-batcher/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ anyhow = "1.0.83"
2222
ethers = { version = "2.0", features = ["ws", "rustls"] }
2323
lambdaworks-crypto = { git = "https://github.com/lambdaclass/lambdaworks.git", rev = "efd46f0b0aea3aa95d94bba7de86cb96611b40d3", features = ["serde"] }
2424
serde_yaml = "0.9.34"
25-
sp1-sdk = { git = "https://github.com/succinctlabs/sp1.git", rev = "v3.0.0" }
25+
sp1-sdk = { git = "https://github.com/succinctlabs/sp1.git", rev = "v4.1.3" }
2626
risc0-zkvm = { git = "https://github.com/risc0/risc0", tag = "v1.1.2" }
2727
bincode = "1.3.3"
2828
aligned-sdk = { path = "../aligned-sdk" }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2024-04-17"
2+
channel = "stable"
33
components = ["llvm-tools", "rustc-dev"]

batcher/aligned-batcher/src/sp1/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use log::{debug, error, warn};
2-
use sp1_sdk::ProverClient;
2+
use sp1_sdk::{EnvProver, ProverClient};
33
use std::sync::OnceLock;
44

5-
static SP1_PROVER_CLIENT: OnceLock<ProverClient> = OnceLock::new();
5+
static SP1_PROVER_CLIENT: OnceLock<EnvProver> = OnceLock::new();
66

77
pub fn verify_sp1_proof(proof: &[u8], elf: &[u8]) -> bool {
88
if proof.is_empty() || elf.is_empty() {
@@ -11,10 +11,11 @@ pub fn verify_sp1_proof(proof: &[u8], elf: &[u8]) -> bool {
1111
}
1212

1313
debug!("Verifying SP1 proof");
14-
let prover_client = SP1_PROVER_CLIENT.get_or_init(ProverClient::new);
14+
let prover_client = SP1_PROVER_CLIENT.get_or_init(ProverClient::from_env);
1515

1616
let (_pk, vk) = prover_client.setup(elf);
1717
if let Ok(proof) = bincode::deserialize(proof) {
18+
//client.verify(&proof, &vk).expect("failed to verify proof");
1819
let res = prover_client.verify(&proof, &vk).is_ok();
1920
debug!("SP1 proof is valid: {}", res);
2021
if res {

batcher/aligned/rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2024-04-17"
2+
channel = "stable"
33
components = ["llvm-tools", "rustc-dev"]

examples/validating-public-input/sp1/fibonacci/program/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ name = "fibonacci-program"
44
edition = "2021"
55

66
[dependencies]
7-
sp1-zkvm = { git = "https://github.com/succinctlabs/sp1.git", rev = "v3.0.0" }
7+
sp1-zkvm = { git = "https://github.com/succinctlabs/sp1.git", rev = "v4.1.3" }

examples/validating-public-input/sp1/fibonacci/script/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name = "fibonacci"
99
path = "src/main.rs"
1010

1111
[dependencies]
12-
sp1-sdk = { git = "https://github.com/succinctlabs/sp1.git", rev = "v3.0.0" }
12+
sp1-sdk = { git = "https://github.com/succinctlabs/sp1.git", rev = "v4.1.3" }
1313
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
1414
serde = { version = "1.0", default-features = false, features = ["derive"] }
1515
clap = { version = "4.0", features = ["derive", "env"] }
@@ -19,5 +19,5 @@ alloy-sol-types = { workspace = true }
1919
bincode = "1.3.3"
2020

2121
[build-dependencies]
22-
sp1-helper = { git = "https://github.com/succinctlabs/sp1.git", rev = "v3.0.0" }
22+
sp1-helper = { git = "https://github.com/succinctlabs/sp1.git", rev = "v4.1.3" }
2323
sp1-build = "3.0.0"

examples/validating-public-input/sp1/fibonacci/script/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn main() {
88
sp1_sdk::utils::setup_logger();
99

1010
// Setup the prover client.
11-
let client = ProverClient::new();
11+
let client = ProverClient::from_env();
1212

1313
// Setup the inputs.
1414
let n = 500;

examples/zkquiz/quiz/program/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name = "quiz-program"
55
edition = "2021"
66

77
[dependencies]
8-
sp1-zkvm = { git = "https://github.com/succinctlabs/sp1.git", rev = "v3.0.0" }
8+
sp1-zkvm = { git = "https://github.com/succinctlabs/sp1.git", rev = "v4.1.3" }
99
tiny-keccak = { git = "https://github.com/sp1-patches/tiny-keccak", branch = "patch-v2.0.2", features = [
1010
"sha3",
1111
] }

0 commit comments

Comments
 (0)