Expand description
This module defines the particular form of the expressions used in the Mina Berkeley hardfork. You can find more information in this blog article. This module is also a good starting point if you want to implement your own variant of Kimchi using the expression framework.
The module uses the generic expression framework defined in the crate::circuits::expr module. The expressions define the polynomials that can be used to describe the constraints. It starts by defining the different challenges used by the PLONK IOP in BerkeleyChallengeTerm and BerkeleyChallenges. It then defines the Column type which represents the different variables the polynomials are defined over.
Two “environments” are after that defined: one for the lookup argument LookupEnvironment, and one for the main argument Environment, which contains the former. The trait ColumnEnvironment is then defined to provide the necessary primitives used to evaluate the quotient polynomial.
Structs§
- Berkeley
Challenges - Environment
- The collection of polynomials (all in evaluation form) and constants required to evaluate an expression as a polynomial.
- Lookup
Environment - The polynomials specific to the lookup argument.
Enums§
- Berkeley
Challenge Term - The challenge terms used in Berkeley.
- Column
- A type representing the variables involved in the constraints of the Berkeley hardfork.
Functions§
- coeff
- constant
- Convenience function to create a constant as Expr.
- index
- Handy function to quickly create an expression for a gate.
- witness
- Helper function to quickly create an expression for a witness.
- witness_
curr - Same as witness but for the current row.
- witness_
next - Same as witness but for the next row.
Type Aliases§
- E
- An alias for the intended usage of the expression type in constructing constraints.