pub struct IOPVerifier<F: Field> { /* private fields */ }Expand description
IOP verifier for a particular constraint system.
This struct encapsulates the constraint system, providing the core verification logic
independent of the specific IOP compilation strategy. Most users should use Verifier
instead, which wraps this with a BaseFold compiler.
Implementations§
Source§impl<F: Field> IOPVerifier<F>
impl<F: Field> IOPVerifier<F>
Sourcepub const fn new(constraint_system: ConstraintSystemPadded<F>) -> Self
pub const fn new(constraint_system: ConstraintSystemPadded<F>) -> Self
Constructs an IOP verifier for a constraint system.
pub const fn constraint_system(&self) -> &ConstraintSystemPadded<F>
Sourcepub fn oracle_specs(&self) -> Vec<OracleSpec>where
F: BinaryField,
pub fn oracle_specs(&self) -> Vec<OracleSpec>where
F: BinaryField,
Returns the oracle specs for the IOP channel.
These describe the oracles (witness and mask) that the prover commits to.
The specs are derived by replaying the oracle-receiving sequence against an
OracleSetupChannel (which records each recv_oracle without doing real verification),
rather than hardcoding it. IronSpartan proofs are always zero-knowledge. The precommit
oracle is received by the outer Verifier::verify before it delegates to
Self::verify, so it is recorded here first to match that order.
Sourcepub fn verify<Channel>(
&self,
precommit_oracle: Channel::Oracle,
public: &[Channel::Elem],
channel: &mut Channel,
) -> Result<(), Error>where
F: BinaryField,
Channel: IOPVerifierChannel<F>,
pub fn verify<Channel>(
&self,
precommit_oracle: Channel::Oracle,
public: &[Channel::Elem],
channel: &mut Channel,
) -> Result<(), Error>where
F: BinaryField,
Channel: IOPVerifierChannel<F>,
Verifies a proof using an IOP channel.
This is the core verification logic, independent of the specific IOP compilation strategy.
For most users, Verifier::verify is the simpler interface.
§Arguments
precommit_oracle- Handle to the precommit oracle, received from the channel by the caller before invokingverify.public- The public inputs to the constraint systemchannel- The IOP verifier channel
§Returns
Ok(()) if the proof is valid, Err(_) otherwise.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for IOPVerifier<F>
impl<F> RefUnwindSafe for IOPVerifier<F>where
F: RefUnwindSafe,
impl<F> Send for IOPVerifier<F>
impl<F> Sync for IOPVerifier<F>
impl<F> Unpin for IOPVerifier<F>where
F: Unpin,
impl<F> UnsafeUnpin for IOPVerifier<F>
impl<F> UnwindSafe for IOPVerifier<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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