pub struct IOPProver<F: Field> { /* private fields */ }Expand description
IOP prover for a particular constraint system.
This struct encapsulates the constraint system and pre-computed wiring transpose,
providing the core proving logic independent of the specific IOP compilation strategy.
Most users should use Prover instead, which wraps this with a BaseFold compiler.
Implementations§
Source§impl<F: Field> IOPProver<F>
impl<F: Field> IOPProver<F>
Sourcepub fn new(constraint_system: ConstraintSystemPadded<F>) -> Self
pub fn new(constraint_system: ConstraintSystemPadded<F>) -> Self
Constructs an IOP prover for a constraint system.
pub const fn constraint_system(&self) -> &ConstraintSystemPadded<F>
Sourcepub fn commit_precommit<P, Channel, A>(
&self,
witness: &Witness<F>,
rng: &mut impl CryptoRng,
channel: &mut Channel,
alloc: &A,
) -> (Channel::Oracle, FieldVec<P, A>)
pub fn commit_precommit<P, Channel, A>( &self, witness: &Witness<F>, rng: &mut impl CryptoRng, channel: &mut Channel, alloc: &A, ) -> (Channel::Oracle, FieldVec<P, A>)
Packs and commits the precommit segment of a witness on the channel.
This must be called before Self::prove, and the returned oracle handle and packed
buffer must be passed into prove. Callers that wrap the IOP (e.g. the ZK wrapper) can
invoke this separately so the precommit oracle handle is available before the rest of
the protocol runs.
Sourcepub fn prove<P, Channel, A>(
&self,
witness: &Witness<F>,
precommit_oracle: Channel::Oracle,
precommit_packed: FieldVec<P, A>,
rng: impl CryptoRng,
channel: &mut Channel,
alloc: &A,
) -> Result<(), Error>
pub fn prove<P, Channel, A>( &self, witness: &Witness<F>, precommit_oracle: Channel::Oracle, precommit_packed: FieldVec<P, A>, rng: impl CryptoRng, channel: &mut Channel, alloc: &A, ) -> Result<(), Error>
Proves using an IOP channel interface.
This is the core proving logic, independent of the specific IOP compilation strategy.
For most users, Prover::prove is the simpler interface.
§Arguments
witness- The witness values for the constraint systemprecommit_oracle- Oracle handle obtained fromSelf::commit_precommitprecommit_packed- Packed precommit buffer obtained fromSelf::commit_precommitrng- Random number generator for blindingchannel- The IOP prover channel (public input must be observed on transcript before creating the channel; the precommit oracle must already have been committed on it viaSelf::commit_precommit)
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for IOPProver<F>
impl<F> RefUnwindSafe for IOPProver<F>where
F: RefUnwindSafe,
impl<F> Send for IOPProver<F>
impl<F> Sync for IOPProver<F>
impl<F> Unpin for IOPProver<F>where
F: Unpin,
impl<F> UnsafeUnpin for IOPProver<F>
impl<F> UnwindSafe for IOPProver<F>where
F: 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
§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>
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>
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