mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-29 03:35:10 +03:00
Update r1cs error
This commit is contained in:
parent
3c4b8e9f68
commit
b95495bab3
@ -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)]
|
||||
|
@ -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)]
|
||||
|
@ -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)]
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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>;
|
||||
|
@ -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),*) => ($(
|
||||
|
Loading…
Reference in New Issue
Block a user