Skip to content

Commit

Permalink
use SP1_CIRCUIT_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Oct 24, 2024
1 parent f39687e commit c3b12f1
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 12 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions crates/SP1_CIRCUIT_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v3.0.0
2 changes: 1 addition & 1 deletion crates/build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use clap::Parser;
/// This string should be updated whenever any step in verifying an SP1 proof changes, including
/// core, recursion, and plonk-bn254. This string is used to download SP1 artifacts and the gnark
/// docker image.
pub const SP1_CIRCUIT_VERSION: &str = "v3.0.0";
pub const SP1_CIRCUIT_VERSION: &str = include_str!("../../SP1_CIRCUIT_VERSION");

const BUILD_TARGET: &str = "riscv32im-succinct-zkvm-elf";
const DEFAULT_OUTPUT_DIR: &str = "elf";
Expand Down
1 change: 0 additions & 1 deletion crates/prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ sp1-recursion-circuit = { workspace = true }
sp1-recursion-gnark-ffi = { workspace = true }
sp1-core-machine = { workspace = true }
sp1-stark = { workspace = true }
sp1-build = { workspace = true }
p3-symmetric = { workspace = true }
sp1-core-executor = { workspace = true }
sp1-primitives = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ use utils::{sp1_committed_values_digest_bn254, sp1_vkey_digest_bn254, words_to_b

use components::{DefaultProverComponents, SP1ProverComponents};

pub use sp1_build::SP1_CIRCUIT_VERSION;
pub const SP1_CIRCUIT_VERSION: &str = include_str!("../../SP1_CIRCUIT_VERSION");

/// The configuration for the core prover.
pub type CoreSC = BabyBearPoseidon2;
Expand Down
1 change: 0 additions & 1 deletion crates/recursion/gnark-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ p3-baby-bear = { workspace = true }
sp1-recursion-compiler = { workspace = true }
sp1-core-machine = { workspace = true }
sp1-stark = { workspace = true }
sp1-build = { workspace = true }
serde = "1.0.204"
serde_json = "1.0.121"
tempfile = "3.10.1"
Expand Down
3 changes: 2 additions & 1 deletion crates/recursion/gnark-ffi/src/ffi/docker.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use crate::ProofBn254;
use crate::{Groth16Bn254Proof, PlonkBn254Proof};
use anyhow::{anyhow, Result};
use sp1_build::SP1_CIRCUIT_VERSION;
use std::{io::Write, process::Command};

const SP1_CIRCUIT_VERSION: &str = include_str!("../../../../SP1_CIRCUIT_VERSION");

/// Represents the proof system being used
enum ProofSystem {
Plonk,
Expand Down
3 changes: 2 additions & 1 deletion crates/recursion/gnark-ffi/src/ffi/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
use crate::{Groth16Bn254Proof, PlonkBn254Proof};
use cfg_if::cfg_if;
use sp1_build::SP1_CIRCUIT_VERSION;
use std::{
ffi::{c_char, CStr, CString},
mem::forget,
};

const SP1_CIRCUIT_VERSION: &str = include_str!("../../../../SP1_CIRCUIT_VERSION");

#[allow(warnings, clippy::all)]
mod bind {
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
Expand Down
3 changes: 1 addition & 2 deletions crates/recursion/gnark-ffi/src/groth16_bn254.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ use std::{
use crate::{
ffi::{build_groth16_bn254, prove_groth16_bn254, test_groth16_bn254, verify_groth16_bn254},
witness::GnarkWitness,
Groth16Bn254Proof,
Groth16Bn254Proof, SP1_CIRCUIT_VERSION,
};

use num_bigint::BigUint;
use sha2::{Digest, Sha256};
use sp1_build::SP1_CIRCUIT_VERSION;
use sp1_recursion_compiler::{
constraints::Constraint,
ir::{Config, Witness},
Expand Down
2 changes: 2 additions & 0 deletions crates/recursion/gnark-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ pub use groth16_bn254::*;
pub use plonk_bn254::*;
pub use proof::*;
pub use witness::*;

const SP1_CIRCUIT_VERSION: &str = include_str!("../../../SP1_CIRCUIT_VERSION");
3 changes: 1 addition & 2 deletions crates/recursion/gnark-ffi/src/plonk_bn254.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ use std::{
use crate::{
ffi::{build_plonk_bn254, prove_plonk_bn254, test_plonk_bn254, verify_plonk_bn254},
witness::GnarkWitness,
PlonkBn254Proof,
PlonkBn254Proof, SP1_CIRCUIT_VERSION,
};

use num_bigint::BigUint;
use sha2::{Digest, Sha256};
use sp1_build::SP1_CIRCUIT_VERSION;
use sp1_recursion_compiler::{
constraints::Constraint,
ir::{Config, Witness},
Expand Down

0 comments on commit c3b12f1

Please sign in to comment.