FriCommitments

Struct FriCommitments 

Source
pub struct FriCommitments<const N: usize, F, H: Hasher> { /* private fields */ }
Expand description

Result of a polynomial folding (FRI COMMIT phase).

Use crate::commit_polynomial to create a FriCommitments from a polynomial in coefficient form, or FriCommitments::new to create it from the evaluations directly.

Use crate::build_proof to get an actual FRI proof from a FriCommitments.

Implementations§

Source§

impl<const N: usize, F: FftField, H: Hasher> FriCommitments<N, F, H>

Source

pub fn new<R>( evaluations: Vec<F>, rng: R, blowup_factor: usize, remainder_degree_plus_one: usize, ) -> Self
where R: ReseedableRng<Seed = H::Hash>,

Commits the polynomial according to FRI algorithm.

  • evaluations is the list of evaluations of the polynomial on the n-th roots of unity (where n = evaluations.len()).

See crate::commit_polynomial for information about the other parameters.

§Panics

This may either panic or have unspecified behaviour if remainder_degree_plus_one is inconsistent with the degree-bound of the polynomial and the folding factor, or if F does not contain a subgroup of size evaluations.len().

Trait Implementations§

Source§

impl<const N: usize, F: Clone, H: Clone + Hasher> Clone for FriCommitments<N, F, H>

Source§

fn clone(&self) -> FriCommitments<N, F, H>

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<const N: usize, F, H> Freeze for FriCommitments<N, F, H>

§

impl<const N: usize, F, H> RefUnwindSafe for FriCommitments<N, F, H>

§

impl<const N: usize, F, H> Send for FriCommitments<N, F, H>
where F: Send, <H as Hasher>::Hash: Send,

§

impl<const N: usize, F, H> Sync for FriCommitments<N, F, H>
where F: Sync, <H as Hasher>::Hash: Sync,

§

impl<const N: usize, F, H> Unpin for FriCommitments<N, F, H>
where F: Unpin, <H as Hasher>::Hash: Unpin,

§

impl<const N: usize, F, H> UnwindSafe for FriCommitments<N, F, H>
where F: UnwindSafe, <H as Hasher>::Hash: UnwindSafe,

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.

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V