mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 20:27:58 -05:00
* fix(execution): assigns the functional public inputs * revert(execution): reinstate the panic if the traes do not match the checksum. * clean(circuit): remove the systematic circuit profiling * fix(pi-interconnection): fix the check on the aggregation circuit * chores(prover): remove the overly verbose log * chores(zkevm.bin) commit the updated zkevm.bin * fix(public-input): point to data_hilo instead of addr_hilo * fixup: pi-interconnection fix in the circuit and the assignment --------- Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
33 lines
732 B
Go
33 lines
732 B
Go
package execution
|
|
|
|
import (
|
|
"github.com/consensys/gnark-crypto/ecc/bls12-377/fr"
|
|
"github.com/consensys/gnark/constraint"
|
|
"github.com/consensys/gnark/frontend"
|
|
"github.com/consensys/gnark/frontend/cs/scs"
|
|
"github.com/consensys/linea-monorepo/prover/zkevm"
|
|
)
|
|
|
|
type builder struct {
|
|
zkevm *zkevm.ZkEvm
|
|
}
|
|
|
|
func NewBuilder(z *zkevm.ZkEvm) *builder {
|
|
return &builder{zkevm: z}
|
|
}
|
|
|
|
func (b *builder) Compile() (constraint.ConstraintSystem, error) {
|
|
return makeCS(b.zkevm), nil
|
|
}
|
|
|
|
// builds the circuit
|
|
func makeCS(z *zkevm.ZkEvm) constraint.ConstraintSystem {
|
|
circuit := Allocate(z)
|
|
|
|
scs, err := frontend.Compile(fr.Modulus(), scs.NewBuilder, &circuit, frontend.WithCapacity(1<<24))
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return scs
|
|
}
|