Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable build for zkevm.go.bin #559

Merged
merged 12 commits into from
Jan 14, 2025
Merged

Conversation

DavePearce
Copy link
Collaborator

This adds support for a new build target, namely zkevm.go.bin. This target is built using go-corset rather than the original corset tool. In order to make this work, a very small number of fixes to the constraints were required. These consist of simple typos and/or broken debug constraints.

@DavePearce DavePearce linked an issue Jan 12, 2025 that may be closed by this pull request
@DavePearce DavePearce requested a review from OlivierBBB January 12, 2025 21:41
Copy link

cla-assistant bot commented Jan 12, 2025

CLA assistant check
All committers have signed the CLA.

This adds a new target for constructing a `zkevm.gob` using `go-corset`.
For now, we use `zkevm.gob` until things have stablised and we can
return to the `zkevm.bin` format as before.
For reasons unknown, there was a `defalias` instance embedded into a
`defperspective` declaration.  This syntax is not supported by
`go-corset` (and its unclear whether the original tool supports it
even).  Eitherway, since this alias is not used, it can be safely
removed.
A defpurefun selector function was being declared in the top-level
module, and which used qualified names to access columns directly in the
bin module.  This should have actually been reported as a syntax error.
Instead, defun should be used and this changes it accordingly.
This comments out some broken debug constraints.
This adds necessary type information for the `bit_n` parameter which is
passed in to the `plateau-constraints` library function.
This fixes a bunch of typos, mostly where the given perspective for a
column was not correctly specified.  This is actually quite a serious
error, because it seems corset has a problem with columns in different
perspectives that have the same name.
This adds a corresponding target `zkevm_for_reference_tests.go.bin` to
be used when running the reference tests.
The rough fix made for the `ecdata/constraints` was incorrect, and this
now fixes it.
@DavePearce DavePearce force-pushed the 556-feat-integrate-go-corset branch from a2c18b7 to 051db4f Compare January 13, 2025 21:00
DavePearce and others added 3 commits January 14, 2025 10:33
This places the relevant constants for Linea or Ethereum into the
relevant file in the blockdata/processing/gaslimit directory.  These are
then picked up correctly by the `Makefile`.
Signed-off-by: Olivier Bégassat <[email protected]>
Signed-off-by: Olivier Bégassat <[email protected]>
Copy link
Collaborator

@OlivierBBB OlivierBBB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'm not sure we want to uncomment all commented debug constraints.

@DavePearce DavePearce merged commit 2a343fa into master Jan 14, 2025
3 checks passed
@DavePearce DavePearce deleted the 556-feat-integrate-go-corset branch January 14, 2025 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: integrate go-corset
2 participants