feat: Add SP1 validity proof verifier#842
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 34dcec0fe6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Done! Created PROTO-4885 — Defender: encode SP1 proofs to match on-chain |
|
Done! Created PROTO-4886 — Multi-proof system: wire SP1ValidityVerifier into production deployment scripts — in the Protocol team (state: Todo), and replied on the PR thread. |
| ); | ||
| if (expectedRootId != rootId) return false; | ||
|
|
||
| // TODO: if Nitro becomes a production validity lane, extend this proof |
There was a problem hiding this comment.
/otto create protocol multi proof linear ticket for this to investigate double check and potentially implement this on the nitro verifier as well
There was a problem hiding this comment.
Created PROTO-4887 — Multi-proof system: investigate and potentially extend NitroProofVerifier for production validity lane (state: Todo).
|
On it — creating the ticket now. |
|
Done! Created PROTO-4887 — Multi-proof system: investigate and potentially extend NitroProofVerifier for production validity lane — in the Protocol team (state: Todo), and replied on the PR thread. |
closes https://linear.app/worldcoin/issue/PROTO-4725/contracts-add-sp1-iworldchainproofverifier-impl
Note
Medium Risk
New on-chain proof verification on the validity lane is security-sensitive, but behavior is gated by immutables and extensive tests; defender submission encoding is not updated yet.
Overview
Adds an SP1 validity lane for the multi-proof dispute system by wiring in Succinct’s
sp1-contractsdependency and a newSP1ValidityVerifierthat implementsIWorldChainProofVerifier.The verifier decodes a fixed ABI proof tuple (domain/parent/intermediate roots, L1 origin,
AggregationOutputspublic values, and SP1 proof bytes), checks rollup config and range vkey commitments against immutables, derives the expectedrootIdviaWorldChainProofLib, then calls the SP1 gateway’sverifyProof. Invalid or malformed inputs returnfalse(try/catch around an internal decode path) so the game predicate is not reverted. Foundry tests cover constructor guards, happy path, decode/SP1 failures, and each binding gate.The defender’s
encode_proofis unchanged (still concatenates SP1 public values + proof); the TODO now documents the on-chain tuple and that real SP1 lane submission needs proposal context before enablement.Reviewed by Cursor Bugbot for commit 34dcec0. Configure here.