pub trait FriGenericConfig<F: Field> {
type InputProof;
type InputError: Debug;
// Required methods
fn extra_query_index_bits(&self) -> usize;
fn fold_row(
&self,
index: usize,
log_height: usize,
beta: F,
evals: impl Iterator<Item = F>,
) -> F;
fn fold_matrix<M: Matrix<F>>(&self, beta: F, m: M) -> Vec<F>;
}
Expand description
Whereas FriConfig
encompasses parameters the end user can set, FriGenericConfig
is
set by the PCS calling FRI, and abstracts over implementation details of the PCS.
Required Associated Types§
type InputProof
type InputError: Debug
Required Methods§
Sourcefn extra_query_index_bits(&self) -> usize
fn extra_query_index_bits(&self) -> usize
We can ask FRI to sample extra query bits (LSB) for our own purposes. They will be passed to our callbacks, but ignored (shifted off) by FRI.
Sourcefn fold_row(
&self,
index: usize,
log_height: usize,
beta: F,
evals: impl Iterator<Item = F>,
) -> F
fn fold_row( &self, index: usize, log_height: usize, beta: F, evals: impl Iterator<Item = F>, ) -> F
Fold a row, returning a single column. Right now the input row will always be 2 columns wide, but we may support higher folding arity in the future.
Sourcefn fold_matrix<M: Matrix<F>>(&self, beta: F, m: M) -> Vec<F>
fn fold_matrix<M: Matrix<F>>(&self, beta: F, m: M) -> Vec<F>
Same as applying fold_row to every row, possibly faster.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.