p3_fri

Trait FriGenericConfig

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

Required Methods§

Source

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.

Source

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.

Source

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.

Implementors§

Source§

impl<F: TwoAdicField, InputProof, InputError: Debug> FriGenericConfig<F> for TwoAdicFriGenericConfig<InputProof, InputError>

Source§

type InputProof = InputProof

Source§

type InputError = InputError