Conversation
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>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Tabaie
added this pull request to stack #1869
October 6, 2026 05:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the GKR codebase, in particular gate testing infrastructure and code generation, so that they accommodate extension fields.
NOTE: Pinning an unmerged gnark-crypto. Only to be merged after that.
Note
High Risk
Changes Fiat–Shamir binding/challenge derivation and gate compilation over all GKR curves, which can alter proof transcripts and break compatibility with prior proofs if encodings differ.
Overview
This PR drops the implicit “everything is ℤ/pℤ” assumption in GKR by threading a
gkrcore.Fielddescription (prime field viaPrimeField, extensions via minimal polynomial) through gate compilation, gate metadata discovery (degree / solvable variable), circuit compile APIs, and test caches. Gate testing now runs over both BN254 and a sample extension field so metadata stays consistent outside prime fields.Fiat–Shamir is centralized: per-curve
transcriptcopies are removed in favor ofgkrcore.HashTranscript, which binds elements withMarshal()and derives challenges viaChallenge()(replacinggetChallenge/Bytes()). Prove/verify and sumcheck paths across curves are updated accordingly.Supporting cleanup includes renaming
internal/small_rational→internal/rational, exposingField/PrimeFieldongkrapi.Compile, updating codegen templates, refreshing GKR benchmarks to Poseidon2, tightening test-vector parsing (big.Rat,Marshalin fake hashes), fixing Groth16 test proof padding for empty commitments, and bumping gnark-crypto.Reviewed by Cursor Bugbot for commit 8f615fb. Bugbot is set up for automated code reviews on this repo. Configure here.