Skip to content

feat(prover-ray): Recursive GKR verifier - #4415

Open
Tabaie wants to merge 7 commits into
mainfrom
feat/gkr/rayver
Open

Tabaie wants to merge 7 commits into
mainfrom
feat/gkr/rayver

Conversation

@Tabaie

@Tabaie Tabaie commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Depending on Consensys-Incorporated/gnark#1913, this PR implements a GKR verifier in Prover-Ray.

route module rows used height width (committed) cells constraints (max degree) lookups per row
AIR P2 core $2^{20}$ $2^{20}$ $158$ ($134$ witness) 165.7M $117$ ($3$) 1 write
GKR table $T$, $E$, sum $2^{20}$ $2^{20}$ $49 = 25 + 6 + 18$ 51.4M $n + 1 = 21$ ($2$), plus sum target of the lookups
GKR proof $104n + 836 = 2916$ $2^{12}$ $19$ 0.08M $0$ 1 write
GKR transcript $84n + 617 = 2297$ $2^{12}$ $73$ 0.30M $36$ ($2$) 2 reads, 1 table lookup, 1 write
GKR gates $1528$ $2^{11}$ $61$ 0.12M $6$ ($3$) 3 reads, 1 write
GKR folds $695$ $2^{10}$ $92$ 0.09M $24$ ($3$) 4 reads, 2 writes
GKR eqs $\lceil n/3 \rceil \cdot 256 = 1792$ $2^{11}$ $109$ 0.22M $54$ ($4$) 6 reads, 1 write
GKR rounds $28n = 560$ $2^{10}$ $114$ 0.12M $66$ ($2$) 8 reads
GKR inputs $n + 25 = 45$ $2^{6}$ $31$ 0.002M $6$ ($2$) 1 read, 1 write
GKR verifier's own compressions $2297$ rows in next layer's $T$ $49$ 0.11M — —
AIR total 165.7M
GKR total 52.4M

$n = 20$: $2^{20}$ compressions per layer, the realistic size for 2-to-1. Width: committed base columns per row, an extension column counting $6$, including the compiler's running sums and quotient shares. Constraints: base-field constraints declared in the code, each holding on every row, not counting the compiler's lookup constraints. The $49$ cells per row of $T$, $E$ and the sum are from the R5 measurement; the rest from this PR. The GKR total is $51.4\mathrm{M} + 0.94\mathrm{M}$ (verifier) $+ 0.11\mathrm{M}$ (its own compressions) $= 52.4\mathrm{M}$. The hashing-chain logic (md chip), needed by both routes alike, is left out of both.


Note

High Risk
Touches core proof verification: a flaw in the new GKR constraints or dependency mismatch could break soundness of recursive proofs.

Overview
Introduces gkrverifier, which turns a gnark KoalaBear E₆ GKR circuit plus schedule into wiop modules (proof, transcript with Poseidon2 lookups, gate lowering, fold/eq/round sumcheck rows, and claim inputs) wired through a shared value bus, including Define, Assign, and Compressions helpers.

Adds layout/evaluation logic mirroring gnark’s verifier (transcript replay, gate bytecode lowering, sumcheck folding) and heavy regression tests (Poseidon2 proofs, synthetic circuits, corrupted-witness cases, input validation).

Bumps gnark/gnark-crypto (and related golang.org/x/*) in prover-ray and arithmetization to the commits required by the new APIs.

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

Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>

This branch has not been deployed

No deployments
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.

1 participant