Module kimchi::circuits::berkeley_columns
source · 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
- The collection of polynomials (all in evaluation form) and constants required to evaluate an expression as a polynomial.
- The polynomials specific to the lookup argument.
Enums
- The challenge terms used in Berkeley.
- A type representing the variables involved in the constraints of the Berkeley hardfork.
Functions
- Convenience function to create a constant as Expr.
- Handy function to quickly create an expression for a gate.
- Helper function to quickly create an expression for a witness.
- Same as witness but for the current row.
- Same as witness but for the next row.
Type Definitions
- An alias for the intended usage of the expression type in constructing constraints.