RISCV - integrate zkc pipeline into prover#3132
Conversation
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.
linea-besu Changelog Preview (informational)[Unreleased] diff (commits touching
|
postman Changelog Preview (informational)[Unreleased] diff (commits touching
|
tx-exclusion-api Changelog Preview (informational)[Unreleased] diff (commits touching
|
coordinator Changelog Preview (informational)[Unreleased] diff (commits touching
|
prover Changelog Preview (informational)[Unreleased] diff (commits touching
|
| continue | ||
| } | ||
|
|
||
| if modDecl.IsNative() { |
There was a problem hiding this comment.
@ivokub @YaoJGalteland @Tabaie @arijitdutta67
This is meant to serve as entrypoint for the implementation of the precompiles, when they get added
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…riscv---integrate-zkc-pipeline-into-prover
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.

This PR integrates the output of corset-zkC with the prover.
The PR importantly:
Checklist
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
zkcdriverpipeline from reading.lttrace files + compilingzkevm.binto reading a binary constraints file and generating the expanded trace directly viaBinaryFile.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
NewPrecomputedColumnassignments fromStaticContents(), and implementsair.RangeConstrainttranslation into WIOPNewRangeCheckqueries (while explicitly panicking onIsNative()modules). Also tightensModule.NewPrecomputedColumnto reject promised assignments and sets the assignment promise to the new column view.Bumps
go-corsettov1.2.17and replaces the old skipped definition test with runnable ZkC example tests plus small.zkcfixtures and constraint checks.Reviewed by Cursor Bugbot for commit 99e3fa5. Bugbot is set up for automated code reviews on this repo. Configure here.