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,
impl<F> BaseFoldVerifierCompiler<F>where
F: BinaryField,
Sourcepub fn new<H, Strategy>(
merkle_scheme: &BinaryMerkleTreeScheme<F, H>,
oracle_specs: Vec<OracleSpec>,
log_inv_rate: usize,
n_test_queries: usize,
_arity_strategy: &Strategy,
) -> Selfwhere
H: HashSuite,
Strategy: AritySelectionStrategy,
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,
) -> Selfwhere
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.
Sourcepub fn oracle_specs(&self) -> &[OracleSpec]
pub fn oracle_specs(&self) -> &[OracleSpec]
Returns a reference to the oracle specifications.
Sourcepub const fn fri_params(&self) -> &FRIParams<F>
pub const fn fri_params(&self) -> &FRIParams<F>
Returns a reference to the precomputed combined FRI parameters.
Sourcepub fn max_log_domain_size(&self) -> usize
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.
Sourcepub fn create_channel<Channel>(
&self,
channel: Channel,
) -> BaseFoldVerifierChannel<'_, F, Channel>where
Channel: MerkleIPVerifierChannel<F, Elem: From<F> + 'static>,
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.
Sourcepub 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,
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,
impl<F> Clone for BaseFoldVerifierCompiler<F>where
F: BinaryField + Clone,
Source§fn clone(&self) -> BaseFoldVerifierCompiler<F>
fn clone(&self) -> BaseFoldVerifierCompiler<F>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<F> Freeze for BaseFoldVerifierCompiler<F>
impl<F> RefUnwindSafe for BaseFoldVerifierCompiler<F>
impl<F> Send for BaseFoldVerifierCompiler<F>
impl<F> Sync for BaseFoldVerifierCompiler<F>
impl<F> Unpin for BaseFoldVerifierCompiler<F>
impl<F> UnsafeUnpin for BaseFoldVerifierCompiler<F>
impl<F> UnwindSafe for BaseFoldVerifierCompiler<F>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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