BatchingMethod

Enum BatchingMethod 

Source
#[repr(u8)]
pub enum BatchingMethod { Linear = 0, Algebraic = 1, Horner = 2, }
Expand description

Represents the type of batching, using randomness, used in the construction of either the constraint composition polynomial or the DEEP composition polynomial.

There are currently two types of batching supported:

  1. Linear, also called affine, where the resulting expression is a multivariate polynomial of total degree 1 in each of the random values.
  2. Algebraic, also called parametric or curve batching, where the resulting expression is a univariate polynomial in one random value.
  3. Horner, which is the same as Algebraic except that the random values generated are reversed. This can sometimes be useful in the context of recursive verification as it removes the need to do the reversion of the coefficients when using Horner’s method of polynomial evaluation.

The main difference between the two types is that algebraic batching has low verifier randomness complexity and hence is light on the number of calls to the random oracle. However, this comes at the cost of an increase in the soundness error of the constraint batching step, i.e., ALI, on the order of log2(C - 1) where C is the number of constraints being batched and an increase in the soundness error of the FRI batching step, on the order of log2(N - 1) where N is the number of code words being batched. Linear batching does not suffer from such a degradation but has linear verifier randomness complexity in the number of terms being batched.

Variants§

§

Linear = 0

§

Algebraic = 1

§

Horner = 2

Trait Implementations§

Source§

impl Clone for BatchingMethod

Source§

fn clone(&self) -> BatchingMethod

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

impl Debug for BatchingMethod

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deserializable for BatchingMethod

Source§

fn read_from<R: ByteReader>( source: &mut R, ) -> Result<Self, DeserializationError>

Reads BatchingMethod from the specified source and returns the result.

§Errors

Returns an error if the value does not correspond to a valid BatchingMethod.

Source§

fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>

Attempts to deserialize the provided bytes into Self and returns the result. Read more
Source§

impl PartialEq for BatchingMethod

Source§

fn eq(&self, other: &BatchingMethod) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serializable for BatchingMethod

Source§

fn write_into<W: ByteWriter>(&self, target: &mut W)

Serializes self and writes the resulting bytes into the target.

Source§

fn to_bytes(&self) -> Vec<u8>

Serializes self into a vector of bytes.
Source§

fn get_size_hint(&self) -> usize

Returns an estimate of how many bytes are needed to represent self. Read more
Source§

impl Copy for BatchingMethod

Source§

impl Eq for BatchingMethod

Source§

impl StructuralPartialEq for BatchingMethod

Auto Trait Implementations§

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.