#[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:
- Linear, also called affine, where the resulting expression is a multivariate polynomial of total degree 1 in each of the random values.
- Algebraic, also called parametric or curve batching, where the resulting expression is a univariate polynomial in one random value.
- 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§
Trait Implementations§
Source§impl Clone for BatchingMethod
impl Clone for BatchingMethod
Source§fn clone(&self) -> BatchingMethod
fn clone(&self) -> BatchingMethod
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BatchingMethod
impl Debug for BatchingMethod
Source§impl Deserializable for BatchingMethod
impl Deserializable for BatchingMethod
Source§fn read_from<R: ByteReader>(
source: &mut R,
) -> Result<Self, DeserializationError>
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>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
Source§impl PartialEq for BatchingMethod
impl PartialEq for BatchingMethod
Source§impl Serializable for BatchingMethod
impl Serializable for BatchingMethod
Source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
Serializes self and writes the resulting bytes into the target.