Skip to content

Prover: add missing invalidity circuits to PayloadCircuits#3074

Merged
gusiri merged 2 commits into
prover/fix-ftxfrom
prover/fix-ftx-collect-vk
May 18, 2026
Merged

Prover: add missing invalidity circuits to PayloadCircuits#3074
gusiri merged 2 commits into
prover/fix-ftxfrom
prover/fix-ftx-collect-vk

Conversation

@gusiri
Copy link
Copy Markdown
Contributor

@gusiri gusiri commented May 12, 2026

This PR implements issue(s) #

Checklist

  • I wrote new tests for my new core changes.
  • I have successfully ran tests, style checker and build against my new changes locally.
  • If this change is deployed to any environment (including Devnet), E2E test coverage exists or is included in this
    PR.
  • I have informed the team of any breaking changes if there are any.

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 PayloadCircuits from IDs 0-5 to 0-13 by adding the missing invalidity dummy and production circuits, and updates setup comments/logging to reflect the new payload ID range.

Updates setup.go so payload VK collection and dummy-circuit detection include these invalidity circuits, ensuring aggregation setup computes digests over the full allowed payload set.

Adds TestPayloadCircuitsMatchGlobalMapping to prevent future drift between PayloadCircuits and circuits.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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

postman Changelog Preview (informational)

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

[unreleased]

⚙️ Miscellaneous Tasks

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 12, 2026

coordinator Changelog Preview (informational)

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

[unreleased]

⚙️ Miscellaneous Tasks

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 12, 2026

linea-besu Changelog Preview (informational)

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

[unreleased]

⚙️ Miscellaneous Tasks

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

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.19%. Comparing base (f6fe6e4) to head (433a014).
⚠️ Report is 2 commits behind head on main.

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           
Flag Coverage Δ *Carryforward flag
hardhat 96.17% <ø> (ø)
kotlin 55.86% <ø> (ø) Carriedforward from 1293a5a
lido-governance-monitor 97.61% <ø> (ø) Carriedforward from 1293a5a
linea-native-libs 90.69% <ø> (ø) Carriedforward from 1293a5a
linea-shared-utils 96.18% <ø> (ø) Carriedforward from 1293a5a
native-yield-automation-service 97.68% <ø> (ø) Carriedforward from 1293a5a
postman 99.92% <ø> (ø) Carriedforward from 1293a5a
sdk-core 98.09% <ø> (ø) Carriedforward from 1293a5a
sdk-ethers 89.83% <ø> (ø) Carriedforward from 1293a5a
sdk-viem 99.45% <ø> (ø) Carriedforward from 1293a5a
tracer 88.56% <ø> (ø) Carriedforward from 1293a5a

*This pull request uses carry forward flags. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 PayloadCircuits from IDs 0–5 to 0–13 by adding invalidity dummy + production circuits.
  • Updated setup logging/comments to reflect the expanded payload circuit ID range.
  • Updated isPayloadDummyCircuit to classify invalidity dummy circuits as payload dummies.

"invalidity-precompile-logs-limitless", // ID 12
"invalidity-precompile-logs-large", // ID 13
}

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.

This was already addressed. We added TestPayloadCircuitsMatchGlobalMapping which does exactly what it asks.

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 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 433a014. Configure here.

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.

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

@gusiri gusiri changed the base branch from main to prover/fix-ftx May 18, 2026 10:56
@gusiri gusiri merged commit 15824a1 into prover/fix-ftx May 18, 2026
46 of 47 checks passed
@gusiri gusiri deleted the prover/fix-ftx-collect-vk branch May 18, 2026 10:57
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.

4 participants