pub struct Prover<P, H>where
P: PackedField<Scalar = B128>,
H: ParallelHashSuite,{ /* private fields */ }Expand description
Struct for proving instances of a particular constraint system.
The Self::setup constructor pre-processes reusable structures for proving instances of the
given constraint system. Then Self::prove is called one or more times with individual
instances.
Implementations§
Source§impl<P, H> Prover<P, H>
impl<P, H> Prover<P, H>
Sourcepub fn setup(verifier: Verifier<H>) -> Result<Self, Error>
pub fn setup(verifier: Verifier<H>) -> Result<Self, Error>
Constructs a prover corresponding to a constraint system verifier.
See Prover struct documentation for details.
Sourcepub fn setup_with_key_collection(
verifier: Verifier<H>,
key_collection: KeyCollection,
) -> Result<Self, Error>
pub fn setup_with_key_collection( verifier: Verifier<H>, key_collection: KeyCollection, ) -> Result<Self, Error>
Constructs a prover with a pre-built KeyCollection.
This allows loading a previously serialized KeyCollection to avoid the expensive key building phase during setup.
Sourcepub const fn iop_prover(&self) -> &IOPProver
pub const fn iop_prover(&self) -> &IOPProver
Returns a reference to the IOP prover.
Sourcepub const fn key_collection(&self) -> &KeyCollection
pub const fn key_collection(&self) -> &KeyCollection
Returns a reference to the KeyCollection.
This can be used to serialize the KeyCollection for later use.
pub fn prove<Challenger_: Challenger + Clone>( &self, witness: &ValueVec, transcript: &mut ProverTranscript<Challenger_>, ) -> Result<(), Error>
Auto Trait Implementations§
impl<P, H> !Freeze for Prover<P, H>
impl<P, H> RefUnwindSafe for Prover<P, H>where
H: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, H> Send for Prover<P, H>where
H: Send,
impl<P, H> Sync for Prover<P, H>where
H: Sync,
impl<P, H> Unpin for Prover<P, H>
impl<P, H> UnsafeUnpin for Prover<P, H>
impl<P, H> UnwindSafe for Prover<P, H>where
H: UnwindSafe,
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more