# [−][src]Struct bulletproofs::r1cs::verifier::VerifierCS

A `ConstraintSystem`

implementation for use by the verifier.

## Fields

`bp_gens: &'b BulletproofGens`

`pc_gens: &'b PedersenGens`

`transcript: &'a mut Transcript`

`constraints: Vec<LinearCombination>`

`num_vars: usize`

Records the number of low-level variables allocated in the constraint system.

Because the `VerifierCS`

only keeps the constraints
themselves, it doesn't record the assignments (they're all
`Missing`

), so the `num_vars`

isn't kept implicitly in the
variable assignments.

`V: Vec<CompressedRistretto>`

## Methods

`impl<'a, 'b> VerifierCS<'a, 'b>`

[src]

`fn flattened_constraints(`

&mut self,

z: &Scalar

) -> (Vec<Scalar>, Vec<Scalar>, Vec<Scalar>, Vec<Scalar>, Scalar)

[src]

&mut self,

z: &Scalar

) -> (Vec<Scalar>, Vec<Scalar>, Vec<Scalar>, Vec<Scalar>, Scalar)

Use a challenge, `z`

, to flatten the constraints in the
constraint system into vectors used for proving and
verification.

# Output

Returns a tuple of

```
(wL, wR, wO, wV, wc)
```

where `w{L,R,O}`

is \( z \cdot z^Q \cdot W_{L,R,O} \).

This has the same logic as `ProverCS::flattened_constraints()`

but also computes the constant terms (which the prover skips
because they're not needed to construct the proof).

`pub fn verify(self, proof: &R1CSProof) -> Result<(), R1CSError>`

[src]

Consume this `VerifierCS`

and attempt to verify the supplied `proof`

.

## Trait Implementations

`impl<'a, 'b> ConstraintSystem for VerifierCS<'a, 'b>`

[src]

`fn multiply(`

&mut self,

left: LinearCombination,

right: LinearCombination

) -> (Variable, Variable, Variable)

[src]

&mut self,

left: LinearCombination,

right: LinearCombination

) -> (Variable, Variable, Variable)

`fn allocate<F>(`

&mut self,

_: F

) -> Result<(Variable, Variable, Variable), R1CSError> where

F: FnOnce() -> Result<(Scalar, Scalar, Scalar), R1CSError>,

[src]

&mut self,

_: F

) -> Result<(Variable, Variable, Variable), R1CSError> where

F: FnOnce() -> Result<(Scalar, Scalar, Scalar), R1CSError>,

`fn constrain(&mut self, lc: LinearCombination)`

[src]

`fn challenge_scalar(&mut self, label: &'static [u8]) -> Scalar`

[src]

## Auto Trait Implementations

`impl<'a, 'b> Send for VerifierCS<'a, 'b>`

`impl<'a, 'b> Sync for VerifierCS<'a, 'b>`

## Blanket Implementations

`impl<T, U> Into for T where`

U: From<T>,

[src]

U: From<T>,

`impl<T> From for T`

[src]

`impl<T, U> TryFrom for T where`

U: Into<T>,

[src]

U: Into<T>,

`type Error = !`

`try_from`

)The type returned in the event of a conversion error.

`fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>`

[src]

`impl<T> Borrow for T where`

T: ?Sized,

[src]

T: ?Sized,

`impl<T, U> TryInto for T where`

U: TryFrom<T>,

[src]

U: TryFrom<T>,

`type Error = <U as TryFrom<T>>::Error`

`try_from`

)The type returned in the event of a conversion error.

`fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>`

[src]

`impl<T> Any for T where`

T: 'static + ?Sized,

[src]

T: 'static + ?Sized,

`impl<T> BorrowMut for T where`

T: ?Sized,

[src]

T: ?Sized,

`fn borrow_mut(&mut self) -> &mut T`

[src]

`impl<T> Same for T`

`type Output = T`

Should always be `Self`