pub struct FRIFolder<'a, F, FA, VCS>{ /* private fields */ }
Expand description
A stateful prover for the FRI fold phase.
Implementations§
source§impl<'a, F, FA, VCS> FRIFolder<'a, F, FA, VCS>where
F: BinaryField + ExtensionField<FA>,
FA: BinaryField,
VCS: VectorCommitScheme<F> + Sync,
VCS::Committed: Send + Sync,
impl<'a, F, FA, VCS> FRIFolder<'a, F, FA, VCS>where
F: BinaryField + ExtensionField<FA>,
FA: BinaryField,
VCS: VectorCommitScheme<F> + Sync,
VCS::Committed: Send + Sync,
sourcepub fn new(
committed_rs_code: &'a ReedSolomonCode<FA>,
final_rs_code: &'a ReedSolomonCode<F>,
log_batch_size: usize,
committed_codeword: &'a [F],
committed_codeword_vcs: &'a VCS,
round_vcss: &'a [VCS],
committed: &'a VCS::Committed,
) -> Result<Self, Error>
pub fn new( committed_rs_code: &'a ReedSolomonCode<FA>, final_rs_code: &'a ReedSolomonCode<F>, log_batch_size: usize, committed_codeword: &'a [F], committed_codeword_vcs: &'a VCS, round_vcss: &'a [VCS], committed: &'a VCS::Committed, ) -> Result<Self, Error>
Constructs a new folder.
sourcepub fn curr_round(&self) -> usize
pub fn curr_round(&self) -> usize
Number of times execute_fold_round
has been called.
sourcepub fn execute_fold_round(
&mut self,
challenge: F,
) -> Result<FoldRoundOutput<VCS::Commitment>, Error>
pub fn execute_fold_round( &mut self, challenge: F, ) -> Result<FoldRoundOutput<VCS::Commitment>, Error>
Executes the next fold round and returns the folded codeword commitment.
As a memory efficient optimization, this method may not actually do the folding, but instead accumulate the folding challenge for processing at a later time. This saves us from storing intermediate folded codewords.
sourcepub fn finalize(
self,
) -> Result<(FinalMessage<F>, FRIQueryProver<'a, F, VCS>), Error>
pub fn finalize( self, ) -> Result<(FinalMessage<F>, FRIQueryProver<'a, F, VCS>), Error>
Finalizes the FRI folding process.
This step will process any unprocessed folding challenges to produce the final folded codeword. Then it will decode this final folded codeword to get the final message. The result is the final message and a query prover instance.
This returns the final message and a query prover instance.
Auto Trait Implementations§
impl<'a, F, FA, VCS> Freeze for FRIFolder<'a, F, FA, VCS>
impl<'a, F, FA, VCS> RefUnwindSafe for FRIFolder<'a, F, FA, VCS>where
<F as WithUnderlier>::Underlier: Sized,
<FA as WithUnderlier>::Underlier: Sized,
VCS: RefUnwindSafe,
<VCS as VectorCommitScheme<F>>::Committed: RefUnwindSafe,
F: RefUnwindSafe,
FA: RefUnwindSafe,
impl<'a, F, FA, VCS> Send for FRIFolder<'a, F, FA, VCS>where
<F as WithUnderlier>::Underlier: Sized,
<FA as WithUnderlier>::Underlier: Sized,
VCS: Sync,
<VCS as VectorCommitScheme<F>>::Committed: Sync + Send,
impl<'a, F, FA, VCS> Sync for FRIFolder<'a, F, FA, VCS>where
<F as WithUnderlier>::Underlier: Sized,
<FA as WithUnderlier>::Underlier: Sized,
VCS: Sync,
<VCS as VectorCommitScheme<F>>::Committed: Sync,
impl<'a, F, FA, VCS> Unpin for FRIFolder<'a, F, FA, VCS>where
<F as WithUnderlier>::Underlier: Sized,
<FA as WithUnderlier>::Underlier: Sized,
F: Unpin,
<VCS as VectorCommitScheme<F>>::Committed: Unpin,
impl<'a, F, FA, VCS> UnwindSafe for FRIFolder<'a, F, FA, VCS>where
<F as WithUnderlier>::Underlier: Sized,
<FA as WithUnderlier>::Underlier: Sized,
VCS: RefUnwindSafe,
<VCS as VectorCommitScheme<F>>::Committed: RefUnwindSafe + UnwindSafe,
F: RefUnwindSafe + UnwindSafe,
FA: RefUnwindSafe,
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
§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>
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