pub struct BoundaryConstraintGroup<F, E>where
    F: FieldElement,
    E: FieldElement<BaseField = <F as FieldElement>::BaseField> + ExtensionOf<F>,
{ /* private fields */ }
Expand description

A group of boundary constraints all having the same divisor.

A boundary constraint is described by a rational function $\frac{f(x) - b(x)}{z(x)}$, where:

  • $f(x)$ is a trace polynomial for the column against which the constraint is placed.
  • $b(x)$ is the value polynomial for the constraint.
  • $z(x)$ is the constraint divisor polynomial.

A boundary constraint group groups together all boundary constraints where polynomial $z$ is the same. The constraints stored in the group describe polynomials $b$. At the time of constraint evaluation, a prover or a verifier provides evaluations of the relevant polynomial $f$ so that the value of the constraint can be computed.

When the protocol is run in a large field, types F and E are the same. However, when working with small fields, F and E can be set as follows:

  • F could be the base field of the protocol, in which case E is the extension field used.
  • F could be the extension field, in which case F and E are the same type.

The above arrangement allows us to describe boundary constraints for main and auxiliary segments of the execution trace. Specifically:

  • For the constraints against columns of the main execution trace, F is set to the base field of the protocol, and E is set to the extension field.
  • For the constraints against columns of auxiliary trace segments, both F and E are set to the extension field.

Implementations

Returns a list of boundary constraints in this group.

Returns a divisor applicable to all boundary constraints in this group.

Returns a degree adjustment factor for all boundary constraints in this group.

Evaluates all constraints in this group at the specified point x.

xp is a degree adjustment multiplier which must be computed as x^degree_adjustment. This value is provided as an argument to this function for optimization purposes.

Constraint evaluations are merges into a single value by computing their random linear combination and dividing the result by the divisor of this constraint group as follows: $$ \frac{\sum_{i=0}^{k-1}{C_i(x) \cdot (\alpha_i + \beta_i \cdot x^d)}}{z(x)} $$ where:

  • $C_i(x)$ is the evaluation of the $i$th constraint at x computed as $f(x) - b(x)$.
  • $\alpha$ and $\beta$ are random field elements. In the interactive version of the protocol, these are provided by the verifier.
  • $z(x)$ is the evaluation of the divisor polynomial for this group at $x$.
  • $d$ is the degree adjustment factor computed as $D - deg(C_i(x)) + deg(z(x))$, where $D$ is the degree of the composition polynomial.

Thus, the merged evaluations represent a polynomial of degree $D$, as the degree of the numerator is $D + deg(z(x))$, and the division by $z(x)$ reduces the degree by $deg(z(x))$.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.