Skip to main content

FRIQueryVerifier

Struct FRIQueryVerifier 

Source
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>
where F: BinaryField, E: FieldOps<Scalar = F> + From<F>, C: Clone,

Source

pub fn new( params: &'a FRIParams<F>, codeword_commitment: &C, round_commitments: &[C], challenges: &'a [E], ) -> Self

Source

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 equal params.input_oracles().len().
  • round_commitments.len() must equal params.n_oracles().
  • challenges.len() must equal params.n_fold_rounds().
  • Each input oracle’s dimension (log_msg_len - log_batch_size) must be at most params.rs_code().log_dim().
Source

pub const fn n_oracles(&self) -> usize

Number of oracles sent during the fold rounds.

Source

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>
where <F as UnderlierView>::Underlier: Sized, C: Freeze,

§

impl<'a, F, E, C> RefUnwindSafe for FRIQueryVerifier<'a, F, E, C>

§

impl<'a, F, E, C> Send for FRIQueryVerifier<'a, F, E, C>
where <F as UnderlierView>::Underlier: Sized, C: Send, E: Sync + Send,

§

impl<'a, F, E, C> Sync for FRIQueryVerifier<'a, F, E, C>
where <F as UnderlierView>::Underlier: Sized, C: Sync, E: Sync,

§

impl<'a, F, E, C> Unpin for FRIQueryVerifier<'a, F, E, C>
where <F as UnderlierView>::Underlier: Sized, C: Unpin, E: Unpin, F: Unpin,

§

impl<'a, F, E, C> UnsafeUnpin for FRIQueryVerifier<'a, F, E, C>

§

impl<'a, F, E, C> UnwindSafe for FRIQueryVerifier<'a, F, E, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more