pub struct DefaultVerifierChannel<E: FieldElement, H: ElementHasher<BaseField = E::BaseField>> { /* private fields */ }
Expand description

Provides a default implementation of the VerifierChannel trait.

Default verifier channel can be instantiated directly from a FriProof struct.

Though this implementation is primarily intended for testing purposes, it can be used in production use cases as well.

Implementations§

source§

impl<E, H> DefaultVerifierChannel<E, H>where E: FieldElement, H: ElementHasher<BaseField = E::BaseField>,

source

pub fn new( proof: FriProof, layer_commitments: Vec<H::Digest>, domain_size: usize, folding_factor: usize ) -> Result<Self, DeserializationError>

Builds a new verifier channel from the specified FriProof.

Errors

Returns an error if the specified proof could not be parsed correctly.

Trait Implementations§

source§

impl<E, H> VerifierChannel<E> for DefaultVerifierChannel<E, H>where E: FieldElement, H: ElementHasher<BaseField = E::BaseField>,

§

type Hasher = H

Hash function used by the prover to commit to polynomial evaluations.
source§

fn read_fri_num_partitions(&self) -> usize

Returns the number of partitions used during proof generation.
source§

fn read_fri_layer_commitments(&mut self) -> Vec<H::Digest>

Reads and removes from the channel all FRI layer commitments sent by the prover. Read more
source§

fn take_next_fri_layer_proof(&mut self) -> BatchMerkleProof<H>

Reads and removes from the channel Merkle authentication paths for queried evaluations for the next FRI layer. Read more
source§

fn take_next_fri_layer_queries(&mut self) -> Vec<E>

Reads and removes from the channel evaluations of the polynomial at the queried positions for the next FRI layer. Read more
source§

fn take_fri_remainder(&mut self) -> Vec<E>

Reads and removes the remainder polynomial from the channel.
source§

fn read_layer_queries<const N: usize>( &mut self, positions: &[usize], commitment: &<<Self as VerifierChannel<E>>::Hasher as Hasher>::Digest ) -> Result<Vec<[E; N]>, VerifierError>

Returns FRI query values at the specified positions from the current FRI layer and advances layer pointer by one. Read more
source§

fn read_remainder(&mut self) -> Result<Vec<E>, VerifierError>

Returns FRI remainder polynomial read from this channel.

Auto Trait Implementations§

§

impl<E, H> RefUnwindSafe for DefaultVerifierChannel<E, H>where E: RefUnwindSafe, <H as Hasher>::Digest: RefUnwindSafe,

§

impl<E, H> Send for DefaultVerifierChannel<E, H>

§

impl<E, H> Sync for DefaultVerifierChannel<E, H>

§

impl<E, H> Unpin for DefaultVerifierChannel<E, H>where E: Unpin, <H as Hasher>::Digest: Unpin,

§

impl<E, H> UnwindSafe for DefaultVerifierChannel<E, H>where E: UnwindSafe, <H as Hasher>::Digest: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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.

source§

impl<T, U> Into<U> for Twhere 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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.