Replace rand with ark_std::rand (#42)

* replace rand

* update CHANGELOG

* fmt

* fix

* fix
This commit is contained in:
Weikeng Chen
2021-02-04 20:12:47 -08:00
committed by GitHub
parent 684969909b
commit 74f6efb821
66 changed files with 138 additions and 196 deletions

View File

@@ -19,8 +19,6 @@ ark-ff = { git = "https://github.com/arkworks-rs/algebra", default-features = fa
ark-relations = { git = "https://github.com/arkworks-rs/snark", default-features = false }
ark-r1cs-std = { git = "https://github.com/arkworks-rs/r1cs-std", default-features = false }
ark-ec = { git = "https://github.com/arkworks-rs/algebra", default-features = false }
rand = { version = "0.7", default-features = false}
rand_xorshift = { version = "0.2", default-features = false}
[features]
default = []

View File

@@ -2,9 +2,6 @@
extern crate ark_relations;
pub mod fields {
use rand::{self, SeedableRng};
use rand_xorshift::XorShiftRng;
use ark_ff::{BitIteratorLE, Field, UniformRand};
use ark_r1cs_std::prelude::*;
use ark_relations::r1cs::{ConstraintSystem, SynthesisError};
@@ -217,7 +214,7 @@ pub mod fields {
];
for &mode in &modes {
let cs = ConstraintSystem::<ConstraintF>::new_ref();
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
let mut rng = test_rng();
for i in 0..=maxpower {
let mut a = F::rand(&mut rng);
let mut a_gadget = AF::new_variable(ark_relations::ns!(cs, "a"), || Ok(a), mode)?;