Struct dusk_plonk::proof_system::prover::Prover [−][src]
pub struct Prover { pub prover_key: Option<ProverKey>, pub preprocessed_transcript: Transcript, // some fields omitted }
Abstraction structure designed to construct a circuit and generate
Proof
s for it.
Fields
prover_key: Option<ProverKey>
ProverKey which is used to create proofs about a specific PLONK circuit
preprocessed_transcript: Transcript
Store the messages exchanged during the preprocessing stage This is copied each time, we make a proof
Implementations
impl Prover
[src]
pub fn mut_cs(&mut self) -> &mut StandardComposer
[src]
Returns a mutable copy of the underlying StandardComposer
.
pub fn preprocess(&mut self, commit_key: &CommitKey) -> Result<(), Error>
[src]
Preprocesses the underlying constraint system.
impl Prover
[src]
pub fn new(label: &'static [u8]) -> Prover
[src]
Creates a new Prover
instance.
pub fn with_expected_size(label: &'static [u8], size: usize) -> Prover
[src]
Creates a new Prover
object with some expected size.
pub fn circuit_size(&self) -> usize
[src]
Returns the number of gates in the circuit thet the Prover
actually
stores inside.
pub fn clear_witness(&mut self)
[src]
Resets the witnesses in the prover object. This function is used when the user wants to make multiple proofs with the same circuit.
pub fn clear(&mut self)
[src]
Clears all data in the Prover
instance.
This function is used when the user wants to use the same Prover
to
make a Proof
regarding a different circuit.
pub fn key_transcript(&mut self, label: &'static [u8], message: &[u8])
[src]
Keys the Transcript
with additional seed information
Wrapper around Transcript::append_message
.
pub fn prove_with_preprocessed(
&self,
commit_key: &CommitKey,
prover_key: &ProverKey
) -> Result<Proof, Error>
[src]
&self,
commit_key: &CommitKey,
prover_key: &ProverKey
) -> Result<Proof, Error>
Creates a [Proof]
that demonstrates that a circuit is satisfied.
Note
If you intend to construct multiple Proof
s with different witnesses,
after calling this method, the user should then call
Prover::clear_witness
.
This is automatically done when Prover::prove
is called.
pub fn prove(&mut self, commit_key: &CommitKey) -> Result<Proof, Error>
[src]
Proves a circuit is satisfied, then clears the witness variables If the circuit is not pre-processed, then the preprocessed circuit will also be computed.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Prover
impl Send for Prover
impl Sync for Prover
impl Unpin for Prover
impl UnwindSafe for Prover
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,