pub trait IOPVerifierChannel<F: Field>: IPVerifierChannel<F, Elem: 'static> {
type Oracle: Clone;
// Required methods
fn remaining_oracle_specs(&self) -> &[OracleSpec];
fn recv_oracle(
&mut self,
len: usize,
is_witness_dependent: bool,
) -> Result<Self::Oracle, Error>;
fn verify_multi_oracle_relation(
&mut self,
operands: impl IntoIterator<Item = (Self::Oracle, TransparentEvalFn<Self::Elem>)>,
claim: Self::Elem,
) -> Result<(), Error>;
// Provided method
fn verify_oracle_relation(
&mut self,
oracle: Self::Oracle,
transparent: TransparentEvalFn<Self::Elem>,
claim: Self::Elem,
) -> Result<(), Error> { ... }
}Expand description
Channel for IOP verifiers that extends the IP verifier channel with oracle operations.
In an IOP, the verifier can:
- Receive field elements from the prover via
recv_*methods (inherited) - Sample random challenges via
sample(inherited) - Receive oracle commitments from the prover
- Query oracles at specific positions and verify opening proofs
§Contract
The caller must call recv_oracle() exactly remaining_oracle_specs().len() times before
calling verify_oracle_relation(). The oracles must be received in order and match their
specifications.
Required Associated Types§
Required Methods§
Sourcefn remaining_oracle_specs(&self) -> &[OracleSpec]
fn remaining_oracle_specs(&self) -> &[OracleSpec]
Returns the specifications for the remaining oracles to be received.
This slice shrinks as oracles are received via recv_oracle().
Sourcefn recv_oracle(
&mut self,
len: usize,
is_witness_dependent: bool,
) -> Result<Self::Oracle, Error>
fn recv_oracle( &mut self, len: usize, is_witness_dependent: bool, ) -> Result<Self::Oracle, Error>
Receives an oracle commitment from the prover.
The caller describes the oracle being received: len is its OracleSpec::len, and
is_witness_dependent is whether the oracle’s contents depend on the witness. These let a
channel record the oracle’s OracleSpec rather than requiring the specs to be supplied up
front. The resulting oracle is zero-knowledge iff the channel is configured for ZK and the
oracle is witness-dependent — a non-witness-dependent oracle (e.g. a pre-indexed commitment
to the wiring matrix for succinctness, a planned feature) is never masked.
Only the first len entries are the prover’s content. The rest is padding the channel may
fill arbitrarily, so every later claim must hold over the oracle the channel commits.
Sourcefn verify_multi_oracle_relation(
&mut self,
operands: impl IntoIterator<Item = (Self::Oracle, TransparentEvalFn<Self::Elem>)>,
claim: Self::Elem,
) -> Result<(), Error>
fn verify_multi_oracle_relation( &mut self, operands: impl IntoIterator<Item = (Self::Oracle, TransparentEvalFn<Self::Elem>)>, claim: Self::Elem, ) -> Result<(), Error>
Queues one linear relation over committed oracles to be opened.
The relation asserts that Σ_i <oracle_i, transparent_i> = claim over its operands. An
oracle may appear in any number of relations, and more than once in one.
Implementations may either verify the relation immediately, or queue it and defer the
actual opening (masking + sumcheck + FRI) to finish().
Each transparent is a multilinear in its oracle’s log_msg_len variables that vanishes on
every index at or above the oracle’s OracleSpec::len, so the relation does not depend
on the channel’s padding.
§Preconditions
- Every operand’s oracle must be a valid handle returned by
recv_oracle().
Provided Methods§
Sourcefn verify_oracle_relation(
&mut self,
oracle: Self::Oracle,
transparent: TransparentEvalFn<Self::Elem>,
claim: Self::Elem,
) -> Result<(), Error>
fn verify_oracle_relation( &mut self, oracle: Self::Oracle, transparent: TransparentEvalFn<Self::Elem>, claim: Self::Elem, ) -> Result<(), Error>
Queues one oracle linear relation <oracle, transparent> = claim to be opened.
This is Self::verify_multi_oracle_relation with a single operand.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".