From fed7d03026d73917f83d53900b8f2f2f2dc90ee2 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 19 Sep 2023 12:39:26 +0100 Subject: [PATCH] imports --- src/lib.rs | 1 - src/rng.rs | 3 ++- src/test.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 84385f6..31deedf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,6 @@ #[macro_use] extern crate ark_std; -use ark_crypto_primitives::sponge::CryptographicSponge; use ark_ff::PrimeField; use ark_poly::{univariate::DensePolynomial, EvaluationDomain, GeneralEvaluationDomain}; use ark_poly_commit::challenge::ChallengeGenerator; diff --git a/src/rng.rs b/src/rng.rs index 190f07b..adacb7b 100644 --- a/src/rng.rs +++ b/src/rng.rs @@ -4,7 +4,6 @@ use ark_crypto_primitives::sponge::{Absorb, CryptographicSponge}; use ark_ff::PrimeField; use ark_std::rand::RngCore; -use digest::Digest; /// A simple `FiatShamirRng` that refreshes its seed by hashing together the previous seed /// and the new seed material. @@ -63,12 +62,14 @@ impl CryptographicSponge for SimplePoseidonRng { } } +/// Instantiate Poseidon sponge with default parameters impl Default for SimplePoseidonRng { fn default() -> Self { Self(PoseidonSponge::new(&poseidon_parameters_for_test())) } } +/// Mock trait for use in Marlin prover pub trait DefaultSpongeRNG: Default + CryptographicSponge + RngCore {} impl DefaultSpongeRNG for SimplePoseidonRng {} diff --git a/src/test.rs b/src/test.rs index ca407bc..25a0e2e 100644 --- a/src/test.rs +++ b/src/test.rs @@ -115,12 +115,12 @@ impl ConstraintSynthesizer for OutlineTestCircuit { mod marlin { use super::*; - use crate::rng::{SimplePoseidonRng}; + use crate::rng::SimplePoseidonRng; use crate::Marlin; use ark_bls12_381::{Bls12_381, Fr}; - use ark_ec::{pairing::Pairing}; + use ark_ec::pairing::Pairing; use ark_ff::UniformRand; use ark_poly::polynomial::univariate::DensePolynomial; use ark_poly_commit::marlin_pc::MarlinKZG10;