Skip to content

Prover: fix invalidity prover#3138

Open
gusiri wants to merge 2 commits into
mainfrom
prover/fix-ftx
Open

Prover: fix invalidity prover#3138
gusiri wants to merge 2 commits into
mainfrom
prover/fix-ftx

Conversation

@gusiri
Copy link
Copy Markdown
Contributor

@gusiri gusiri commented May 18, 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
Touches prover setup/aggregation VK wiring and the limitless invalidity circuit’s execution context (VK Merkle root + distributed VKs), which can impact proof compatibility if misconfigured. Changes are localized but affect critical cryptographic asset generation and circuit ID/VK ordering assumptions.

Overview
Invalidity limitless setup now passes verifying-key data needed at prove time. NewBuilderLimitless takes a VK Merkle root and Compile() injects both distributed verifying keys (from CompiledIOP.ExtraData) and the root into BadPrecompileCircuit’s ExecutionCtx.

Aggregation payload VK ordering is expanded from IDs 0–5 to 0–13 by adding all invalidity dummy/production circuits to PayloadCircuits, updating VK collection and dummy detection accordingly, and updating the invalidity-limitless setup path to load/derive the VK Merkle root when reusing or generating execution-limitless assets.

New tests assert PayloadCircuits matches GlobalCircuitIDMapping (preventing VK digest mismatches) and that FullZKEVMWithSuite does not overwrite the memoized fullZkEvm global; FullZKEVMWithSuite is also adjusted to avoid unnecessary global assignment.

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

gusiri added 2 commits May 18, 2026 19:57
* add missing invalidity circuits to PayloadCircuits

* add a unit test to catch missing circuits
* fix(prover): remove global overwrite in FullZKEVMWithSuite causing nil panic during setup

* test(prover): add test to ensure FullZKEVMWithSuite does not overwrite global state
@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

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.

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 0b7b00f. Configure here.

case circuits.ExecutionDummyCircuitID, circuits.DataAvailabilityDummyCircuitID,
circuits.InvalidityNonceBalanceDummyCircuitID,
circuits.InvalidityPrecompileLogsDummyCircuitID,
circuits.InvalidityFilteredAddressDummyCircuitID:
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.

New dummy circuits unhandled in getDummyCircuitParams

High Severity

isPayloadDummyCircuit now returns true for the three new invalidity dummy circuits (InvalidityNonceBalanceDummyCircuitID, InvalidityPrecompileLogsDummyCircuitID, InvalidityFilteredAddressDummyCircuitID), but getDummyCircuitParams was not updated with matching cases for these circuits. When collectPayloadVerifyingKeys calls getDummyCircuitParams for any of these, it hits the default branch and returns an error, causing setup to fail.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0b7b00f. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

prover Changelog Preview (informational)

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

[unreleased]

🐛 Bug Fixes

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.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.25%. Comparing base (e4bc01b) to head (82765cb).
⚠️ Report is 5 commits behind head on main.

⚠️ Current head 82765cb differs from pull request most recent head 0b7b00f

Please upload reports for the commit 0b7b00f to get more accurate results.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #3138   +/-   ##
=========================================
  Coverage     77.25%   77.25%           
  Complexity     7006     7006           
=========================================
  Files          1118     1118           
  Lines         44394    44394           
  Branches       5343     5343           
=========================================
  Hits          34297    34297           
  Misses         8734     8734           
  Partials       1363     1363           
Flag Coverage Δ *Carryforward flag
hardhat 96.17% <ø> (ø)
kotlin 55.90% <ø> (ø) Carriedforward from 0b7b00f
lido-governance-monitor 97.61% <ø> (ø) Carriedforward from 0b7b00f
linea-native-libs 90.69% <ø> (ø) Carriedforward from 0b7b00f
linea-shared-utils 96.18% <ø> (ø) Carriedforward from 0b7b00f
native-yield-automation-service 97.68% <ø> (ø) Carriedforward from 0b7b00f
postman 99.92% <ø> (ø) Carriedforward from 0b7b00f
sdk-core 98.09% <ø> (ø) Carriedforward from 0b7b00f
sdk-ethers 89.83% <ø> (ø) Carriedforward from 0b7b00f
sdk-viem 99.45% <ø> (ø) Carriedforward from 0b7b00f
tracer 88.55% <ø> (ø) Carriedforward from 0b7b00f

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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.

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.

2 participants