Modules
- A number of useful constraints
- You can import this module like
use kimchi::circuits::expr::prologue::*
to obtain a number of handy aliases and helpers
Macros
- Auto clone macro - Helps make constraints more readable by eliminating requirement to .clone() all the time
Structs
- A cache
- A key for a cached value
- The collection of constants required to evaluate an
Expr
. - A “linearization”, which is linear combination with
E
coefficients of columns. - A type representing a variable which can appear in a constraint. It specifies a column and a relative position (Curr or Next)
Enums
- Define the constant terms an expression can use. It can be any constant term (
Literal
), a matrix (Mds
- used by the permutation used by Poseidon for instance), or endomorphism coefficients (EndoCoefficient
- used as an optimisation). As forchallengeTerm
, it has been used initially to implement the PLONK IOP, with the custom gate Poseidon. However, the terms have no built-in semantic in the expression framework. TODO: we should generalize the expression type over challenges and constants. See https://github.com/MinaProtocol/mina/issues/15287 - The feature flags that can be used to enable or disable parts of constraints.
- For efficiency of evaluation, we compile expressions to reverse Polish notation expressions, which are vectors of the below tokens.
Traits
- The Challenge term that contains an alpha. Is used to make a random linear combination of constraints
Functions
- Computes
prod_{j != n} (1 - omega^j)
Assure we don’t multiply by (1 - omega^n) = (1 - omega^0) = (1 - 1) = 0 - Compute the powers of
x
,x^0, ..., x^{n - 1}
Type Definitions
- An multi-variate polynomial over the base ring
C
with variables