diff --git a/src/bellperson/r1cs.rs b/src/bellperson/r1cs.rs index 56710f7..ae3388d 100644 --- a/src/bellperson/r1cs.rs +++ b/src/bellperson/r1cs.rs @@ -28,10 +28,7 @@ pub trait NovaShape { fn r1cs_shape(&self) -> (R1CSShape, CommitmentKey); } -impl NovaWitness for SatisfyingAssignment -where - G::Scalar: PrimeField, -{ +impl NovaWitness for SatisfyingAssignment { fn r1cs_instance_and_witness( &self, shape: &R1CSShape, @@ -48,10 +45,7 @@ where } } -impl NovaShape for ShapeCS -where - G::Scalar: PrimeField, -{ +impl NovaShape for ShapeCS { fn r1cs_shape(&self) -> (R1CSShape, CommitmentKey) { let mut A: Vec<(usize, usize, G::Scalar)> = Vec::new(); let mut B: Vec<(usize, usize, G::Scalar)> = Vec::new(); diff --git a/src/bellperson/shape_cs.rs b/src/bellperson/shape_cs.rs index bb96463..a80be8c 100644 --- a/src/bellperson/shape_cs.rs +++ b/src/bellperson/shape_cs.rs @@ -48,10 +48,7 @@ impl Ord for OrderedVariable { #[allow(clippy::upper_case_acronyms)] /// `ShapeCS` is a `ConstraintSystem` for creating `R1CSShape`s for a circuit. -pub struct ShapeCS -where - G::Scalar: PrimeField + Field, -{ +pub struct ShapeCS { named_objects: HashMap, current_namespace: Vec, #[allow(clippy::type_complexity)] @@ -92,10 +89,7 @@ fn proc_lc( map } -impl ShapeCS -where - G::Scalar: PrimeField, -{ +impl ShapeCS { /// Create a new, default `ShapeCS`, pub fn new() -> Self { ShapeCS::default() @@ -216,10 +210,7 @@ where } } -impl Default for ShapeCS -where - G::Scalar: PrimeField, -{ +impl Default for ShapeCS { fn default() -> Self { let mut map = HashMap::new(); map.insert("ONE".into(), NamedObject::Var(ShapeCS::::one())); @@ -233,10 +224,7 @@ where } } -impl ConstraintSystem for ShapeCS -where - G::Scalar: PrimeField, -{ +impl ConstraintSystem for ShapeCS { type Root = Self; fn alloc(&mut self, annotation: A, _f: F) -> Result diff --git a/src/bellperson/solver.rs b/src/bellperson/solver.rs index 0eaf088..2357724 100644 --- a/src/bellperson/solver.rs +++ b/src/bellperson/solver.rs @@ -1,7 +1,7 @@ //! Support for generating R1CS witness using bellperson. use crate::traits::Group; -use ff::{Field, PrimeField}; +use ff::Field; use bellperson::{ multiexp::DensityTracker, ConstraintSystem, Index, LinearCombination, SynthesisError, Variable, @@ -9,10 +9,7 @@ use bellperson::{ /// A `ConstraintSystem` which calculates witness values for a concrete instance of an R1CS circuit. #[derive(PartialEq)] -pub struct SatisfyingAssignment -where - G::Scalar: PrimeField, -{ +pub struct SatisfyingAssignment { // Density of queries a_aux_density: DensityTracker, b_input_density: DensityTracker, @@ -29,10 +26,7 @@ where } use std::fmt; -impl fmt::Debug for SatisfyingAssignment -where - G::Scalar: PrimeField, -{ +impl fmt::Debug for SatisfyingAssignment { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { fmt .debug_struct("SatisfyingAssignment") @@ -69,10 +63,7 @@ where } } -impl ConstraintSystem for SatisfyingAssignment -where - G::Scalar: PrimeField, -{ +impl ConstraintSystem for SatisfyingAssignment { type Root = Self; fn new() -> Self { diff --git a/src/traits/mod.rs b/src/traits/mod.rs index ffad871..91d8d32 100644 --- a/src/traits/mod.rs +++ b/src/traits/mod.rs @@ -41,8 +41,7 @@ pub trait Group: + for<'de> Deserialize<'de>; /// A type representing an element of the scalar field of the group - type Scalar: PrimeField - + PrimeFieldBits + type Scalar: PrimeFieldBits + PrimeFieldExt + Send + Sync