pub struct FRIVerifier<'a, F, FA, VCS>{ /* 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.
Implementations§
source§impl<'a, F, FA, VCS> FRIVerifier<'a, F, FA, VCS>
impl<'a, F, FA, VCS> FRIVerifier<'a, F, FA, VCS>
pub fn new( params: &'a FRIParams<F, FA>, vcs: &'a VCS, codeword_commitment: &'a VCS::Digest, round_commitments: &'a [VCS::Digest], challenges: &'a [F], ) -> Result<Self, Error>
pub fn verify<Challenger>(
&self,
fri_proof: FRIProof<F, VCS>,
challenger: Challenger,
) -> Result<F, Error>where
Challenger: CanSampleBits<usize>,
sourcepub fn verify_last_oracle(&self, terminate_codeword: &[F]) -> Result<F, Error>
pub fn verify_last_oracle(&self, terminate_codeword: &[F]) -> Result<F, Error>
Verifies that the last oracle sent is a codeword.
Returns the fully-folded message value.
sourcepub fn verify_query(
&self,
index: usize,
proof: QueryProof<F, VCS::Proof>,
terminate_codeword: &[F],
layers: &[Vec<VCS::Digest>],
) -> Result<(), Error>
pub fn verify_query( &self, index: usize, proof: QueryProof<F, VCS::Proof>, terminate_codeword: &[F], layers: &[Vec<VCS::Digest>], ) -> Result<(), Error>
Verifies a FRI challenge query.
A FRI challenge query tests for consistency between all consecutive oracles sent by the
prover. The verifier has full access to the last oracle sent, and this is probabilistically
verified to be a codeword by Self::verify_last_oracle
.
§Arguments
index
- an index into the original codeword domainproof
- a query proof
Trait Implementations§
source§impl<'a, F, FA, VCS> Debug for FRIVerifier<'a, F, FA, VCS>where
F: BinaryField + ExtensionField<FA> + Debug,
FA: BinaryField + Debug,
VCS: MerkleTreeScheme<F> + Debug,
VCS::Digest: Debug,
impl<'a, F, FA, VCS> Debug for FRIVerifier<'a, F, FA, VCS>where
F: BinaryField + ExtensionField<FA> + Debug,
FA: BinaryField + Debug,
VCS: MerkleTreeScheme<F> + Debug,
VCS::Digest: Debug,
Auto Trait Implementations§
impl<'a, F, FA, VCS> Freeze for FRIVerifier<'a, F, FA, VCS>
impl<'a, F, FA, VCS> RefUnwindSafe for FRIVerifier<'a, F, FA, VCS>where
<FA as WithUnderlier>::Underlier: Sized,
<F as WithUnderlier>::Underlier: Sized,
VCS: RefUnwindSafe,
<VCS as MerkleTreeScheme<F>>::Digest: RefUnwindSafe,
F: RefUnwindSafe,
FA: RefUnwindSafe,
impl<'a, F, FA, VCS> Send for FRIVerifier<'a, F, FA, VCS>where
<FA as WithUnderlier>::Underlier: Sized,
<F as WithUnderlier>::Underlier: Sized,
VCS: Sync,
<VCS as MerkleTreeScheme<F>>::Digest: Sync,
impl<'a, F, FA, VCS> Sync for FRIVerifier<'a, F, FA, VCS>where
<FA as WithUnderlier>::Underlier: Sized,
<F as WithUnderlier>::Underlier: Sized,
VCS: Sync,
<VCS as MerkleTreeScheme<F>>::Digest: Sync,
impl<'a, F, FA, VCS> Unpin for FRIVerifier<'a, F, FA, VCS>
impl<'a, F, FA, VCS> UnwindSafe for FRIVerifier<'a, F, FA, VCS>where
<FA as WithUnderlier>::Underlier: Sized,
<F as WithUnderlier>::Underlier: Sized,
VCS: RefUnwindSafe,
<VCS as MerkleTreeScheme<F>>::Digest: RefUnwindSafe,
F: RefUnwindSafe + UnwindSafe,
FA: RefUnwindSafe,
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
§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>
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 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>
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