Struct winter_fri::DefaultVerifierChannel
source · 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>,
impl<E, H> DefaultVerifierChannel<E, H>where E: FieldElement, H: ElementHasher<BaseField = E::BaseField>,
Trait Implementations§
source§impl<E, H> VerifierChannel<E> for DefaultVerifierChannel<E, H>where
E: FieldElement,
H: ElementHasher<BaseField = E::BaseField>,
impl<E, H> VerifierChannel<E> for DefaultVerifierChannel<E, H>where E: FieldElement, H: ElementHasher<BaseField = E::BaseField>,
source§fn read_fri_num_partitions(&self) -> usize
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>
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>
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>
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>
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>
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>
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> 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
Mutably borrows from an owned value. Read more