Skip to main content

BaseFoldVerifierCompiler

Struct BaseFoldVerifierCompiler 

Source
pub struct BaseFoldVerifierCompiler<F>
where F: BinaryField,
{ /* private fields */ }
Expand description

A compiler that creates BaseFold ZK verifier channels with precomputed parameters.

This compiler builds a single combined FRI over all oracles. ZK oracles configure FRI parameters for zero-knowledge mode (log_msg_len + 1 as the message length and log_batch_size = 1); non-ZK oracles take a flexible batch size with no mask.

Implementations§

Source§

impl<F> BaseFoldVerifierCompiler<F>
where F: BinaryField,

Source

pub fn new<H, Strategy>( merkle_scheme: &BinaryMerkleTreeScheme<F, H>, oracle_specs: Vec<OracleSpec>, log_inv_rate: usize, n_test_queries: usize, _arity_strategy: &Strategy, ) -> Self
where H: HashSuite, Strategy: AritySelectionStrategy,

Creates a new compiler with precomputed combined FRI parameters.

The merkle_scheme is consulted only for proof-size estimation while choosing the FRI parameters; it is not stored. Each oracle’s batch size is derived from its ZK flag: a ZK oracle fixes log_batch_size = 1 (message ‖ equal-length mask), a non-ZK oracle takes a flexible batch size. Requires at least one oracle spec.

Source

pub fn oracle_specs(&self) -> &[OracleSpec]

Returns a reference to the oracle specifications.

Source

pub const fn fri_params(&self) -> &FRIParams<F>

Returns a reference to the precomputed combined FRI parameters.

Source

pub fn max_log_domain_size(&self) -> usize

The dimension of the largest evaluation domain the combined FRI parameters need.

A prover builds its NTT domain context from this. The basis is not communicated because ReedSolomonCode fixes it: the Gao-Mateer basis of this dimension.

Source

pub fn create_channel<Channel>( &self, channel: Channel, ) -> BaseFoldVerifierChannel<'_, F, Channel>
where Channel: MerkleIPVerifierChannel<F, Elem: From<F> + 'static>,

Creates a ZK verifier channel over the given Merkle channel.

The returned channel drives all prover interaction through channel, opening oracles with this compiler’s oracle specs and combined FRI parameters. The caller constructs the Merkle channel, so it decides how commitments are received and verified.

Source

pub fn create_channel_from_transcript<H, Challenger_, T>( &self, transcript: T, ) -> BaseFoldVerifierChannel<'_, F, VerifierMerkleTranscriptChannel<T, Challenger_, F, H>>
where F: FixedSizeSerializeBytes, H: HashSuite, Challenger_: Challenger, T: BorrowMut<VerifierTranscript<Challenger_>>, Output<H::LeafHash>: DeserializeBytes,

Creates a ZK verifier channel over a transcript, for the common case.

The transcript may be owned or mutably borrowed. It is wrapped in a VerifierMerkleTranscriptChannel for the given hash suite. That channel is then passed to Self::create_channel.

Trait Implementations§

Source§

impl<F> Clone for BaseFoldVerifierCompiler<F>
where F: BinaryField + Clone,

Source§

fn clone(&self) -> BaseFoldVerifierCompiler<F>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

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.

§

impl<T> Instrument for T

§

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

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

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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