mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 04:08:01 -05:00
Prover: Beta v1.3 (#703)
* update to latest `go-corset` * bump to beta-v1.3-rc3 --------- Co-authored-by: DavePearce <dave01001110@gmail.com>
This commit is contained in:
Submodule constraints updated: e23c58acaf...92ec1b2f8f
@@ -1 +1 @@
|
||||
beta-v1.2/v0.1.0-rc3.1
|
||||
beta-v1.3-rc3
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
environment = "sepolia"
|
||||
version = "4.0.0" # TODO @gbotrel hunt all version definitions.
|
||||
version = "4.0.1" # TODO @gbotrel hunt all version definitions.
|
||||
assets_dir = "./prover-assets"
|
||||
log_level = 4 # TODO @gbotrel will be refactored with new logger.
|
||||
|
||||
@@ -40,7 +40,7 @@ message_service_contract = "0x971e727e956690b9957be6d51Ec16E73AcAC83A7"
|
||||
ADD = 524288
|
||||
BIN = 262144
|
||||
BLAKE_MODEXP_DATA = 16384
|
||||
BLOCK_DATA = 1024
|
||||
BLOCK_DATA = 4096
|
||||
BLOCK_HASH = 512
|
||||
EC_DATA = 262144
|
||||
EUC = 65536
|
||||
@@ -69,15 +69,15 @@ TXN_DATA = 8192
|
||||
WCP = 262144
|
||||
PRECOMPILE_ECRECOVER_EFFECTIVE_CALLS = 128
|
||||
PRECOMPILE_SHA2_BLOCKS = 671
|
||||
PRECOMPILE_RIPEMD_BLOCKS = 671
|
||||
PRECOMPILE_RIPEMD_BLOCKS = 0
|
||||
PRECOMPILE_MODEXP_EFFECTIVE_CALLS = 4
|
||||
PRECOMPILE_ECADD_EFFECTIVE_CALLS = 16384
|
||||
PRECOMPILE_ECMUL_EFFECTIVE_CALLS = 32
|
||||
PRECOMPILE_ECPAIRING_FINAL_EXPONENTIATIONS = 16
|
||||
PRECOMPILE_ECPAIRING_MILLER_LOOPS = 64
|
||||
PRECOMPILE_ECPAIRING_G2_MEMBERSHIP_CALLS = 64
|
||||
PRECOMPILE_BLAKE_EFFECTIVE_CALLS = 600
|
||||
PRECOMPILE_BLAKE_ROUNDS = 600
|
||||
PRECOMPILE_BLAKE_EFFECTIVE_CALLS = 0
|
||||
PRECOMPILE_BLAKE_ROUNDS = 0
|
||||
BLOCK_KECCAK = 8192
|
||||
BLOCK_L1_SIZE = 1000000
|
||||
BLOCK_L2_L1_LOGS = 16
|
||||
@@ -90,7 +90,7 @@ INSTRUCTION_DECODER = 512
|
||||
ADD = 1048576
|
||||
BIN = 524288
|
||||
BLAKE_MODEXP_DATA = 32768
|
||||
BLOCK_DATA = 2048
|
||||
BLOCK_DATA = 8192
|
||||
BLOCK_HASH = 1024
|
||||
EC_DATA = 524288
|
||||
EUC = 131072
|
||||
@@ -119,15 +119,15 @@ TXN_DATA = 16384
|
||||
WCP = 524288
|
||||
PRECOMPILE_ECRECOVER_EFFECTIVE_CALLS = 256
|
||||
PRECOMPILE_SHA2_BLOCKS = 671
|
||||
PRECOMPILE_RIPEMD_BLOCKS = 671
|
||||
PRECOMPILE_RIPEMD_BLOCKS = 0
|
||||
PRECOMPILE_MODEXP_EFFECTIVE_CALLS = 8
|
||||
PRECOMPILE_ECADD_EFFECTIVE_CALLS = 32768
|
||||
PRECOMPILE_ECMUL_EFFECTIVE_CALLS = 64
|
||||
PRECOMPILE_ECPAIRING_FINAL_EXPONENTIATIONS = 32
|
||||
PRECOMPILE_ECPAIRING_MILLER_LOOPS = 128
|
||||
PRECOMPILE_ECPAIRING_G2_MEMBERSHIP_CALLS = 128
|
||||
PRECOMPILE_BLAKE_EFFECTIVE_CALLS = 600
|
||||
PRECOMPILE_BLAKE_ROUNDS = 600
|
||||
PRECOMPILE_BLAKE_EFFECTIVE_CALLS = 0
|
||||
PRECOMPILE_BLAKE_ROUNDS = 0
|
||||
BLOCK_KECCAK = 8192
|
||||
BLOCK_L1_SIZE = 1000000
|
||||
BLOCK_L2_L1_LOGS = 16
|
||||
|
||||
@@ -10,7 +10,7 @@ require (
|
||||
github.com/consensys/compress v0.2.5
|
||||
github.com/consensys/gnark v0.11.1-0.20250107100237-2cb190338a01
|
||||
github.com/consensys/gnark-crypto v0.14.1-0.20241217134352-810063550bd4
|
||||
github.com/consensys/go-corset v0.0.0-20250129030528-04c6bba7ccfd
|
||||
github.com/consensys/go-corset v0.0.0-20250217020957-ab7f2d548fa8
|
||||
github.com/crate-crypto/go-kzg-4844 v1.1.0
|
||||
github.com/dlclark/regexp2 v1.11.2
|
||||
github.com/fxamacker/cbor/v2 v2.7.0
|
||||
@@ -98,6 +98,7 @@ require (
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
golang.org/x/term v0.29.0 // indirect
|
||||
golang.org/x/text v0.21.0 // indirect
|
||||
google.golang.org/protobuf v1.34.2 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
@@ -111,6 +112,6 @@ require (
|
||||
github.com/pkg/profile v1.7.0
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948
|
||||
golang.org/x/sys v0.28.0 // indirect
|
||||
golang.org/x/sys v0.30.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
@@ -100,8 +100,8 @@ github.com/consensys/gnark v0.11.1-0.20250107100237-2cb190338a01 h1:YCHI04nMKFC6
|
||||
github.com/consensys/gnark v0.11.1-0.20250107100237-2cb190338a01/go.mod h1:8YNyW/+XsYiLRzROLaj/PSktYO4VAdv6YW1b1P3UsZk=
|
||||
github.com/consensys/gnark-crypto v0.14.1-0.20241217134352-810063550bd4 h1:Kp6egjRqKZf4469dfAWqFe6gi3MRs4VvNHmTfEjUlS8=
|
||||
github.com/consensys/gnark-crypto v0.14.1-0.20241217134352-810063550bd4/go.mod h1:GMPeN3dUSslNBYJsK3WTjIGd3l0ccfMbcEh/d5knFrc=
|
||||
github.com/consensys/go-corset v0.0.0-20250129030528-04c6bba7ccfd h1:GQFLOm7l3hKtngBCuxw7f1NZajizIfWkK1gkUet+kFE=
|
||||
github.com/consensys/go-corset v0.0.0-20250129030528-04c6bba7ccfd/go.mod h1:J64guTfpmfXl4Yk2D7lsWdYg0ilP+N8JWPudP7+sZpA=
|
||||
github.com/consensys/go-corset v0.0.0-20250217020957-ab7f2d548fa8 h1:q6LG3JTvcx9OfKKWDS/5xcT0+mO2gHJnKKpy5mdMN+g=
|
||||
github.com/consensys/go-corset v0.0.0-20250217020957-ab7f2d548fa8/go.mod h1:rNP3hMR2Sjy5EdQNTHINwaM5kD08E3CSw8CCKhljjO8=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
@@ -676,12 +676,14 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
|
||||
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
|
||||
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
|
||||
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
|
||||
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
||||
@@ -145,7 +145,7 @@ func (s *schemaScanner) addConstraintInComp(name string, corsetCS schema.Constra
|
||||
case air.VanishingConstraint:
|
||||
|
||||
var (
|
||||
wExpr = s.castExpression(cs.Constraint.Expr)
|
||||
wExpr = s.castExpression(cs.Constraint.Term)
|
||||
wBoard = wExpr.Board()
|
||||
wMeta = wBoard.ListVariableMetadata()
|
||||
)
|
||||
@@ -196,7 +196,7 @@ func (s *schemaScanner) addConstraintInComp(name string, corsetCS schema.Constra
|
||||
|
||||
// castExpression turns a corset expression into a [symbolic.Expression] whose
|
||||
// variables are [wizard.CompiledIOP] components.
|
||||
func (s *schemaScanner) castExpression(expr air.Expr) *symbolic.Expression {
|
||||
func (s *schemaScanner) castExpression(expr air.Term) *symbolic.Expression {
|
||||
|
||||
switch e := expr.(type) {
|
||||
|
||||
|
||||
@@ -2,12 +2,14 @@ package arithmetization
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"encoding/gob"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/consensys/go-corset/pkg/air"
|
||||
"github.com/consensys/go-corset/pkg/binfile"
|
||||
"github.com/consensys/go-corset/pkg/corset"
|
||||
"github.com/consensys/go-corset/pkg/schema"
|
||||
"github.com/consensys/go-corset/pkg/trace"
|
||||
"github.com/consensys/go-corset/pkg/trace/lt"
|
||||
@@ -25,13 +27,20 @@ var zkevmStr string
|
||||
// ReadZkEvmBin parses and compiles a "zkevm.bin" into an air.Schema. f is closed
|
||||
// at the end of the function call.
|
||||
func ReadZkevmBin() (*air.Schema, error) {
|
||||
|
||||
buf := []byte(zkevmStr)
|
||||
hirSchema, err := binfile.HirSchemaFromJson(buf)
|
||||
var (
|
||||
binf binfile.BinaryFile
|
||||
buf []byte = []byte(zkevmStr)
|
||||
)
|
||||
// TODO: why is only this one needed??
|
||||
gob.Register(binfile.Attribute(&corset.SourceMap{}))
|
||||
// Parse zkbinary file
|
||||
err := binf.UnmarshalBinary(buf)
|
||||
// Sanity check for errors
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not parse the read bytes of the 'zkevm.bin' JSON file into an hir.Schema: %w", err)
|
||||
return nil, fmt.Errorf("could not parse the read bytes of the 'zkevm.bin' file into an hir.Schema: %w", err)
|
||||
}
|
||||
|
||||
// Extract schema
|
||||
hirSchema := &binf.Schema
|
||||
// This performs the corset compilation
|
||||
return hirSchema.LowerToMir().LowerToAir(), nil
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user