Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Oct 24, 2024
1 parent c3b12f1 commit bfd809f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions crates/prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ use utils::{sp1_committed_values_digest_bn254, sp1_vkey_digest_bn254, words_to_b

use components::{DefaultProverComponents, SP1ProverComponents};

/// The global version for all components of SP1.
///
/// 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 = include_str!("../../SP1_CIRCUIT_VERSION");

/// The configuration for the core prover.
Expand Down
4 changes: 1 addition & 3 deletions crates/recursion/gnark-ffi/src/ffi/docker.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::ProofBn254;
use crate::{Groth16Bn254Proof, PlonkBn254Proof};
use crate::{Groth16Bn254Proof, PlonkBn254Proof, SP1_CIRCUIT_VERSION};
use anyhow::{anyhow, Result};
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
4 changes: 1 addition & 3 deletions crates/recursion/gnark-ffi/src/ffi/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
//! Although we cast to *mut c_char because the Go signatures can't be immutable, the Go functions
//! should not modify the strings.
use crate::{Groth16Bn254Proof, PlonkBn254Proof};
use crate::{Groth16Bn254Proof, PlonkBn254Proof, SP1_CIRCUIT_VERSION};
use cfg_if::cfg_if;
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
7 changes: 6 additions & 1 deletion crates/recursion/gnark-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ pub use plonk_bn254::*;
pub use proof::*;
pub use witness::*;

const SP1_CIRCUIT_VERSION: &str = include_str!("../../../SP1_CIRCUIT_VERSION");
/// The global version for all components of SP1.
///
/// 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.
const SP1_CIRCUIT_VERSION: &str = include_str!("../../../SP1_CIRCUIT_VERSION");

0 comments on commit bfd809f

Please sign in to comment.