From 79630810bc889fa57ca7b88605e11e4d94e8b200 Mon Sep 17 00:00:00 2001 From: Pratyush Mishra Date: Sun, 7 Jan 2024 18:26:46 -0500 Subject: [PATCH] Fix tests --- Cargo.toml | 16 +++++++++++----- benches/bench.rs | 3 +-- src/constraints.rs | 2 +- src/test.rs | 8 ++++---- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2956a14..be1ce71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] } @@ -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/" } \ No newline at end of file +ark-snark = { git = "https://github.com/arkworks-rs/snark/" } \ No newline at end of file diff --git a/benches/bench.rs b/benches/bench.rs index 4c3a8be..7a82d79 100644 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -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; @@ -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(); diff --git a/src/constraints.rs b/src/constraints.rs index c151c44..ec3502b 100644 --- a/src/constraints.rs +++ b/src/constraints.rs @@ -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, diff --git a/src/test.rs b/src/test.rs index e46eb56..9ce5280 100644 --- a/src/test.rs +++ b/src/test.rs @@ -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::(1); + test_prove_and_verify::(1); } #[test] fn rerandomize() { - test_rerandomize::(); + test_rerandomize::(); } }