Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratyush committed Jan 7, 2024
1 parent 51d8052 commit 7963081
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
16 changes: 11 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rayon = { version = "1", optional = true }
csv = { version = "1" }
ark-bls12-381 = { version = "0.4.0", default-features = false, features = ["curve"] }
ark-bls12-377 = { version = "0.4.0", default-features = false, features = ["curve"] }
ark-cp6-782 = { version = "0.4.0", default-features = false }
ark-bw6-761 = { version = "0.4.0", default-features = false }
ark-mnt4-298 = { version = "0.4.0", default-features = false, features = ["r1cs", "curve"] }
ark-mnt6-298 = { version = "0.4.0", default-features = false, features = ["r1cs"] }
ark-mnt4-753 = { version = "0.4.0", default-features = false, features = ["r1cs", "curve"] }
Expand Down Expand Up @@ -84,10 +84,16 @@ ark-ff = { git = "https://github.com/arkworks-rs/algebra/" }
ark-ec = { git = "https://github.com/arkworks-rs/algebra/" }
ark-poly = { git = "https://github.com/arkworks-rs/algebra/" }
ark-serialize = { git = "https://github.com/arkworks-rs/algebra/" }
ark-bls12-381 = { git = "https://github.com/arkworks-rs/algebra/" }
ark-mnt4-298 = { git = "https://github.com/arkworks-rs/algebra/" }
ark-mnt6-298 = { git = "https://github.com/arkworks-rs/algebra/" }
ark-mnt4-753 = { git = "https://github.com/arkworks-rs/algebra/" }
ark-mnt6-753 = { git = "https://github.com/arkworks-rs/algebra/" }
ark-bls12-377 = { git = "https://github.com/arkworks-rs/algebra/" }
ark-bw6-761 = { git = "https://github.com/arkworks-rs/algebra/" }

ark-r1cs-std = { git = "https://github.com/arkworks-rs/r1cs-std/" }
ark-crypto-primitives = { git = "https://github.com/arkworks-rs/crypto-primitives/" }

ark-relations = { git = "https://github.com/arkworks-rs/snark/" }
ark-snark = { git = "https://github.com/arkworks-rs/snark/" }
ark-mnt4-298 = { git = "https://github.com/arkworks-rs/algebra/" }
ark-mnt6-298 = { git = "https://github.com/arkworks-rs/algebra/" }
ark-bls12-377 = { git = "https://github.com/arkworks-rs/algebra/" }
ark-snark = { git = "https://github.com/arkworks-rs/snark/" }
3 changes: 1 addition & 2 deletions benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use ark_relations::{
lc,
r1cs::{ConstraintSynthesizer, ConstraintSystemRef, SynthesisError},
};
use ark_std::ops::Mul;

const NUM_PROVE_REPETITIONS: usize = 1;
const NUM_VERIFY_REPETITIONS: usize = 50;
Expand Down Expand Up @@ -109,7 +108,7 @@ macro_rules! groth16_verify_bench {
let (pk, vk) = Groth16::<$bench_pairing_engine>::circuit_specific_setup(c, rng).unwrap();
let proof = Groth16::<$bench_pairing_engine>::prove(&pk, c.clone(), rng).unwrap();

let v = c.a.unwrap().mul(c.b.unwrap());
let v = c.a.unwrap() * c.b.unwrap();

let start = ark_std::time::Instant::now();

Expand Down
2 changes: 1 addition & 1 deletion src/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ mod test {
use ark_ff::{Field, UniformRand};
use ark_mnt4_298::{constraints::PairingVar as MNT4PairingVar, Fr as MNT4Fr, MNT4_298 as MNT4};
use ark_mnt6_298::Fr as MNT6Fr;
use ark_r1cs_std::bits::boolean::Boolean;
use ark_r1cs_std::boolean::Boolean;
use ark_r1cs_std::{alloc::AllocVar, eq::EqGadget};
use ark_relations::{
lc, ns,
Expand Down
8 changes: 4 additions & 4 deletions src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,18 @@ mod bls12_377 {
}
}

mod cp6_782 {
mod bw6_761 {
use super::{test_prove_and_verify, test_rerandomize};

use ark_cp6_782::CP6_782;
use ark_bw6_761::BW6_761;

#[test]
fn prove_and_verify() {
test_prove_and_verify::<CP6_782>(1);
test_prove_and_verify::<BW6_761>(1);
}

#[test]
fn rerandomize() {
test_rerandomize::<CP6_782>();
test_rerandomize::<BW6_761>();
}
}

0 comments on commit 7963081

Please sign in to comment.