mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-08 19:58:01 -05:00
* docs: Starts fixing zk-EVM to zkEVM * docs: fixes zk-EVM and light proof * Update prover/README.md Signed-off-by: Julien Marchand <julien-marchand@users.noreply.github.com> --------- Signed-off-by: Julien Marchand <julien-marchand@users.noreply.github.com> Co-authored-by: Julien Marchand <julien-marchand@users.noreply.github.com>
41 lines
1.4 KiB
Go
41 lines
1.4 KiB
Go
package arithmetization
|
|
|
|
import (
|
|
"github.com/consensys/zkevm-monorepo/prover/protocol/wizard"
|
|
"github.com/consensys/zkevm-monorepo/prover/zkevm/arithmetization/define"
|
|
)
|
|
|
|
// Settings specifies the parameters for the arithmetization part of the zkEVM.
|
|
type Settings = define.Settings
|
|
|
|
// Arithmetization exposes all the methods relevant for the user to interact
|
|
// with the arithmetization of the zkEVM. It is a sub-component of the whole
|
|
// ZkEvm object as it does not includes the precompiles, the keccaks and the
|
|
// signature verification.
|
|
type Arithmetization struct {
|
|
Settings *Settings
|
|
}
|
|
|
|
// Define is the function that declares all the columns and the constraints of
|
|
// the zkEVM in the input builder object.
|
|
func (a *Arithmetization) Define(builder *wizard.Builder) {
|
|
// wrapped works as an adapter between the define.Define and the
|
|
// wizard.Builder. This value is only relevant during the execution of the
|
|
// current function and it should not be reused thereafter.
|
|
wrapped := define.Builder{
|
|
Settings: a.Settings,
|
|
}
|
|
wrapped.Define(builder)
|
|
}
|
|
|
|
// Assign the arithmetization related columns. Namely, it will open the file
|
|
// specified in the witness object, call corset and assign the prover runtime
|
|
// columns.
|
|
func Assign(run *wizard.ProverRuntime, traceFile string) {
|
|
// @Alex: This opens and reads the conflated trace file
|
|
AssignFromCorset(
|
|
traceFile,
|
|
run,
|
|
)
|
|
}
|