# [−][src]Struct bulletproofs::r1cs::prover::ProverCS

A `ConstraintSystem`

implementation for use by the prover.

## Fields

`transcript: &'a mut Transcript`

`bp_gens: &'b BulletproofGens`

`pc_gens: &'b PedersenGens`

`constraints: Vec<LinearCombination>`

The constraints accumulated so far.

`a_L: Vec<Scalar>`

Stores assignments to the "left" of multiplication gates

`a_R: Vec<Scalar>`

Stores assignments to the "right" of multiplication gates

`a_O: Vec<Scalar>`

Stores assignments to the "output" of multiplication gates

`v: Vec<Scalar>`

High-level witness data (value openings to V commitments)

`v_blinding: Vec<Scalar>`

High-level witness data (blinding openings to V commitments)

## Methods

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

[src]

`fn flattened_constraints(`

&mut self,

z: &Scalar

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

[src]

&mut self,

z: &Scalar

) -> (Vec<Scalar>, Vec<Scalar>, Vec<Scalar>, Vec<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)
```

where `w{L,R,O}`

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

`fn eval(&self, lc: &LinearCombination) -> Scalar`

[src]

`pub fn prove(self) -> Result<R1CSProof, R1CSError>`

[src]

Consume this `ConstraintSystem`

to produce a proof.

## Trait Implementations

`impl<'a, 'b> ConstraintSystem for ProverCS<'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,

assign_fn: F

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

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

[src]

&mut self,

assign_fn: 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]

`impl<'a, 'b> Drop for ProverCS<'a, 'b>`

[src]

Overwrite secrets with null bytes when they go out of scope.

## Auto Trait Implementations

## 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`