Skip to content

RISCV - integrate zkc pipeline into prover#3132

Open
AlexandreBelling wants to merge 9 commits into
mainfrom
3112-riscv---integrate-zkc-pipeline-into-prover
Open

RISCV - integrate zkc pipeline into prover#3132
AlexandreBelling wants to merge 9 commits into
mainfrom
3112-riscv---integrate-zkc-pipeline-into-prover

Conversation

@AlexandreBelling
Copy link
Copy Markdown
Contributor

@AlexandreBelling AlexandreBelling commented May 18, 2026

This PR integrates the output of corset-zkC with the prover.

The PR importantly:

  • Adds support for the static module (i.e. modules with only precomputed columns°
  • Backport support for range-checks from corset (the binding was outstanding).
  • Test the tracer binding

Checklist

  • I wrote new tests for my new core changes.
  • I have successfully ran tests, style checker and build against my new changes locally.

Note

Medium Risk
Changes how ZkC constraints are loaded/traced and how modules/constraints are materialized into the prover, which can affect soundness and correctness of generated proofs. Adds new handling for static modules and range checks plus dependency bump, so regressions are possible if schemas differ or native modules appear.

Overview
Switches the zkcdriver pipeline from reading .lt trace files + compiling zkevm.bin to reading a binary constraints file and generating the expanded trace directly via BinaryFile.Trace() from JSON inputs (optionally gzipped), with simplified metadata handling and updated assignment (AssignFromTrace).

Adds schema support for static modules by creating sized WIOP modules populated with NewPrecomputedColumn assignments from StaticContents(), and implements air.RangeConstraint translation into WIOP NewRangeCheck queries (while explicitly panicking on IsNative() modules). Also tightens Module.NewPrecomputedColumn to reject promised assignments and sets the assignment promise to the new column view.

Bumps go-corset to v1.2.17 and replaces the old skipped definition test with runnable ZkC example tests plus small .zkc fixtures and constraint checks.

Reviewed by Cursor Bugbot for commit 99e3fa5. Bugbot is set up for automated code reviews on this repo. Configure here.

DavePearce and others added 4 commits May 15, 2026 14:31
This updates the zkcdriver package to use the new ZkC API provided by
go-corset.  Whilst many things remain the same, there are a few notable
differences.  Firstly, we no longer read in an LT trace file but,
instead, read in a set of "program inputs" (currently as a JSON file,
though this could be changed later).  The inputs are used to populate
the input memories of the ZkC program under consideration.  Secondly,
there are now the notions of a "static reference table" and a "native
module".  The former indicates a modules whose contents are fixed across
all executions of the given program (i.e. they never change).  The
latter represent modules which are visible in ZkC, but whose constraints
are implemented natively by the prover.
This adds an (incomplete) example test which currently fails when
constructing the ZkcDriver for reasons unknown.
This updates the version of go-corset to the latest released version
(1.2.16); it also adds a second test which utilises a loop to calculate
2^n.
@AlexandreBelling AlexandreBelling self-assigned this May 18, 2026
@AlexandreBelling AlexandreBelling added Arithmetization Arithmetization team is in charge or involved in this task Prover-RAY All issues or PR relevant to the establishment of the framework in prover-ray labels May 18, 2026
@AlexandreBelling AlexandreBelling linked an issue May 18, 2026 that may be closed by this pull request
@AlexandreBelling AlexandreBelling added the Wizard To tag issues on the wizard team label May 18, 2026
@AlexandreBelling AlexandreBelling changed the title 3112 riscv integrate zkc pipeline into prover RISCV - integrate zkc pipeline into prover May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

linea-besu Changelog Preview (informational)

[Unreleased] diff (commits touching linea-besu/** since latest releases/linea-besu/v* tag)

[unreleased]

Generated by git-cliff-action using cliff.toml. This comment is informational and does not gate the PR.

@github-actions
Copy link
Copy Markdown
Contributor

postman Changelog Preview (informational)

[Unreleased] diff (commits touching postman/** since latest releases/postman/v* tag)

[unreleased]

Generated by git-cliff-action using cliff.toml. This comment is informational and does not gate the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

tx-exclusion-api Changelog Preview (informational)

[Unreleased] diff (commits touching tx-exclusion-api/** since latest releases/tx-exclusion-api/v* tag)

[unreleased]

Generated by git-cliff-action using cliff.toml. This comment is informational and does not gate the PR.

@github-actions
Copy link
Copy Markdown
Contributor

coordinator Changelog Preview (informational)

[Unreleased] diff (commits touching coordinator/** since latest releases/coordinator/v* tag)

[unreleased]

Generated by git-cliff-action using cliff.toml. This comment is informational and does not gate the PR.

@github-actions
Copy link
Copy Markdown
Contributor

prover Changelog Preview (informational)

[Unreleased] diff (commits touching prover/** since latest releases/prover/v* tag)

[unreleased]

Generated by git-cliff-action using cliff.toml. This comment is informational and does not gate the PR.

continue
}

if modDecl.IsNative() {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ivokub @YaoJGalteland @Tabaie @arijitdutta67

This is meant to serve as entrypoint for the implementation of the precompiles, when they get added

Comment thread prover-ray/zkcdriver/assignment.go Outdated
Comment thread prover-ray/zkcdriver/definition.go Outdated
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 18, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedgolang/​github.com/​consensys/​go-corset@​v1.2.1797100100100100

View full report

Comment thread prover-ray/zkcdriver/assignment.go
DavePearce
DavePearce previously approved these changes May 18, 2026
Copy link
Copy Markdown
Contributor

@DavePearce DavePearce left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread prover-ray/zkcdriver/example_test.go
Comment thread prover-ray/zkcdriver/definition.go
Comment thread prover-ray/zkcdriver/definition_test.go
Comment thread prover-ray/zkcdriver/zkcdriver.go
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 99e3fa5. Configure here.

Comment thread prover-ray/zkcdriver/definition.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arithmetization Arithmetization team is in charge or involved in this task Prover-RAY All issues or PR relevant to the establishment of the framework in prover-ray Wizard To tag issues on the wizard team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RISCV] - integrate ZkC pipeline into prover

2 participants