Prover: add missing invalidity circuits to PayloadCircuits#3074
Conversation
postman Changelog Preview (informational)[Unreleased] diff (commits touching
|
coordinator Changelog Preview (informational)[Unreleased] diff (commits touching
|
linea-besu Changelog Preview (informational)[Unreleased] diff (commits touching
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3074 +/- ##
=========================================
Coverage 77.19% 77.19%
Complexity 7003 7003
=========================================
Files 1121 1121
Lines 44508 44508
Branches 5355 5355
=========================================
Hits 34356 34356
Misses 8785 8785
Partials 1367 1367
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Expands the prover setup’s notion of “payload circuits” to include the invalidity dummy and production circuits, so aggregation/emulation setup will also collect and embed verifying keys for invalidity circuit IDs (0–13) per the canonical GlobalCircuitIDMapping.
Changes:
- Expanded
PayloadCircuitsfrom IDs0–5to0–13by adding invalidity dummy + production circuits. - Updated setup logging/comments to reflect the expanded payload circuit ID range.
- Updated
isPayloadDummyCircuitto classify invalidity dummy circuits as payload dummies.
| "invalidity-precompile-logs-limitless", // ID 12 | ||
| "invalidity-precompile-logs-large", // ID 13 | ||
| } | ||
|
|
There was a problem hiding this comment.
This was already addressed. We added TestPayloadCircuitsMatchGlobalMapping which does exactly what it asks.
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 433a014. Configure here.
| "invalidity-precompile-logs", // ID 10 | ||
| "invalidity-filtered-address", // ID 11 | ||
| "invalidity-precompile-logs-limitless", // ID 12 | ||
| "invalidity-precompile-logs-large", // ID 13 |
There was a problem hiding this comment.
Swapped order of large and limitless invalidity circuits
High Severity
PayloadCircuits lists "invalidity-precompile-logs-limitless" at index 12 and "invalidity-precompile-logs-large" at index 13, but AllCircuits has the opposite order — InvalidityPrecompileLogsLargeCircuitID at position 12 and InvalidityPrecompileLogsLimitlessCircuitID at position 13. If GlobalCircuitIDMapping assigns IDs consistent with AllCircuits, this swap causes verifying keys to be collected at wrong indices, leading to VK digest mismatches during aggregation proof generation.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 433a014. Configure here.
There was a problem hiding this comment.
False positive. PayloadCircuits order matches GlobalCircuitIDMapping (the canonical ID source), not AllCircuits. AllCircuits has no positional ID semantics — it's just a set for the --circuits flag. This is verified by TestPayloadCircuitsMatchGlobalMapping


This PR implements issue(s) #
Checklist
PR.
Note
Medium Risk
Medium risk because it changes the canonical payload circuit list used to compute aggregation VK digests and circuit-ID ordering; incorrect ordering or missing setup assets would break aggregation proof compatibility.
Overview
Expands
PayloadCircuitsfrom IDs0-5to0-13by adding the missing invalidity dummy and production circuits, and updates setup comments/logging to reflect the new payload ID range.Updates
setup.goso payload VK collection and dummy-circuit detection include these invalidity circuits, ensuring aggregation setup computes digests over the full allowed payload set.Adds
TestPayloadCircuitsMatchGlobalMappingto prevent future drift betweenPayloadCircuitsandcircuits.GlobalCircuitIDMapping, catching mismatches that would otherwise surface as VK-digest/CircuitID inconsistencies during aggregation.Reviewed by Cursor Bugbot for commit 433a014. Bugbot is set up for automated code reviews on this repo. Configure here.