Skip to content

Commit

Permalink
imports
Browse files Browse the repository at this point in the history
  • Loading branch information
TakodaS committed Sep 19, 2023
1 parent b5071fc commit fed7d03
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/rng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -63,12 +62,14 @@ impl<F: PrimeField> CryptographicSponge for SimplePoseidonRng<F> {
}
}

/// Instantiate Poseidon sponge with default parameters
impl<F: PrimeField> Default for SimplePoseidonRng<F> {
fn default() -> Self {
Self(PoseidonSponge::new(&poseidon_parameters_for_test()))
}
}

/// Mock trait for use in Marlin prover
pub trait DefaultSpongeRNG: Default + CryptographicSponge + RngCore {}

impl<F: PrimeField> DefaultSpongeRNG for SimplePoseidonRng<F> {}
Expand Down
4 changes: 2 additions & 2 deletions src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ impl<F: Field> ConstraintSynthesizer<F> for OutlineTestCircuit<F> {

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;
Expand Down

0 comments on commit fed7d03

Please sign in to comment.