Skip to main content

ProverTranscript

Struct ProverTranscript 

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

Source

pub fn new(challenger: Ch) -> Self

Creates a new prover transcript backed by the provided challenger.

Source

pub fn finalize(self) -> (Ch::Digest, TranscriptData<F, C>)
where F: Field, C: Clone, Ch: TranscriptChallenger<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.

Source

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

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<F, C, Ch> CanSampleBits<usize> for ProverTranscript<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<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>

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

impl<F, C, Ch> Channel for ProverTranscript<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<F: Clone, C: Clone, Ch: Clone> Clone for ProverTranscript<F, C, Ch>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<F: Debug, C: Debug, Ch: Debug> Debug for ProverTranscript<F, C, Ch>

Source§

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

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

impl<F, C, Ch> ProverChannel for ProverTranscript<F, C, Ch>
where F: Field, C: Clone, Ch: TranscriptChallenger<F, C>,

Source§

fn send_field_slice(&mut self, values: &[Self::F])

Source§

fn send_commitment_slice(&mut self, values: &[Self::Commitment])

Source§

fn hint_field_slice(&mut self, values: &[Self::F])

Source§

fn hint_commitment_slice(&mut self, values: &[Self::Commitment])

Source§

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

Source§

fn send_field_element(&mut self, value: Self::F)

Source§

fn send_algebra_element<A>(&mut self, value: A)
where A: BasedVectorSpace<Self::F>,

Source§

fn send_algebra_slice<A>(&mut self, values: &[A])
where A: BasedVectorSpace<Self::F>,

Source§

fn send_commitment(&mut self, value: Self::Commitment)

Source§

fn hint_field_element(&mut self, value: Self::F)

Source§

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

§

impl<F, C, Ch> Sync for ProverTranscript<F, C, Ch>
where Ch: Sync, F: Sync, C: Sync,

§

impl<F, C, Ch> Unpin for ProverTranscript<F, C, Ch>
where Ch: Unpin, F: Unpin, C: Unpin,

§

impl<F, C, Ch> UnsafeUnpin for ProverTranscript<F, C, Ch>
where Ch: UnsafeUnpin,

§

impl<F, C, Ch> UnwindSafe for ProverTranscript<F, C, Ch>
where Ch: UnwindSafe, F: UnwindSafe, C: UnwindSafe,

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