pub fn verify<CS: r1cs::ConstraintSystem>(self, cs: &mut CS) -> Result<(), VMError> {
        cs.specify_randomized_constraints(move |cs| {
            // Flatten the constraint into one expression
            // Note: cloning because we can't move out of captured variable in an `Fn` closure,
            // and `Box<FnOnce>` is not fully supported yet. (We can update when that happens).
            // Cf. https://github.com/dalek-cryptography/bulletproofs/issues/244
            let (expr, _) = self.clone().flatten(cs)?;

            // Add the resulting expression to the constraint system
            cs.constrain(expr);

            Ok(())
        })
        .map_err(|e| VMError::R1CSError(e))
    }
/// Generates and adds to R1CS constraints that enforce that the self evaluates to true.
/// Implements the logic behind `verify` instruction.
Generates and adds to R1CS constraints that enforce that the self evaluates to true.
Implements the logic behind `verify` instruction.
Generates and adds to R1CS constraints that enforce that the self evaluates to true . Implements the logic behind ` verify ` instruction .
pub fn verify<CS: r1cs::ConstraintSystem>(self, cs: &mut CS) -> Result<(), VMError> {
        cs.specify_randomized_constraints(move |cs| {
            // Flatten the constraint into one expression
            // Note: cloning because we can't move out of captured variable in an `Fn` closure,
            // and `Box<FnOnce>` is not fully supported yet. (We can update when that happens).
            // Cf. https://github.com/dalek-cryptography/bulletproofs/issues/244
            let (expr, _) = self.clone().flatten(cs)?;
            // Add the resulting expression to the constraint system
            cs.constrain(expr);
            Ok(())
        })
        .map_err(|e| VMError::R1CSError(e))
    }
pub fn verify < CS : r1cs :: ConstraintSystem > ( self , cs : & mut CS ) -> Result < ( ) , VMError > { cs . specify_randomized_constraints ( move | cs | { // Flatten the constraint into one expression // Note: cloning because we can't move out of captured variable in an `Fn` closure, // and `Box<FnOnce>` is not fully supported yet. (We can update when that happens). // Cf. https://github.com/dalek-cryptography/bulletproofs/issues/244 let ( expr , _ ) = self . clone ( ) . flatten ( cs ) ? ; // Add the resulting expression to the constraint system cs . constrain ( expr ) ; Ok ( ( ) ) } ) . map_err ( | e | VMError :: R1CSError ( e ) ) }
Generates and adds to R1CS constraints that enforce that the self evaluates to true.
Generates and adds to R1CS constraints that enforce that the self evaluates to true .
self
cs
&mut CS
self
cs
&mut CS