Skip to content

Commit 53d780f

Browse files
authored
chore: build guest verify programs automatically (#2259)
1 parent e2b80fa commit 53d780f

File tree

11 files changed

+820
-45
lines changed

11 files changed

+820
-45
lines changed

Cargo.lock

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

crates/test-artifacts/build.rs

+18-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{
33
path::PathBuf,
44
};
55

6-
use sp1_build::build_program_with_args;
6+
use sp1_build::{build_program_with_args, BuildArgs};
77

88
fn main() -> Result<()> {
99
let tests_path =
@@ -28,5 +28,22 @@ fn main() -> Result<()> {
2828
Default::default(),
2929
);
3030

31+
build_program_with_args(
32+
"../verifier/guest-verify-programs",
33+
BuildArgs {
34+
binaries: vec!["groth16_verify".to_string(), "plonk_verify".to_string()],
35+
..Default::default()
36+
},
37+
);
38+
39+
build_program_with_args(
40+
"../verifier/guest-verify-programs",
41+
BuildArgs {
42+
binaries: vec!["groth16_verify_blake3".to_string(), "plonk_verify_blake3".to_string()],
43+
features: vec!["blake3".to_string()],
44+
..Default::default()
45+
},
46+
);
47+
3148
Ok(())
3249
}

crates/test-artifacts/src/lib.rs

+8
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,11 @@ pub const BN254_FP2_MUL_ELF: &[u8] = include_elf!("bn254-fp2-mul-test");
8383
pub const TENDERMINT_BENCHMARK_ELF: &[u8] = include_elf!("tendermint-benchmark-program");
8484

8585
pub const U256XU2048_MUL_ELF: &[u8] = include_elf!("u256x2048-mul");
86+
87+
pub const GROTH16_ELF: &[u8] = include_elf!("groth16_verify");
88+
89+
pub const GROTH16_BLAKE3_ELF: &[u8] = include_elf!("groth16_verify_blake3");
90+
91+
pub const PLONK_ELF: &[u8] = include_elf!("plonk_verify");
92+
93+
pub const PLONK_BLAKE3_ELF: &[u8] = include_elf!("plonk_verify_blake3");

crates/verifier/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ cfg-if = "1.0.0"
3434
serial_test = "3.2.0"
3535
rstest = "0.25.0"
3636

37+
[build-dependencies]
38+
sp1-build = { path = "../build" }
39+
3740
[features]
3841
default = ["std"]
3942
std = ["thiserror/std"]

0 commit comments

Comments
 (0)