Updates r1cs traits

This commit is contained in:
howardwu 2021-03-04 10:45:37 -08:00
parent 441edff36f
commit 24f5b168aa
15 changed files with 25 additions and 25 deletions

View File

@ -27,8 +27,8 @@ use leo_input::LeoInputParser;
use leo_package::inputs::InputPairs;
use snarkvm_fields::PrimeField;
use snarkvm_models::gadgets::r1cs::TestConstraintSystem;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::TestConstraintSystem;
use std::path::Path;
pub fn generate_constraints<'a, F: PrimeField, G: GroupType<F>, CS: ConstraintSystem<F>>(

View File

@ -30,8 +30,8 @@ use snarkvm_gadgets::traits::utilities::eq::EvaluateEqGadget;
use snarkvm_gadgets::traits::utilities::select::CondSelectGadget;
use snarkvm_gadgets::traits::utilities::uint::UInt;
use snarkvm_gadgets::traits::utilities::uint::UInt8;
use snarkvm_models::gadgets::r1cs::Assignment;
use snarkvm_objects::account::AccountAddress;
use snarkvm_r1cs::Assignment;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::SynthesisError;
use snarkvm_utilities::ToBytes;

View File

@ -51,7 +51,7 @@ use leo_input::types::U32Type;
use leo_input::types::UnsignedIntegerType;
use snarkvm_curves::edwards_bls12::Fq;
use snarkvm_models::gadgets::r1cs::TestConstraintSystem;
use snarkvm_r1cs::TestConstraintSystem;
use std::path::PathBuf;

View File

@ -22,9 +22,9 @@ use leo_gadgets::Int64;
use leo_gadgets::Int8;
use snarkvm_gadgets::traits::utilities::alloc::AllocGadget;
use snarkvm_models::gadgets::r1cs::Fr;
use snarkvm_models::gadgets::r1cs::TestConstraintSystem;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::Fr;
use snarkvm_r1cs::TestConstraintSystem;
use rand::Rng;
use rand::SeedableRng;

View File

@ -29,9 +29,9 @@ use snarkvm_gadgets::traits::utilities::alloc::AllocGadget;
use snarkvm_gadgets::traits::utilities::boolean::AllocatedBit;
use snarkvm_gadgets::traits::utilities::boolean::Boolean;
use snarkvm_models::curves::fp_parameters::FpParameters;
use snarkvm_models::gadgets::r1cs::Assignment;
use snarkvm_models::gadgets::r1cs::LinearCombination;
use snarkvm_r1cs::Assignment;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::LinearCombination;
macro_rules! add_int_impl {
($($gadget: ident)*) => ($(

View File

@ -30,9 +30,9 @@ use snarkvm_gadgets::traits::utilities::boolean::AllocatedBit;
use snarkvm_gadgets::traits::utilities::boolean::Boolean;
use snarkvm_gadgets::traits::utilities::select::CondSelectGadget;
use snarkvm_models::curves::FpParameters;
use snarkvm_models::gadgets::r1cs::Assignment;
use snarkvm_models::gadgets::r1cs::LinearCombination;
use snarkvm_r1cs::Assignment;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::LinearCombination;
use std::iter;

View File

@ -21,7 +21,7 @@ use snarkvm_gadgets::traits::utilities::alloc::AllocGadget;
use snarkvm_gadgets::traits::utilities::boolean::Boolean;
use snarkvm_gadgets::traits::utilities::eq::EqGadget;
use snarkvm_gadgets::traits::utilities::select::CondSelectGadget;
use snarkvm_models::gadgets::r1cs::Assignment;
use snarkvm_r1cs::Assignment;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::SynthesisError;

View File

@ -21,9 +21,9 @@ use snarkvm_gadgets::traits::utilities::alloc::AllocGadget;
use snarkvm_gadgets::traits::utilities::boolean::Boolean;
use snarkvm_models::curves::One;
use snarkvm_models::curves::Zero;
use snarkvm_models::gadgets::r1cs::Fr;
use snarkvm_models::gadgets::r1cs::TestConstraintSystem;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::Fr;
use snarkvm_r1cs::TestConstraintSystem;
use rand::Rng;
use rand_core::SeedableRng;

View File

@ -21,9 +21,9 @@ use snarkvm_gadgets::traits::utilities::alloc::AllocGadget;
use snarkvm_gadgets::traits::utilities::boolean::Boolean;
use snarkvm_models::curves::One;
use snarkvm_models::curves::Zero;
use snarkvm_models::gadgets::r1cs::Fr;
use snarkvm_models::gadgets::r1cs::TestConstraintSystem;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::Fr;
use snarkvm_r1cs::TestConstraintSystem;
use rand::Rng;
use rand_core::SeedableRng;

View File

@ -21,9 +21,9 @@ use snarkvm_gadgets::traits::utilities::alloc::AllocGadget;
use snarkvm_gadgets::traits::utilities::boolean::Boolean;
use snarkvm_models::curves::One;
use snarkvm_models::curves::Zero;
use snarkvm_models::gadgets::r1cs::Fr;
use snarkvm_models::gadgets::r1cs::TestConstraintSystem;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::Fr;
use snarkvm_r1cs::TestConstraintSystem;
use rand::Rng;
use rand_core::SeedableRng;

View File

@ -21,9 +21,9 @@ use snarkvm_gadgets::traits::utilities::alloc::AllocGadget;
use snarkvm_gadgets::traits::utilities::boolean::Boolean;
use snarkvm_models::curves::One;
use snarkvm_models::curves::Zero;
use snarkvm_models::gadgets::r1cs::Fr;
use snarkvm_models::gadgets::r1cs::TestConstraintSystem;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::Fr;
use snarkvm_r1cs::TestConstraintSystem;
use rand::Rng;
use rand_core::SeedableRng;

View File

@ -21,9 +21,9 @@ use snarkvm_gadgets::traits::utilities::alloc::AllocGadget;
use snarkvm_gadgets::traits::utilities::boolean::Boolean;
use snarkvm_models::curves::One;
use snarkvm_models::curves::Zero;
use snarkvm_models::gadgets::r1cs::Fr;
use snarkvm_models::gadgets::r1cs::TestConstraintSystem;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::Fr;
use snarkvm_r1cs::TestConstraintSystem;
use rand::Rng;
use rand_core::SeedableRng;

View File

@ -17,11 +17,11 @@
use snarkvm_curves::traits::PairingEngine;
use snarkvm_fields::Field;
use snarkvm_gadgets::traits::utilities::OptionalVec;
use snarkvm_models::gadgets::r1cs::Index;
use snarkvm_models::gadgets::r1cs::LinearCombination;
use snarkvm_models::gadgets::r1cs::Variable;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::Index;
use snarkvm_r1cs::LinearCombination;
use snarkvm_r1cs::SynthesisError;
use snarkvm_r1cs::Variable;
#[derive(Default)]
pub struct Namespace {

View File

@ -22,8 +22,8 @@ use snarkvm_curves::bls12_377::Bls12_377;
use snarkvm_curves::traits::PairingEngine;
use snarkvm_errors::curves::FieldError;
use snarkvm_gadgets::traits::utilities::OptionalVec;
use snarkvm_models::gadgets::r1cs::Index;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::Index;
use crate::CircuitSynthesizer;
use crate::SerializedField;

View File

@ -16,7 +16,7 @@
use serde::Deserialize;
use serde::Serialize;
use snarkvm_models::gadgets::r1cs::Index;
use snarkvm_r1cs::Index;
#[derive(Serialize, Deserialize)]
pub enum SerializedIndex {