pub struct VerifierTranscript<'a, F, C, Ch> { /* private fields */ }Expand description
Verifier channel that reads transcript data and observes into the challenger.
Implementations§
Source§impl<'a, F, C, Ch> VerifierTranscript<'a, F, C, Ch>
impl<'a, F, C, Ch> VerifierTranscript<'a, F, C, Ch>
Sourcepub fn new(challenger: Ch, fields: &'a [F], commitments: &'a [C]) -> Self
pub fn new(challenger: Ch, fields: &'a [F], commitments: &'a [C]) -> Self
Creates a new verifier transcript backed by the provided challenger.
Sourcepub fn from_data(challenger: Ch, data: &'a TranscriptData<F, C>) -> Self
pub fn from_data(challenger: Ch, data: &'a TranscriptData<F, C>) -> Self
Creates a verifier transcript backed by a TranscriptData container.
Sourcepub fn finalize(self) -> Result<Ch::Digest, TranscriptError>
pub fn finalize(self) -> Result<Ch::Digest, TranscriptError>
Finalize the transcript, checking emptiness and producing a binding digest.
Returns TranscriptError::TrailingData if any unread fields or commitments
remain. On success, delegates to
CanFinalizeDigest::finalize on the inner
challenger — the digest must match the prover’s digest for the proof to be valid.
Sourcepub fn size_in_bytes(&self) -> usize
pub fn size_in_bytes(&self) -> usize
Returns the total byte size of the remaining unconsumed transcript data.
Trait Implementations§
Source§impl<'a, F, C, Ch, T> CanSample<T> for VerifierTranscript<'a, F, C, Ch>where
Ch: CanSample<T>,
impl<'a, F, C, Ch, T> CanSample<T> for VerifierTranscript<'a, F, C, Ch>where
Ch: CanSample<T>,
Source§fn sample_array<const N: usize>(&mut self) -> [T; N]
fn sample_array<const N: usize>(&mut self) -> [T; N]
Sample an array of
N challenge values from the transcript.Source§fn sample_vec(&mut self, n: usize) -> Vec<T>
fn sample_vec(&mut self, n: usize) -> Vec<T>
Sample a
Vec of n challenge values from the transcript.Source§impl<'a, F, C, Ch> CanSampleBits<usize> for VerifierTranscript<'a, F, C, Ch>where
Ch: CanSampleBits<usize>,
impl<'a, F, C, Ch> CanSampleBits<usize> for VerifierTranscript<'a, F, C, Ch>where
Ch: CanSampleBits<usize>,
Source§impl<'a, F, C, Ch> CanSampleUniformBits<F> for VerifierTranscript<'a, F, C, Ch>where
Ch: CanSampleUniformBits<F>,
impl<'a, F, C, Ch> CanSampleUniformBits<F> for VerifierTranscript<'a, F, C, Ch>where
Ch: CanSampleUniformBits<F>,
Source§fn sample_uniform_bits<const RESAMPLE: bool>(
&mut self,
bits: usize,
) -> Result<usize, ResamplingError>
fn sample_uniform_bits<const RESAMPLE: bool>( &mut self, bits: usize, ) -> Result<usize, ResamplingError>
Sample a random
bits-bit integer from the transcript with a guarantee of
uniformly sampled bits. Read moreSource§impl<'a, F, C, Ch> Channel for VerifierTranscript<'a, F, C, Ch>
impl<'a, F, C, Ch> Channel for VerifierTranscript<'a, F, C, Ch>
type F = F
type Commitment = C
type Challenger = Ch
Source§fn sample_bits(&mut self, bits: usize) -> usize
fn sample_bits(&mut self, bits: usize) -> usize
Sample a random
bits-bit integer from the challenger.Source§fn sample_algebra_element<A: BasedVectorSpace<Self::F>>(&mut self) -> A
fn sample_algebra_element<A: BasedVectorSpace<Self::F>>(&mut self) -> A
Sample a random algebra element (e.g. extension field) from the challenger.
Source§impl<'a, F: Clone, C: Clone, Ch: Clone> Clone for VerifierTranscript<'a, F, C, Ch>
impl<'a, F: Clone, C: Clone, Ch: Clone> Clone for VerifierTranscript<'a, F, C, Ch>
Source§fn clone(&self) -> VerifierTranscript<'a, F, C, Ch>
fn clone(&self) -> VerifierTranscript<'a, F, C, Ch>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, F, C, Ch> VerifierChannel for VerifierTranscript<'a, F, C, Ch>
impl<'a, F, C, Ch> VerifierChannel for VerifierTranscript<'a, F, C, Ch>
fn receive_field_slice( &mut self, count: usize, ) -> Result<&'a [Self::F], TranscriptError>
fn receive_commitment_slice( &mut self, count: usize, ) -> Result<&'a [Self::Commitment], TranscriptError>
fn receive_hint_field_slice( &mut self, count: usize, ) -> Result<&'a [Self::F], TranscriptError>
fn receive_hint_commitment_slice( &mut self, count: usize, ) -> Result<&'a [Self::Commitment], TranscriptError>
fn grind(&mut self, bits: usize) -> Result<Self::F, TranscriptError>
fn is_empty(&self) -> bool
fn receive_field(&mut self) -> Result<&Self::F, TranscriptError>
fn receive_algebra_element<A>(&mut self) -> Result<A, TranscriptError>
fn receive_algebra_slice<A>( &mut self, count: usize, ) -> Result<Vec<A>, TranscriptError>
fn receive_commitment(&mut self) -> Result<&Self::Commitment, TranscriptError>
fn receive_hint_field(&mut self) -> Result<&Self::F, TranscriptError>
Source§fn receive_hint_field_array<const N: usize>(
&mut self,
) -> Result<[Self::F; N], TranscriptError>
fn receive_hint_field_array<const N: usize>( &mut self, ) -> Result<[Self::F; N], TranscriptError>
Read exactly
N hint field elements as a fixed-size array.fn receive_hint_commitment( &mut self, ) -> Result<&Self::Commitment, TranscriptError>
Auto Trait Implementations§
impl<'a, F, C, Ch> Freeze for VerifierTranscript<'a, F, C, Ch>where
Ch: Freeze,
impl<'a, F, C, Ch> RefUnwindSafe for VerifierTranscript<'a, F, C, Ch>
impl<'a, F, C, Ch> Send for VerifierTranscript<'a, F, C, Ch>
impl<'a, F, C, Ch> Sync for VerifierTranscript<'a, F, C, Ch>
impl<'a, F, C, Ch> Unpin for VerifierTranscript<'a, F, C, Ch>where
Ch: Unpin,
impl<'a, F, C, Ch> UnsafeUnpin for VerifierTranscript<'a, F, C, Ch>where
Ch: UnsafeUnpin,
impl<'a, F, C, Ch> UnwindSafe for VerifierTranscript<'a, F, C, Ch>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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