Skip to content

Commit

Permalink
Prover: bump go-corset to the latest version (#160)
Browse files Browse the repository at this point in the history
* bump go-corset to the latest commit

* disable typecheck

* fix error code 77 msg format

* fix missing String method error

* enable typecheck

* bump go-corset version

* gofmt and fix comments

* fix golangci-lint version to v1.61.0

---------

Co-authored-by: AlexandreBelling <[email protected]>
  • Loading branch information
gusiri and AlexandreBelling authored Oct 11, 2024
1 parent ac758f6 commit 37a2fb0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/prover-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.61.0
working-directory: prover
args: --timeout=5m
- name: generated files should not be modified
Expand Down
2 changes: 1 addition & 1 deletion prover/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/consensys/compress v0.2.5
github.com/consensys/gnark v0.11.1-0.20240910135928-e8cb61d0be1d
github.com/consensys/gnark-crypto v0.14.1-0.20240909204211-78a6dc12799c
github.com/consensys/go-corset v0.0.0-20240920085445-2d0aad43bfbd
github.com/consensys/go-corset v0.0.0-20241009181119-b687f2ec84ed
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
Expand Down
4 changes: 2 additions & 2 deletions prover/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ github.com/consensys/gnark v0.11.1-0.20240910135928-e8cb61d0be1d h1:TmNupI1+K5/L
github.com/consensys/gnark v0.11.1-0.20240910135928-e8cb61d0be1d/go.mod h1:f9CH911SPCrbSZp5z9LYzJ3rZvI7mOUzzf48lCZO/5o=
github.com/consensys/gnark-crypto v0.14.1-0.20240909204211-78a6dc12799c h1:fkRJCyz4EBjDNhiNTyyyEJBEW7RsFzmDVd/ot4jtSrE=
github.com/consensys/gnark-crypto v0.14.1-0.20240909204211-78a6dc12799c/go.mod h1:AL8vs/7MyZ0P93tcNDkUWVwf2rWLUGFUP/1iqiF7h4E=
github.com/consensys/go-corset v0.0.0-20240920085445-2d0aad43bfbd h1:yNUrtBL6JEGq9lpTHyjTZ5i3VGhqkKhoYokTVnt0Iqs=
github.com/consensys/go-corset v0.0.0-20240920085445-2d0aad43bfbd/go.mod h1:J64guTfpmfXl4Yk2D7lsWdYg0ilP+N8JWPudP7+sZpA=
github.com/consensys/go-corset v0.0.0-20241009181119-b687f2ec84ed h1:tA+JpjGO3tB2+Q7lsrlDper2L5BcvgS2sNd6DLS2ViM=
github.com/consensys/go-corset v0.0.0-20241009181119-b687f2ec84ed/go.mod h1:J64guTfpmfXl4Yk2D7lsWdYg0ilP+N8JWPudP7+sZpA=
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=
Expand Down
4 changes: 2 additions & 2 deletions prover/zkevm/arithmetization/assignment.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ func AssignFromLtTraces(run *wizard.ProverRuntime, schema *air.Schema, expTraces

if uint(limit) < height {
level = logrus.ErrorLevel
err77 = errors.Join(err77, fmt.Errorf("limit overflow: module %q overflows its limit height=%v limit=%v ratio=%v", name, height, limit, ratio))
err77 = errors.Join(err77, fmt.Errorf("limit overflow: module '%s' overflows its limit height=%v limit=%v ratio=%v", name, height, limit, ratio))
}

logrus.StandardLogger().Logf(level, "module utilization module=%v height=%v limit=%v ratio=%v", name, height, limit, ratio)
}

if err77 != nil {
logrus.Errorf("Error code 77: \n%v", err77)
logrus.Errorf("Error code 77 %v", err77)
os.Exit(TraceOverflowExitCode)
}

Expand Down
6 changes: 3 additions & 3 deletions prover/zkevm/arithmetization/definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (s *schemaScanner) scanConstraints() {
corsetCSs := s.Schema.Constraints().Collect()

for _, corsetCS := range corsetCSs {
name := corsetCS.String()
name := fmt.Sprintf("%v", corsetCS)
if s.Comp.QueriesNoParams.Exists(ifaces.QueryID(name)) {
continue
}
Expand Down Expand Up @@ -230,8 +230,8 @@ func (s *schemaScanner) castExpression(expr air.Expr) *symbolic.Expression {
return symbolic.NewVariable(c)

default:

panic(fmt.Sprintf("unsupported type: %T for %v", e, e.String()))
eStr := fmt.Sprintf("%v", e)
panic(fmt.Sprintf("unsupported type: %T for %v", e, eStr))
}
}

Expand Down

0 comments on commit 37a2fb0

Please sign in to comment.