Skip to main content

VerifierTranscript

Struct VerifierTranscript 

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

Source

pub fn new(challenger: Ch, fields: &'a [F], commitments: &'a [C]) -> Self

Creates a new verifier transcript backed by the provided challenger.

Source

pub fn from_data(challenger: Ch, data: &'a TranscriptData<F, C>) -> Self

Creates a verifier transcript backed by a TranscriptData container.

Source

pub fn finalize(self) -> Result<Ch::Digest, TranscriptError>
where F: Field, C: Clone, Ch: TranscriptChallenger<F, C>,

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.

Source

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

Source§

fn sample(&mut self) -> T

Sample a single challenge value from the transcript.
Source§

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>

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

Source§

fn sample_bits(&mut self, bits: usize) -> usize

Sample a random bits-bit integer from the transcript. Read more
Source§

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>

Sample a random bits-bit integer from the transcript with a guarantee of uniformly sampled bits. Read more
Source§

impl<'a, F, C, Ch> Channel for VerifierTranscript<'a, F, C, Ch>
where F: Field, C: Clone, Ch: TranscriptChallenger<F, C>,

Source§

type F = F

Source§

type Commitment = C

Source§

type Challenger = Ch

Source§

fn sample(&mut self) -> F

Sample a random field element from the challenger.
Source§

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

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>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<'a, F: Debug, C: Debug, Ch: Debug> Debug for VerifierTranscript<'a, F, C, Ch>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, F, C, Ch> VerifierChannel for VerifierTranscript<'a, F, C, Ch>
where F: Field, C: Clone, Ch: TranscriptChallenger<F, C>,

Source§

fn receive_field_slice( &mut self, count: usize, ) -> Result<&'a [Self::F], TranscriptError>

Source§

fn receive_commitment_slice( &mut self, count: usize, ) -> Result<&'a [Self::Commitment], TranscriptError>

Source§

fn receive_hint_field_slice( &mut self, count: usize, ) -> Result<&'a [Self::F], TranscriptError>

Source§

fn receive_hint_commitment_slice( &mut self, count: usize, ) -> Result<&'a [Self::Commitment], TranscriptError>

Source§

fn grind(&mut self, bits: usize) -> Result<Self::F, TranscriptError>

Source§

fn is_empty(&self) -> bool

Source§

fn receive_field(&mut self) -> Result<&Self::F, TranscriptError>

Source§

fn receive_algebra_element<A>(&mut self) -> Result<A, TranscriptError>
where Self::F: Field, A: BasedVectorSpace<Self::F>,

Source§

fn receive_algebra_slice<A>( &mut self, count: usize, ) -> Result<Vec<A>, TranscriptError>
where Self::F: Field, A: BasedVectorSpace<Self::F>,

Source§

fn receive_commitment(&mut self) -> Result<&Self::Commitment, TranscriptError>

Source§

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>
where Self::F: Copy,

Read exactly N hint field elements as a fixed-size array.
Source§

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>
where Ch: Send, F: Sync, C: Sync,

§

impl<'a, F, C, Ch> Sync for VerifierTranscript<'a, F, C, Ch>
where Ch: Sync, F: Sync, C: Sync,

§

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> 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more