Skip to content

Commit

Permalink
spartan integration fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tess-eract committed Jan 13, 2024
1 parent c565050 commit 9964e5a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ zstd = { version = "0.12", default-features = false }
nexus-riscv = { path = "../riscv" }
nexus-riscv-circuit = { path = "../riscv-circuit" }
spartan = { path = "../spartan", package = "ark-spartan" }
supernova = { path = "../supernova" }
supernova = { path = "../supernova", features = ["spartan"] }

ark-ff.workspace = true
ark-ec.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions prover/src/pp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ where
mod test {
use super::*;
use crate::srs::test_srs::*;
use ark_std::test_rng;

#[test]
fn test_gen_pp_with_srs() {
gen_test_srs_to_file(10, "test_srs.zst").unwrap();
let srs = load_srs("test_srs.zst").unwrap();
// unneeded here, since `gen_to_file` will load the srs; just included to test `load_srs`.
let _srs = load_srs("test_srs.zst").unwrap();
gen_to_file(10, true, true, "test_pp.zst", Some("test_srs.zst")).unwrap();
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use ark_ec::CurveGroup;
use ark_std::marker::PhantomData;
use spartan::{
use ark_spartan::{
math::Math,
polycommitments::{PCSKeys, PolyCommitmentScheme, VectorCommitmentScheme},
};
use ark_std::marker::PhantomData;

use crate::commitment::CommitmentScheme;

Expand Down
6 changes: 3 additions & 3 deletions supernova/src/circuits/nova/pcd/compression/conversion.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ark_ec::short_weierstrass::{Projective, SWCurveConfig};
use spartan::{
use ark_spartan::{
crr1csproof::{CRR1CSInstance, CRR1CSShape, CRR1CSWitness},
errors::R1CSError,
polycommitments::PolyCommitmentScheme,
Expand Down Expand Up @@ -108,11 +108,11 @@ mod tests {
use ark_bn254::{g1::Config as Bn254Config, Bn254};
use ark_ec::short_weierstrass::Projective;
use ark_ff::PrimeField;
use ark_std::{test_rng, One};
use spartan::{
use ark_spartan::{
crr1csproof::{is_sat, CRR1CSKey},
polycommitments::zeromorph::Zeromorph,
};
use ark_std::{test_rng, One};

use super::*;
use crate::{
Expand Down
2 changes: 1 addition & 1 deletion supernova/src/circuits/nova/pcd/compression/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ark_relations::r1cs::SynthesisError;
use spartan::errors::ProofVerifyError;
use ark_spartan::errors::ProofVerifyError;

use super::conversion::ConversionError;
pub use crate::multifold::Error as NovaError;
Expand Down
10 changes: 5 additions & 5 deletions supernova/src/circuits/nova/pcd/compression/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ use ark_ec::{
};
use ark_ff::PrimeField;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
use ark_std::{cmp::max, marker::PhantomData};
use merlin::Transcript;
use spartan::{
use ark_spartan::{
committed_relaxed_snark as spartan_snark, committed_relaxed_snark::CRSNARKKey as SNARKGens,
crr1csproof::CRR1CSShape, polycommitments::PolyCommitmentScheme, ComputationCommitment,
ComputationDecommitment,
};
use ark_std::{cmp::max, marker::PhantomData};
use merlin::Transcript;

use super::PublicParams;
use crate::{
Expand Down Expand Up @@ -168,7 +168,7 @@ where
(&u, &w),
)?;
let mut transcript = Transcript::new(b"spartan_snark");
// Now, we use Spartan to prove knowledge of the witness `W_prime`
// Now, we use ark_spartan to prove knowledge of the witness `W_prime`
// for the committed relaxed r1cs instance `U_prime`
let spartan_proof = spartan_snark::SNARK::<Projective<G1>, PC>::prove(
shape,
Expand Down Expand Up @@ -274,8 +274,8 @@ mod tests {
use ark_ec::short_weierstrass::{Projective, SWCurveConfig};
use ark_ff::PrimeField;
use ark_grumpkin::{GrumpkinConfig, Projective as GrumpkinProjective};
use ark_spartan::polycommitments::{zeromorph::Zeromorph, PolyCommitmentScheme};
use ark_std::{test_rng, One};
use spartan::polycommitments::{zeromorph::Zeromorph, PolyCommitmentScheme};

use super::*;
use crate::{
Expand Down

0 comments on commit 9964e5a

Please sign in to comment.