DefaultVerifierChannel

Struct DefaultVerifierChannel 

Source
pub struct DefaultVerifierChannel<E: FieldElement, H: ElementHasher<BaseField = E::BaseField>, V: VectorCommitment<H>> { /* 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, V> DefaultVerifierChannel<E, H, V>
where E: FieldElement, H: ElementHasher<BaseField = E::BaseField>, V: VectorCommitment<H>,

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, V> VerifierChannel<E> for DefaultVerifierChannel<E, H, V>
where E: FieldElement, H: ElementHasher<BaseField = E::BaseField>, V: VectorCommitment<H>,

Source§

type Hasher = H

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

type VectorCommitment = V

Vector commitment used 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) -> V::MultiProof

Reads and removes from the channel vector commitment opening proofs of 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::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, V> Freeze for DefaultVerifierChannel<E, H, V>

§

impl<E, H, V> RefUnwindSafe for DefaultVerifierChannel<E, H, V>

§

impl<E, H, V> Send for DefaultVerifierChannel<E, H, V>
where H: Send, <V as VectorCommitment<H>>::MultiProof: Send,

§

impl<E, H, V> Sync for DefaultVerifierChannel<E, H, V>
where H: Sync, <V as VectorCommitment<H>>::MultiProof: Sync,

§

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

§

impl<E, H, V> UnwindSafe for DefaultVerifierChannel<E, H, V>

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.

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> 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.