pub struct ProverTranscript<F, C, Ch> { /* private fields */ }Expand description
Prover channel that records transcript data and observes into the challenger.
Implementations§
Source§impl<F, C, Ch> ProverTranscript<F, C, Ch>
impl<F, C, Ch> ProverTranscript<F, C, Ch>
Sourcepub fn new(challenger: Ch) -> Self
pub fn new(challenger: Ch) -> Self
Creates a new prover transcript backed by the provided challenger.
Sourcepub fn finalize(self) -> (Ch::Digest, TranscriptData<F, C>)
pub fn finalize(self) -> (Ch::Digest, TranscriptData<F, C>)
Finalize the transcript, producing a binding digest and returning the proof data.
Delegates to CanFinalizeDigest::finalize on
the inner challenger, which unconditionally applies a final state transition before
extracting the digest. The digest commits to the entire transcript interaction.
Sourcepub fn size_in_bytes(&self) -> usize
pub fn size_in_bytes(&self) -> usize
Returns the total byte size of the recorded transcript data.
Trait Implementations§
Source§impl<F, C, Ch, T> CanSample<T> for ProverTranscript<F, C, Ch>where
Ch: CanSample<T>,
impl<F, C, Ch, T> CanSample<T> for ProverTranscript<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<F, C, Ch> CanSampleBits<usize> for ProverTranscript<F, C, Ch>where
Ch: CanSampleBits<usize>,
impl<F, C, Ch> CanSampleBits<usize> for ProverTranscript<F, C, Ch>where
Ch: CanSampleBits<usize>,
Source§impl<F, C, Ch> CanSampleUniformBits<F> for ProverTranscript<F, C, Ch>where
Ch: CanSampleUniformBits<F>,
impl<F, C, Ch> CanSampleUniformBits<F> for ProverTranscript<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<F, C, Ch> Channel for ProverTranscript<F, C, Ch>
impl<F, C, Ch> Channel for ProverTranscript<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<F: Clone, C: Clone, Ch: Clone> Clone for ProverTranscript<F, C, Ch>
impl<F: Clone, C: Clone, Ch: Clone> Clone for ProverTranscript<F, C, Ch>
Source§fn clone(&self) -> ProverTranscript<F, C, Ch>
fn clone(&self) -> ProverTranscript<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<F, C, Ch> ProverChannel for ProverTranscript<F, C, Ch>
impl<F, C, Ch> ProverChannel for ProverTranscript<F, C, Ch>
fn send_field_slice(&mut self, values: &[Self::F])
fn send_commitment_slice(&mut self, values: &[Self::Commitment])
fn hint_field_slice(&mut self, values: &[Self::F])
fn hint_commitment_slice(&mut self, values: &[Self::Commitment])
fn grind(&mut self, bits: usize) -> Self::F
fn send_field_element(&mut self, value: Self::F)
fn send_algebra_element<A>(&mut self, value: A)where
A: BasedVectorSpace<Self::F>,
fn send_algebra_slice<A>(&mut self, values: &[A])where
A: BasedVectorSpace<Self::F>,
fn send_commitment(&mut self, value: Self::Commitment)
fn hint_field_element(&mut self, value: Self::F)
fn hint_commitment(&mut self, value: Self::Commitment)
Auto Trait Implementations§
impl<F, C, Ch> Freeze for ProverTranscript<F, C, Ch>where
Ch: Freeze,
impl<F, C, Ch> RefUnwindSafe for ProverTranscript<F, C, Ch>
impl<F, C, Ch> Send for ProverTranscript<F, C, Ch>
impl<F, C, Ch> Sync for ProverTranscript<F, C, Ch>
impl<F, C, Ch> Unpin for ProverTranscript<F, C, Ch>
impl<F, C, Ch> UnsafeUnpin for ProverTranscript<F, C, Ch>where
Ch: UnsafeUnpin,
impl<F, C, Ch> UnwindSafe for ProverTranscript<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