Browse Source

Fix Vec imports for no_std

master
Pascal Berrang 4 years ago
committed by Pratyush Mishra
parent
commit
d4a2d31d07
9 changed files with 26 additions and 12 deletions
  1. +1
    -1
      crypto-primitives/src/commitment/blake2s/constraints.rs
  2. +1
    -0
      crypto-primitives/src/commitment/pedersen/constraints.rs
  3. +7
    -4
      crypto-primitives/src/crh/bowe_hopwood/constraints.rs
  4. +6
    -3
      crypto-primitives/src/crh/pedersen/constraints.rs
  5. +4
    -1
      crypto-primitives/src/nizk/gm17/constraints.rs
  6. +4
    -1
      crypto-primitives/src/nizk/groth16/constraints.rs
  7. +1
    -1
      crypto-primitives/src/prf/blake2s/constraints.rs
  8. +1
    -1
      crypto-primitives/src/prf/constraints.rs
  9. +1
    -0
      crypto-primitives/src/signature/schnorr/constraints.rs

+ 1
- 1
crypto-primitives/src/commitment/blake2s/constraints.rs

@ -3,7 +3,7 @@ use r1cs_core::{ConstraintSystem, SynthesisError};
use crate::{
commitment::blake2s::Blake2sCommitment,
prf::blake2s::constraints::{blake2s_gadget, Blake2sOutputGadget},
CommitmentGadget,
CommitmentGadget, Vec,
};
use algebra_core::{Field, PrimeField};
use r1cs_std::prelude::*;

+ 1
- 0
crypto-primitives/src/commitment/pedersen/constraints.rs

@ -1,6 +1,7 @@
use crate::{
commitment::pedersen::{PedersenCommitment, PedersenParameters, PedersenRandomness},
crh::pedersen::PedersenWindow,
Vec,
};
use algebra_core::{
fields::{Field, PrimeField},

+ 7
- 4
crypto-primitives/src/crh/bowe_hopwood/constraints.rs

@ -1,9 +1,12 @@
use core::{borrow::Borrow, hash::Hash, marker::PhantomData};
use crate::crh::{
bowe_hopwood::{BoweHopwoodPedersenCRH, BoweHopwoodPedersenParameters, CHUNK_SIZE},
pedersen::PedersenWindow,
FixedLengthCRHGadget,
use crate::{
crh::{
bowe_hopwood::{BoweHopwoodPedersenCRH, BoweHopwoodPedersenParameters, CHUNK_SIZE},
pedersen::PedersenWindow,
FixedLengthCRHGadget,
},
Vec,
};
use algebra_core::{groups::Group, Field};
use r1cs_core::{ConstraintSystem, SynthesisError};

+ 6
- 3
crypto-primitives/src/crh/pedersen/constraints.rs

@ -1,6 +1,9 @@
use crate::crh::{
pedersen::{PedersenCRH, PedersenParameters, PedersenWindow},
FixedLengthCRHGadget,
use crate::{
crh::{
pedersen::{PedersenCRH, PedersenParameters, PedersenWindow},
FixedLengthCRHGadget,
},
Vec,
};
use algebra_core::{Field, Group};
use r1cs_core::{ConstraintSystem, SynthesisError};

+ 4
- 1
crypto-primitives/src/nizk/gm17/constraints.rs

@ -1,4 +1,7 @@
use crate::nizk::{gm17::Gm17, NIZKVerifierGadget};
use crate::{
nizk::{gm17::Gm17, NIZKVerifierGadget},
Vec,
};
use algebra_core::{AffineCurve, Field, PairingEngine, ToConstraintField};
use r1cs_core::{ConstraintSynthesizer, ConstraintSystem, SynthesisError};
use r1cs_std::prelude::*;

+ 4
- 1
crypto-primitives/src/nizk/groth16/constraints.rs

@ -1,4 +1,7 @@
use crate::nizk::{groth16::Groth16, NIZKVerifierGadget};
use crate::{
nizk::{groth16::Groth16, NIZKVerifierGadget},
Vec,
};
use algebra_core::{AffineCurve, Field, PairingEngine, ToConstraintField};
use r1cs_core::{ConstraintSynthesizer, ConstraintSystem, SynthesisError};
use r1cs_std::prelude::*;

+ 1
- 1
crypto-primitives/src/prf/blake2s/constraints.rs

@ -1,7 +1,7 @@
use algebra_core::PrimeField;
use r1cs_core::{ConstraintSystem, SynthesisError};
use crate::prf::PRFGadget;
use crate::{prf::PRFGadget, Vec};
use r1cs_std::prelude::*;
use core::borrow::Borrow;

+ 1
- 1
crypto-primitives/src/prf/constraints.rs

@ -1,7 +1,7 @@
use algebra_core::Field;
use core::fmt::Debug;
use crate::prf::PRF;
use crate::{prf::PRF, Vec};
use r1cs_core::{ConstraintSystem, SynthesisError};
use r1cs_std::prelude::*;

+ 1
- 0
crypto-primitives/src/signature/schnorr/constraints.rs

@ -1,3 +1,4 @@
use crate::Vec;
use algebra_core::{groups::Group, Field};
use r1cs_core::{ConstraintSystem, SynthesisError};
use r1cs_std::prelude::*;

Loading…
Cancel
Save