pub struct FRIQueryVerifier<'a, F, E, C>where
F: BinaryField,{ /* private fields */ }Expand description
A verifier for the FRI query phase.
The verifier is instantiated after the folding rounds and is used to test consistency of the round messages and the original purported codeword.
Internally, this is a composition of ProxTestOracles: a BatchBrakedownOracle performs
the first, interleaved reduction of the committed codeword(s), then one FRIOracle per fold
arity performs each subsequent FRI reduction. The verifier orchestrates the consistency checks
between these oracles and the final, fully-folded terminal codeword. The oracles are
parameterized by the Merkle commitment handle type C of the channel that receives the query
openings.
Implementations§
Source§impl<'a, F, E, C> FRIQueryVerifier<'a, F, E, C>
impl<'a, F, E, C> FRIQueryVerifier<'a, F, E, C>
pub fn new( params: &'a FRIParams<F>, codeword_commitment: &C, round_commitments: &[C], challenges: &'a [E], ) -> Self
Sourcepub fn new_batch(
params: &'a FRIParams<F>,
codeword_commitments: &[C],
round_commitments: &[C],
challenges: &'a [E],
) -> Self
pub fn new_batch( params: &'a FRIParams<F>, codeword_commitments: &[C], round_commitments: &[C], challenges: &'a [E], ) -> Self
Constructs a query verifier for a batch of committed input oracles.
The input oracles share the Reed-Solomon code but may have differing batch sizes; they are
reduced into a single first-round FRI oracle. The commitments must be supplied in the same
order as FRIParams::input_oracles.
§Preconditions
codeword_commitments.len()must equalparams.input_oracles().len().round_commitments.len()must equalparams.n_oracles().challenges.len()must equalparams.n_fold_rounds().- Each input oracle’s dimension (
log_msg_len - log_batch_size) must be at mostparams.rs_code().log_dim().
pub fn verify<Channel>(&self, channel: &mut Channel) -> Result<E, Error>where
Channel: MerkleIPVerifierChannel<F, Commitment = C, Elem = E>,
Auto Trait Implementations§
impl<'a, F, E, C> Freeze for FRIQueryVerifier<'a, F, E, C>
impl<'a, F, E, C> RefUnwindSafe for FRIQueryVerifier<'a, F, E, C>
impl<'a, F, E, C> Send for FRIQueryVerifier<'a, F, E, C>
impl<'a, F, E, C> Sync for FRIQueryVerifier<'a, F, E, C>
impl<'a, F, E, C> Unpin for FRIQueryVerifier<'a, F, E, C>
impl<'a, F, E, C> UnsafeUnpin for FRIQueryVerifier<'a, F, E, C>
impl<'a, F, E, C> UnwindSafe for FRIQueryVerifier<'a, F, E, C>where
<F as UnderlierView>::Underlier: Sized,
C: UnwindSafe,
E: RefUnwindSafe + UnwindSafe,
F: RefUnwindSafe + 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