Skip to content

Commit

Permalink
Replace rand with ark_std::rand (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
weikengchen authored Feb 5, 2021
1 parent 9221060 commit 681c0f1
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ ark-r1cs-std = { git = "https://github.com/arkworks-rs/r1cs-std", default-featur
tracing = { version = "0.1", default-features = false, features = [ "attributes" ], optional = true }
derivative = { version = "2.0", features = ["use_core"], optional = true}

rand = { version = "0.7", default-features = false }
rayon = { version = "1", optional = true }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use ark_relations::r1cs::{
ConstraintSynthesizer, ConstraintSystem, OptimizationGoal, Result as R1CSResult,
SynthesisError, SynthesisMode,
};
use ark_std::rand::Rng;
use ark_std::{cfg_into_iter, cfg_iter};
use rand::Rng;

#[cfg(feature = "parallel")]
use rayon::prelude::*;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ pub use self::{generator::*, prover::*, verifier::*};
use ark_crypto_primitives::snark::*;
use ark_ec::PairingEngine;
use ark_relations::r1cs::{ConstraintSynthesizer, SynthesisError};
use ark_std::rand::RngCore;
use ark_std::{marker::PhantomData, vec::Vec};
use rand::RngCore;

/// The SNARK of [[Groth16]](https://eprint.iacr.org/2016/260.pdf).
pub struct Groth16<E: PairingEngine> {
Expand Down
2 changes: 1 addition & 1 deletion src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use ark_poly::GeneralEvaluationDomain;
use ark_relations::r1cs::{
ConstraintSynthesizer, ConstraintSystem, OptimizationGoal, Result as R1CSResult,
};
use ark_std::rand::Rng;
use ark_std::{cfg_into_iter, cfg_iter, vec::Vec};
use rand::Rng;

#[cfg(feature = "parallel")]
use rayon::prelude::*;
Expand Down
2 changes: 1 addition & 1 deletion tests/mimc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
)]

// For randomness (during paramgen and proof generation)
use rand::Rng;
use ark_std::rand::Rng;

// For benchmarking
use std::time::{Duration, Instant};
Expand Down

0 comments on commit 681c0f1

Please sign in to comment.