Update r1cs error

This commit is contained in:
howardwu 2021-03-04 10:39:22 -08:00
parent 3c4b8e9f68
commit b95495bab3
9 changed files with 9 additions and 9 deletions

View File

@ -27,7 +27,7 @@ use leo_ast::Identifier;
use leo_ast::PositiveNumber;
use leo_ast::Span;
use snarkvm_errors::gadgets::SynthesisError;
use snarkvm_r1cs::SynthesisError;
use std::path::Path;
#[derive(Debug, Error)]

View File

@ -17,8 +17,8 @@
use leo_ast::Error as FormattedError;
use leo_ast::Span;
use snarkvm_errors::gadgets::SynthesisError;
use snarkvm_errors::objects::account::AccountError;
use snarkvm_r1cs::SynthesisError;
use std::path::Path;
#[derive(Debug, Error)]

View File

@ -17,7 +17,7 @@
use leo_ast::Error as FormattedError;
use leo_ast::Span;
use snarkvm_errors::gadgets::SynthesisError;
use snarkvm_r1cs::SynthesisError;
use std::path::Path;
#[derive(Debug, Error)]

View File

@ -22,11 +22,11 @@ use crate::GroupType;
use leo_ast::InputValue;
use leo_ast::Span;
use snarkvm_errors::gadgets::SynthesisError;
use snarkvm_gadgets::traits::alloc::AllocGadget;
use snarkvm_gadgets::traits::boolean::Boolean;
use snarkvm_models::curves::PrimeField;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::SynthesisError;
pub(crate) fn allocate_bool<F: PrimeField, CS: ConstraintSystem<F>>(
cs: &mut CS,

View File

@ -23,9 +23,9 @@ use leo_asg::GroupValue;
use leo_asg::Span;
use leo_ast::InputValue;
use snarkvm_errors::gadgets::SynthesisError;
use snarkvm_models::curves::PrimeField;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::SynthesisError;
pub(crate) fn allocate_group<F: PrimeField, G: GroupType<F>, CS: ConstraintSystem<F>>(
cs: &mut CS,

View File

@ -25,7 +25,6 @@ use snarkvm_curves::edwards_bls12::EdwardsAffine;
use snarkvm_curves::edwards_bls12::EdwardsParameters;
use snarkvm_curves::edwards_bls12::Fq;
use snarkvm_curves::templates::twisted_edwards_extended::GroupAffine;
use snarkvm_errors::gadgets::SynthesisError;
use snarkvm_gadgets::curves::edwards_bls12::EdwardsBlsGadget;
use snarkvm_gadgets::traits::alloc::AllocGadget;
use snarkvm_gadgets::traits::boolean::Boolean;
@ -46,6 +45,7 @@ use snarkvm_models::gadgets::curves::FieldGadget;
use snarkvm_models::gadgets::curves::FpGadget;
use snarkvm_models::gadgets::curves::GroupGadget;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::SynthesisError;
use std::borrow::Borrow;
use std::ops::Mul;
use std::ops::Neg;

View File

@ -16,10 +16,10 @@
use crate::bits::RippleCarryAdder;
use snarkvm_errors::gadgets::SynthesisError;
use snarkvm_fields::Field;
use snarkvm_gadgets::traits::boolean::Boolean;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::SynthesisError;
use std::iter;

View File

@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
use snarkvm_errors::gadgets::SynthesisError;
use snarkvm_fields::Field;
use snarkvm_gadgets::traits::boolean::Boolean;
use snarkvm_gadgets::traits::select::CondSelectGadget;
@ -25,6 +24,7 @@ use snarkvm_gadgets::traits::uint::UInt64;
use snarkvm_gadgets::traits::uint::UInt8;
use snarkvm_models::curves::PrimeField;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::SynthesisError;
pub trait EvaluateLtGadget<F: Field> {
fn less_than<CS: ConstraintSystem<F>>(&self, cs: CS, other: &Self) -> Result<Boolean, SynthesisError>;

View File

@ -16,11 +16,11 @@
use crate::signed_integer::*;
use snarkvm_errors::gadgets::SynthesisError;
use snarkvm_gadgets::traits::boolean::Boolean;
use snarkvm_gadgets::traits::eq::ConditionalEqGadget;
use snarkvm_models::curves::PrimeField;
use snarkvm_r1cs::ConstraintSystem;
use snarkvm_r1cs::SynthesisError;
macro_rules! cond_eq_int_impl {
($($gadget: ident),*) => ($(