From 530d618ccae40dfdfb0a85660cd3602da18b6538 Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Fri, 11 Dec 2020 19:49:55 -0600 Subject: [PATCH] Change test_rng import to ark-std --- Cargo.toml | 5 +++++ bls12_377/src/constraints/mod.rs | 6 +++--- bls12_377/src/curves/tests.rs | 3 ++- bls12_377/src/fields/tests.rs | 3 ++- bls12_381/src/curves/tests.rs | 3 ++- bn254/src/curves/tests.rs | 3 ++- bw6_761/src/curves/tests.rs | 3 ++- bw6_761/src/fields/tests.rs | 3 ++- cp6_782/src/curves/tests.rs | 3 ++- cp6_782/src/fields/tests.rs | 3 ++- curve-constraint-tests/src/lib.rs | 3 ++- ed_on_bls12_377/src/constraints/mod.rs | 4 ++-- ed_on_bls12_377/src/curves/tests.rs | 2 +- ed_on_bls12_377/src/fields/tests.rs | 2 +- ed_on_bls12_381/src/constraints/mod.rs | 4 ++-- ed_on_bls12_381/src/curves/tests.rs | 3 ++- ed_on_bls12_381/src/fields/tests.rs | 3 ++- ed_on_bn254/src/constraints/mod.rs | 4 ++-- ed_on_bn254/src/curves/tests.rs | 3 ++- ed_on_bn254/src/fields/tests.rs | 3 ++- ed_on_bw6_761/src/constraints/mod.rs | 4 ++-- ed_on_cp6_782/src/constraints/mod.rs | 4 ++-- ed_on_cp6_782/src/curves/tests.rs | 2 +- ed_on_cp6_782/src/fields/tests.rs | 2 +- ed_on_mnt4_298/src/constraints/mod.rs | 4 ++-- ed_on_mnt4_298/src/curves/tests.rs | 2 +- ed_on_mnt4_298/src/fields/tests.rs | 2 +- ed_on_mnt4_753/src/constraints/mod.rs | 4 ++-- ed_on_mnt4_753/src/curves/tests.rs | 2 +- ed_on_mnt4_753/src/fields/tests.rs | 2 +- mnt4_298/src/constraints/mod.rs | 6 +++--- mnt4_298/src/curves/tests.rs | 3 ++- mnt4_298/src/fields/tests.rs | 3 ++- mnt4_753/src/constraints/mod.rs | 6 +++--- mnt4_753/src/curves/tests.rs | 3 ++- mnt4_753/src/fields/tests.rs | 3 ++- mnt6_298/src/constraints/mod.rs | 6 +++--- mnt6_298/src/curves/tests.rs | 3 ++- mnt6_298/src/fields/tests.rs | 3 ++- mnt6_753/src/constraints/mod.rs | 6 +++--- mnt6_753/src/curves/tests.rs | 3 ++- mnt6_753/src/fields/tests.rs | 3 ++- 42 files changed, 84 insertions(+), 58 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 995983f..411d696 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,11 @@ members = [ "ed_on_mnt4_298", ] +[patch.crates-io] +ark-ff = { path = '../algebra/ff' } +ark-ec = { path = '../algebra/ec'} + + [profile.release] opt-level = 3 lto = "thin" diff --git a/bls12_377/src/constraints/mod.rs b/bls12_377/src/constraints/mod.rs index e04d9cf..e541e92 100644 --- a/bls12_377/src/constraints/mod.rs +++ b/bls12_377/src/constraints/mod.rs @@ -20,7 +20,7 @@ //! let cs = ConstraintSystem::::new_ref(); //! // This rng is just for test purposes; do not use it //! // in real applications. -//! let mut rng = ark_ff::test_rng(); +//! let mut rng = ark_std::test_rng(); //! //! // Generate some random `Fq` elements. //! let a_native = Fq::rand(&mut rng); @@ -67,7 +67,7 @@ //! # use ark_bls12_377::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate some random `G1` elements. //! let a_native = G1Projective::rand(&mut rng); @@ -112,7 +112,7 @@ //! # use ark_bls12_377::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate random `G1` and `G2` elements. //! let a_native = G1Projective::rand(&mut rng); diff --git a/bls12_377/src/curves/tests.rs b/bls12_377/src/curves/tests.rs index 506125c..0edf8f4 100644 --- a/bls12_377/src/curves/tests.rs +++ b/bls12_377/src/curves/tests.rs @@ -1,9 +1,10 @@ #![allow(unused_imports)] use ark_ff::{ fields::{Field, FpParameters, PrimeField, SquareRootField}, - test_rng, One, Zero, + One, Zero, }; use ark_serialize::CanonicalSerialize; +use ark_std::test_rng; use ark_ec::{models::SWModelParameters, AffineCurve, PairingEngine, ProjectiveCurve}; use core::ops::{AddAssign, MulAssign}; diff --git a/bls12_377/src/fields/tests.rs b/bls12_377/src/fields/tests.rs index 0e9d995..d6850b3 100644 --- a/bls12_377/src/fields/tests.rs +++ b/bls12_377/src/fields/tests.rs @@ -4,9 +4,10 @@ use ark_ff::{ fp6_3over2::Fp6Parameters, FftField, FftParameters, Field, Fp2Parameters, FpParameters, PrimeField, SquareRootField, }, - test_rng, One, UniformRand, Zero, + One, UniformRand, Zero, }; use ark_serialize::{buffer_bit_byte_size, CanonicalSerialize}; +use ark_std::test_rng; use core::{ cmp::Ordering, ops::{AddAssign, MulAssign, SubAssign}, diff --git a/bls12_381/src/curves/tests.rs b/bls12_381/src/curves/tests.rs index 6490e3c..dfde227 100644 --- a/bls12_381/src/curves/tests.rs +++ b/bls12_381/src/curves/tests.rs @@ -2,9 +2,10 @@ use ark_ec::{models::SWModelParameters, AffineCurve, PairingEngine, ProjectiveCurve}; use ark_ff::{ fields::{Field, FpParameters, PrimeField, SquareRootField}, - test_rng, One, Zero, + One, Zero, }; use ark_serialize::CanonicalSerialize; +use ark_std::test_rng; use core::ops::{AddAssign, MulAssign}; use rand::Rng; diff --git a/bn254/src/curves/tests.rs b/bn254/src/curves/tests.rs index 753feca..d1b9d8c 100644 --- a/bn254/src/curves/tests.rs +++ b/bn254/src/curves/tests.rs @@ -2,9 +2,10 @@ use ark_ec::{models::SWModelParameters, AffineCurve, PairingEngine, ProjectiveCurve}; use ark_ff::{ fields::{Field, FpParameters, PrimeField, SquareRootField}, - test_rng, One, Zero, + One, Zero, }; use ark_serialize::CanonicalSerialize; +use ark_std::test_rng; use core::ops::{AddAssign, MulAssign}; use rand::Rng; diff --git a/bw6_761/src/curves/tests.rs b/bw6_761/src/curves/tests.rs index 3ffd116..f17639d 100644 --- a/bw6_761/src/curves/tests.rs +++ b/bw6_761/src/curves/tests.rs @@ -1,5 +1,6 @@ use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; -use ark_ff::{test_rng, Field, One, PrimeField}; +use ark_ff::{Field, One, PrimeField}; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/bw6_761/src/fields/tests.rs b/bw6_761/src/fields/tests.rs index 0609b52..a3f0b32 100644 --- a/bw6_761/src/fields/tests.rs +++ b/bw6_761/src/fields/tests.rs @@ -1,4 +1,5 @@ -use ark_ff::{test_rng, Field, PrimeField}; +use ark_ff::{Field, PrimeField}; +use ark_std::test_rng; use ark_serialize::{buffer_bit_byte_size, CanonicalSerialize}; use rand::Rng; diff --git a/cp6_782/src/curves/tests.rs b/cp6_782/src/curves/tests.rs index 036b23d..156acfd 100644 --- a/cp6_782/src/curves/tests.rs +++ b/cp6_782/src/curves/tests.rs @@ -1,5 +1,6 @@ use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; -use ark_ff::{test_rng, Field, One, PrimeField}; +use ark_ff::{Field, One, PrimeField}; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/cp6_782/src/fields/tests.rs b/cp6_782/src/fields/tests.rs index 0609b52..a3f0b32 100644 --- a/cp6_782/src/fields/tests.rs +++ b/cp6_782/src/fields/tests.rs @@ -1,4 +1,5 @@ -use ark_ff::{test_rng, Field, PrimeField}; +use ark_ff::{Field, PrimeField}; +use ark_std::test_rng; use ark_serialize::{buffer_bit_byte_size, CanonicalSerialize}; use rand::Rng; diff --git a/curve-constraint-tests/src/lib.rs b/curve-constraint-tests/src/lib.rs index daa8452..ad1a454 100644 --- a/curve-constraint-tests/src/lib.rs +++ b/curve-constraint-tests/src/lib.rs @@ -6,7 +6,8 @@ pub mod fields { use rand::{self, SeedableRng}; use rand_xorshift::XorShiftRng; - use ark_ff::{test_rng, BitIteratorLE, Field, UniformRand}; + use ark_ff::{BitIteratorLE, Field, UniformRand}; + use ark_std::test_rng; use ark_r1cs_std::prelude::*; use ark_relations::r1cs::{ConstraintSystem, SynthesisError}; use ark_std::vec::Vec; diff --git a/ed_on_bls12_377/src/constraints/mod.rs b/ed_on_bls12_377/src/constraints/mod.rs index e463b74..3aff348 100644 --- a/ed_on_bls12_377/src/constraints/mod.rs +++ b/ed_on_bls12_377/src/constraints/mod.rs @@ -19,7 +19,7 @@ //! let cs = ConstraintSystem::::new_ref(); //! // This rng is just for test purposes; do not use it //! // in real applications. -//! let mut rng = ark_ff::test_rng(); +//! let mut rng = ark_std::test_rng(); //! //! // Generate some random `Fq` elements. //! let a_native = Fq::rand(&mut rng); @@ -66,7 +66,7 @@ //! # use ark_ed_on_bls12_377::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate some random `Edwards` elements. //! let a_native = EdwardsProjective::rand(&mut rng); diff --git a/ed_on_bls12_377/src/curves/tests.rs b/ed_on_bls12_377/src/curves/tests.rs index 79942a0..163d129 100644 --- a/ed_on_bls12_377/src/curves/tests.rs +++ b/ed_on_bls12_377/src/curves/tests.rs @@ -1,5 +1,5 @@ use ark_ec::{AffineCurve, ProjectiveCurve}; -use ark_ff::test_rng; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/ed_on_bls12_377/src/fields/tests.rs b/ed_on_bls12_377/src/fields/tests.rs index 07657e9..da5f655 100644 --- a/ed_on_bls12_377/src/fields/tests.rs +++ b/ed_on_bls12_377/src/fields/tests.rs @@ -1,4 +1,4 @@ -use ark_ff::test_rng; +use ark_std::test_rng; use rand::Rng; use crate::{Fq, Fr}; diff --git a/ed_on_bls12_381/src/constraints/mod.rs b/ed_on_bls12_381/src/constraints/mod.rs index bfbb5db..3e45360 100644 --- a/ed_on_bls12_381/src/constraints/mod.rs +++ b/ed_on_bls12_381/src/constraints/mod.rs @@ -19,7 +19,7 @@ //! let cs = ConstraintSystem::::new_ref(); //! // This rng is just for test purposes; do not use it //! // in real applications. -//! let mut rng = ark_ff::test_rng(); +//! let mut rng = ark_std::test_rng(); //! //! // Generate some random `Fq` elements. //! let a_native = Fq::rand(&mut rng); @@ -66,7 +66,7 @@ //! # use ark_ed_on_bls12_381::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate some random `Edwards` elements. //! let a_native = EdwardsProjective::rand(&mut rng); diff --git a/ed_on_bls12_381/src/curves/tests.rs b/ed_on_bls12_381/src/curves/tests.rs index 6a2c2df..1f79984 100644 --- a/ed_on_bls12_381/src/curves/tests.rs +++ b/ed_on_bls12_381/src/curves/tests.rs @@ -1,5 +1,6 @@ use ark_ec::{AffineCurve, ProjectiveCurve}; -use ark_ff::{bytes::FromBytes, test_rng, Zero}; +use ark_ff::{bytes::FromBytes, Zero}; +use ark_std::test_rng; use core::str::FromStr; use rand::Rng; diff --git a/ed_on_bls12_381/src/fields/tests.rs b/ed_on_bls12_381/src/fields/tests.rs index 20cd07a..2dde68b 100644 --- a/ed_on_bls12_381/src/fields/tests.rs +++ b/ed_on_bls12_381/src/fields/tests.rs @@ -3,8 +3,9 @@ use ark_ff::{ biginteger::BigInteger256 as BigInteger, bytes::{FromBytes, ToBytes}, fields::{Field, LegendreSymbol::*, SquareRootField}, - test_rng, One, Zero, + One, Zero, }; +use ark_std::test_rng; use ark_curve_tests::fields::*; diff --git a/ed_on_bn254/src/constraints/mod.rs b/ed_on_bn254/src/constraints/mod.rs index f5fd9a7..04246ea 100644 --- a/ed_on_bn254/src/constraints/mod.rs +++ b/ed_on_bn254/src/constraints/mod.rs @@ -19,7 +19,7 @@ //! let cs = ConstraintSystem::::new_ref(); //! // This rng is just for test purposes; do not use it //! // in real applications. -//! let mut rng = ark_ff::test_rng(); +//! let mut rng = ark_std::test_rng(); //! //! // Generate some random `Fq` elements. //! let a_native = Fq::rand(&mut rng); @@ -66,7 +66,7 @@ //! # use ark_ed_on_bn254::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate some random `Edwards` elements. //! let a_native = EdwardsProjective::rand(&mut rng); diff --git a/ed_on_bn254/src/curves/tests.rs b/ed_on_bn254/src/curves/tests.rs index 25038fa..8a1a074 100644 --- a/ed_on_bn254/src/curves/tests.rs +++ b/ed_on_bn254/src/curves/tests.rs @@ -1,5 +1,6 @@ use ark_ec::{AffineCurve, ProjectiveCurve}; -use ark_ff::{bytes::FromBytes, test_rng, Zero}; +use ark_ff::{bytes::FromBytes, Zero}; +use ark_std::test_rng; use core::str::FromStr; use rand::Rng; diff --git a/ed_on_bn254/src/fields/tests.rs b/ed_on_bn254/src/fields/tests.rs index 8988406..69d6517 100644 --- a/ed_on_bn254/src/fields/tests.rs +++ b/ed_on_bn254/src/fields/tests.rs @@ -3,8 +3,9 @@ use ark_ff::{ biginteger::BigInteger256 as BigInteger, bytes::{FromBytes, ToBytes}, fields::{Field, LegendreSymbol::*, SquareRootField}, - test_rng, One, Zero, + One, Zero, }; +use ark_std::test_rng; use ark_curve_tests::fields::*; diff --git a/ed_on_bw6_761/src/constraints/mod.rs b/ed_on_bw6_761/src/constraints/mod.rs index f892b8e..da05d8d 100644 --- a/ed_on_bw6_761/src/constraints/mod.rs +++ b/ed_on_bw6_761/src/constraints/mod.rs @@ -19,7 +19,7 @@ //! let cs = ConstraintSystem::::new_ref(); //! // This rng is just for test purposes; do not use it //! // in real applications. -//! let mut rng = ark_ff::test_rng(); +//! let mut rng = ark_std::test_rng(); //! //! // Generate some random `Fq` elements. //! let a_native = Fq::rand(&mut rng); @@ -66,7 +66,7 @@ //! # use ark_ed_on_bw6_761::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate some random `Edwards` elements. //! let a_native = EdwardsProjective::rand(&mut rng); diff --git a/ed_on_cp6_782/src/constraints/mod.rs b/ed_on_cp6_782/src/constraints/mod.rs index 29a555b..260f40c 100644 --- a/ed_on_cp6_782/src/constraints/mod.rs +++ b/ed_on_cp6_782/src/constraints/mod.rs @@ -20,7 +20,7 @@ //! let cs = ConstraintSystem::::new_ref(); //! // This rng is just for test purposes; do not use it //! // in real applications. -//! let mut rng = ark_ff::test_rng(); +//! let mut rng = ark_std::test_rng(); //! //! // Generate some random `Fq` elements. //! let a_native = Fq::rand(&mut rng); @@ -67,7 +67,7 @@ //! # use ark_ed_on_cp6_782::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate some random `Edwards` elements. //! let a_native = EdwardsProjective::rand(&mut rng); diff --git a/ed_on_cp6_782/src/curves/tests.rs b/ed_on_cp6_782/src/curves/tests.rs index 79942a0..163d129 100644 --- a/ed_on_cp6_782/src/curves/tests.rs +++ b/ed_on_cp6_782/src/curves/tests.rs @@ -1,5 +1,5 @@ use ark_ec::{AffineCurve, ProjectiveCurve}; -use ark_ff::test_rng; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/ed_on_cp6_782/src/fields/tests.rs b/ed_on_cp6_782/src/fields/tests.rs index 07657e9..da5f655 100644 --- a/ed_on_cp6_782/src/fields/tests.rs +++ b/ed_on_cp6_782/src/fields/tests.rs @@ -1,4 +1,4 @@ -use ark_ff::test_rng; +use ark_std::test_rng; use rand::Rng; use crate::{Fq, Fr}; diff --git a/ed_on_mnt4_298/src/constraints/mod.rs b/ed_on_mnt4_298/src/constraints/mod.rs index dbafb8b..5a83a95 100644 --- a/ed_on_mnt4_298/src/constraints/mod.rs +++ b/ed_on_mnt4_298/src/constraints/mod.rs @@ -19,7 +19,7 @@ //! let cs = ConstraintSystem::::new_ref(); //! // This rng is just for test purposes; do not use it //! // in real applications. -//! let mut rng = ark_ff::test_rng(); +//! let mut rng = ark_std::test_rng(); //! //! // Generate some random `Fq` elements. //! let a_native = Fq::rand(&mut rng); @@ -66,7 +66,7 @@ //! # use ark_ed_on_mnt4_298::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate some random `Edwards` elements. //! let a_native = EdwardsProjective::rand(&mut rng); diff --git a/ed_on_mnt4_298/src/curves/tests.rs b/ed_on_mnt4_298/src/curves/tests.rs index 8530221..0b800e8 100644 --- a/ed_on_mnt4_298/src/curves/tests.rs +++ b/ed_on_mnt4_298/src/curves/tests.rs @@ -1,5 +1,5 @@ use ark_ec::{AffineCurve, ProjectiveCurve}; -use ark_ff::test_rng; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/ed_on_mnt4_298/src/fields/tests.rs b/ed_on_mnt4_298/src/fields/tests.rs index 3776db0..5bfff58 100644 --- a/ed_on_mnt4_298/src/fields/tests.rs +++ b/ed_on_mnt4_298/src/fields/tests.rs @@ -1,4 +1,4 @@ -use ark_ff::test_rng; +use ark_std::test_rng; use rand::Rng; use crate::fields::*; diff --git a/ed_on_mnt4_753/src/constraints/mod.rs b/ed_on_mnt4_753/src/constraints/mod.rs index c221a6f..a013e0b 100644 --- a/ed_on_mnt4_753/src/constraints/mod.rs +++ b/ed_on_mnt4_753/src/constraints/mod.rs @@ -19,7 +19,7 @@ //! let cs = ConstraintSystem::::new_ref(); //! // This rng is just for test purposes; do not use it //! // in real applications. -//! let mut rng = ark_ff::test_rng(); +//! let mut rng = ark_std::test_rng(); //! //! // Generate some random `Fq` elements. //! let a_native = Fq::rand(&mut rng); @@ -66,7 +66,7 @@ //! # use ark_ed_on_mnt4_753::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate some random `Edwards` elements. //! let a_native = EdwardsProjective::rand(&mut rng); diff --git a/ed_on_mnt4_753/src/curves/tests.rs b/ed_on_mnt4_753/src/curves/tests.rs index 8530221..0b800e8 100644 --- a/ed_on_mnt4_753/src/curves/tests.rs +++ b/ed_on_mnt4_753/src/curves/tests.rs @@ -1,5 +1,5 @@ use ark_ec::{AffineCurve, ProjectiveCurve}; -use ark_ff::test_rng; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/ed_on_mnt4_753/src/fields/tests.rs b/ed_on_mnt4_753/src/fields/tests.rs index d57fbf1..4a68f1e 100644 --- a/ed_on_mnt4_753/src/fields/tests.rs +++ b/ed_on_mnt4_753/src/fields/tests.rs @@ -1,4 +1,4 @@ -use ark_ff::test_rng; +use ark_std::test_rng; use rand::Rng; use crate::{Fq, Fr}; diff --git a/mnt4_298/src/constraints/mod.rs b/mnt4_298/src/constraints/mod.rs index 81f8d16..40cc808 100644 --- a/mnt4_298/src/constraints/mod.rs +++ b/mnt4_298/src/constraints/mod.rs @@ -20,7 +20,7 @@ //! let cs = ConstraintSystem::::new_ref(); //! // This rng is just for test purposes; do not use it //! // in real applications. -//! let mut rng = ark_ff::test_rng(); +//! let mut rng = ark_std::test_rng(); //! //! // Generate some random `Fq` elements. //! let a_native = Fq::rand(&mut rng); @@ -67,7 +67,7 @@ //! # use ark_mnt4_298::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate some random `G1` elements. //! let a_native = G1Projective::rand(&mut rng); @@ -112,7 +112,7 @@ //! # use ark_mnt4_298::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate random `G1` and `G2` elements. //! let a_native = G1Projective::rand(&mut rng); diff --git a/mnt4_298/src/curves/tests.rs b/mnt4_298/src/curves/tests.rs index 6c09a27..554b453 100644 --- a/mnt4_298/src/curves/tests.rs +++ b/mnt4_298/src/curves/tests.rs @@ -1,5 +1,6 @@ use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; -use ark_ff::{test_rng, Field, One, PrimeField, UniformRand}; +use ark_ff::{Field, One, PrimeField, UniformRand}; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/mnt4_298/src/fields/tests.rs b/mnt4_298/src/fields/tests.rs index 9891d3a..23d980a 100644 --- a/mnt4_298/src/fields/tests.rs +++ b/mnt4_298/src/fields/tests.rs @@ -1,4 +1,5 @@ -use ark_ff::{test_rng, Field}; +use ark_ff::Field; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/mnt4_753/src/constraints/mod.rs b/mnt4_753/src/constraints/mod.rs index e84643f..d7f821e 100644 --- a/mnt4_753/src/constraints/mod.rs +++ b/mnt4_753/src/constraints/mod.rs @@ -20,7 +20,7 @@ //! let cs = ConstraintSystem::::new_ref(); //! // This rng is just for test purposes; do not use it //! // in real applications. -//! let mut rng = ark_ff::test_rng(); +//! let mut rng = ark_std::test_rng(); //! //! // Generate some random `Fq` elements. //! let a_native = Fq::rand(&mut rng); @@ -67,7 +67,7 @@ //! # use ark_mnt4_753::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate some random `G1` elements. //! let a_native = G1Projective::rand(&mut rng); @@ -112,7 +112,7 @@ //! # use ark_mnt4_753::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate random `G1` and `G2` elements. //! let a_native = G1Projective::rand(&mut rng); diff --git a/mnt4_753/src/curves/tests.rs b/mnt4_753/src/curves/tests.rs index dc47106..2f23165 100644 --- a/mnt4_753/src/curves/tests.rs +++ b/mnt4_753/src/curves/tests.rs @@ -1,5 +1,6 @@ use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; -use ark_ff::{test_rng, Field, One, PrimeField, UniformRand}; +use ark_ff::{Field, One, PrimeField, UniformRand}; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/mnt4_753/src/fields/tests.rs b/mnt4_753/src/fields/tests.rs index 9891d3a..23d980a 100644 --- a/mnt4_753/src/fields/tests.rs +++ b/mnt4_753/src/fields/tests.rs @@ -1,4 +1,5 @@ -use ark_ff::{test_rng, Field}; +use ark_ff::Field; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/mnt6_298/src/constraints/mod.rs b/mnt6_298/src/constraints/mod.rs index e4f3ad1..4213439 100644 --- a/mnt6_298/src/constraints/mod.rs +++ b/mnt6_298/src/constraints/mod.rs @@ -20,7 +20,7 @@ //! let cs = ConstraintSystem::::new_ref(); //! // This rng is just for test purposes; do not use it //! // in real applications. -//! let mut rng = ark_ff::test_rng(); +//! let mut rng = ark_std::test_rng(); //! //! // Generate some random `Fq` elements. //! let a_native = Fq::rand(&mut rng); @@ -67,7 +67,7 @@ //! # use ark_mnt6_298::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate some random `G1` elements. //! let a_native = G1Projective::rand(&mut rng); @@ -112,7 +112,7 @@ //! # use ark_mnt6_298::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate random `G1` and `G2` elements. //! let a_native = G1Projective::rand(&mut rng); diff --git a/mnt6_298/src/curves/tests.rs b/mnt6_298/src/curves/tests.rs index 0e9635b..4782291 100644 --- a/mnt6_298/src/curves/tests.rs +++ b/mnt6_298/src/curves/tests.rs @@ -1,5 +1,6 @@ use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; -use ark_ff::{test_rng, Field, One, PrimeField, UniformRand}; +use ark_ff::{Field, One, PrimeField, UniformRand}; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/mnt6_298/src/fields/tests.rs b/mnt6_298/src/fields/tests.rs index fa001cc..f9e286a 100644 --- a/mnt6_298/src/fields/tests.rs +++ b/mnt6_298/src/fields/tests.rs @@ -1,7 +1,8 @@ use ark_ff::{ fields::{models::fp6_2over3::*, quadratic_extension::QuadExtParameters}, - test_rng, Field, + Field, }; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/mnt6_753/src/constraints/mod.rs b/mnt6_753/src/constraints/mod.rs index c3d6179..175fbf9 100644 --- a/mnt6_753/src/constraints/mod.rs +++ b/mnt6_753/src/constraints/mod.rs @@ -20,7 +20,7 @@ //! let cs = ConstraintSystem::::new_ref(); //! // This rng is just for test purposes; do not use it //! // in real applications. -//! let mut rng = ark_ff::test_rng(); +//! let mut rng = ark_std::test_rng(); //! //! // Generate some random `Fq` elements. //! let a_native = Fq::rand(&mut rng); @@ -67,7 +67,7 @@ //! # use ark_mnt6_753::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate some random `G1` elements. //! let a_native = G1Projective::rand(&mut rng); @@ -112,7 +112,7 @@ //! # use ark_mnt6_753::{*, constraints::*}; //! //! # let cs = ConstraintSystem::::new_ref(); -//! # let mut rng = ark_ff::test_rng(); +//! # let mut rng = ark_std::test_rng(); //! //! // Generate random `G1` and `G2` elements. //! let a_native = G1Projective::rand(&mut rng); diff --git a/mnt6_753/src/curves/tests.rs b/mnt6_753/src/curves/tests.rs index f8d27f3..23971c6 100644 --- a/mnt6_753/src/curves/tests.rs +++ b/mnt6_753/src/curves/tests.rs @@ -1,5 +1,6 @@ use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; -use ark_ff::{test_rng, Field, One, PrimeField, UniformRand}; +use ark_ff::{Field, One, PrimeField, UniformRand}; +use ark_std::test_rng; use rand::Rng; use crate::*; diff --git a/mnt6_753/src/fields/tests.rs b/mnt6_753/src/fields/tests.rs index fa001cc..f9e286a 100644 --- a/mnt6_753/src/fields/tests.rs +++ b/mnt6_753/src/fields/tests.rs @@ -1,7 +1,8 @@ use ark_ff::{ fields::{models::fp6_2over3::*, quadratic_extension::QuadExtParameters}, - test_rng, Field, + Field, }; +use ark_std::test_rng; use rand::Rng; use crate::*;