diff --git a/Cargo.toml b/Cargo.toml index 0c63a8c..e1fc0ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,8 @@ keywords = ["zero-knowledge", "cryptography", "zkSNARK", "SNARK", "r1cs"] categories = ["cryptography"] include = ["Cargo.toml", "src", "README.md", "LICENSE-APACHE", "LICENSE-MIT"] license = "MIT/Apache-2.0" -edition = "2018" +edition = "2021" +resolver = "2" [dependencies] ark-ff = { version = "0.4.0", default-features = false } @@ -20,8 +21,8 @@ ark-relations = { version = "0.4.0", default-features = false } derivative = { version = "2", features = ["use_core"] } tracing = { version = "0.1", default-features = false, features = [ "attributes" ] } -num-bigint = {version = "0.4", default-features = false } -num-traits = {version = "0.2", default-features = false } +num-bigint = { version = "0.4", default-features = false } +num-traits = { version = "0.2", default-features = false } num-integer = { version = "0.1.44", default-features = false } [dev-dependencies] @@ -70,3 +71,17 @@ lto = "thin" incremental = true debug-assertions = true debug = true + +[patch.crates-io] +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-test-curves = { git = "https://github.com/arkworks-rs/algebra/" } +ark-bls12-377 = { git = "https://github.com/arkworks-rs/curves/" } +ark-bls12-381 = { git = "https://github.com/arkworks-rs/curves/" } +ark-mnt4-298 = { git = "https://github.com/arkworks-rs/curves/" } +ark-mnt4-753 = { git = "https://github.com/arkworks-rs/curves/" } +ark-mnt6-298 = { git = "https://github.com/arkworks-rs/curves/" } +ark-mnt6-753 = { git = "https://github.com/arkworks-rs/curves/" } +ark-pallas = { git = "https://github.com/arkworks-rs/curves/" } \ No newline at end of file diff --git a/src/bits/boolean.rs b/src/bits/boolean.rs index ff9e79a..a892aea 100644 --- a/src/bits/boolean.rs +++ b/src/bits/boolean.rs @@ -956,7 +956,9 @@ impl CondSelectGadget for Boolean { mod test { use super::{AllocatedBool, Boolean}; use crate::prelude::*; - use ark_ff::{BitIteratorBE, BitIteratorLE, Field, One, PrimeField, UniformRand, Zero}; + use ark_ff::{ + AdditiveGroup, BitIteratorBE, BitIteratorLE, Field, One, PrimeField, UniformRand, Zero, + }; use ark_relations::r1cs::{ConstraintSystem, Namespace, SynthesisError}; use ark_test_curves::bls12_381::Fr; diff --git a/src/groups/curves/short_weierstrass/mod.rs b/src/groups/curves/short_weierstrass/mod.rs index b41d959..f245334 100644 --- a/src/groups/curves/short_weierstrass/mod.rs +++ b/src/groups/curves/short_weierstrass/mod.rs @@ -4,7 +4,7 @@ use ark_ec::{ }, AffineRepr, CurveGroup, }; -use ark_ff::{BigInteger, BitIteratorBE, Field, One, PrimeField, Zero}; +use ark_ff::{AdditiveGroup, BigInteger, BitIteratorBE, Field, One, PrimeField, Zero}; use ark_relations::r1cs::{ConstraintSystemRef, Namespace, SynthesisError}; use ark_std::{borrow::Borrow, marker::PhantomData, ops::Mul}; use non_zero_affine::NonZeroAffineVar; @@ -838,7 +838,7 @@ where let (mut ge, iter) = if cofactor_weight < modulus_minus_1_weight { let ge = Self::new_variable_omit_prime_order_check( ark_relations::ns!(cs, "Witness without subgroup check with cofactor mul"), - || f().map(|g| g.borrow().into_affine().mul_by_cofactor_inv().into()), + || f().map(|g| g.into_affine().mul_by_cofactor_inv().into()), mode, )?; ( diff --git a/src/groups/curves/short_weierstrass/non_zero_affine.rs b/src/groups/curves/short_weierstrass/non_zero_affine.rs index 281b562..3295402 100644 --- a/src/groups/curves/short_weierstrass/non_zero_affine.rs +++ b/src/groups/curves/short_weierstrass/non_zero_affine.rs @@ -1,5 +1,5 @@ use super::*; -use ark_ec::Group; +use ark_ec::AdditiveGroup; use ark_std::ops::Add; /// An affine representation of a prime order curve point that is guaranteed diff --git a/src/groups/curves/twisted_edwards/mod.rs b/src/groups/curves/twisted_edwards/mod.rs index 789cb59..4b92d6b 100644 --- a/src/groups/curves/twisted_edwards/mod.rs +++ b/src/groups/curves/twisted_edwards/mod.rs @@ -3,7 +3,7 @@ use ark_ec::{ Affine as TEAffine, MontCurveConfig as MontgomeryModelParameter, Projective as TEProjective, TECurveConfig as TEModelParameters, }, - AffineRepr, CurveGroup, Group, + AdditiveGroup, AffineRepr, CurveGroup, }; use ark_ff::{BigInteger, BitIteratorBE, Field, One, PrimeField, Zero}; use ark_relations::r1cs::{ConstraintSystemRef, Namespace, SynthesisError}; @@ -337,7 +337,6 @@ where .iter() .zip(segment_powers.borrow()) { - let base_power = base_power.borrow(); let mut acc_power = *base_power; let mut coords = vec![]; for _ in 0..4 { @@ -609,7 +608,7 @@ where let (mut ge, iter) = if cofactor_weight < modulus_minus_1_weight { let ge = Self::new_variable_omit_prime_order_check( ark_relations::ns!(cs, "Witness without subgroup check with cofactor mul"), - || f().map(|g| g.borrow().into_affine().mul_by_cofactor_inv().into()), + || f().map(|g| g.into_affine().mul_by_cofactor_inv().into()), mode, )?; (