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>
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
Medium Risk
Changes Fiat–Shamir binding encoding (Marshal vs Bytes) and gate compilation metadata logic, which are security-sensitive for proof soundness; scope is broad across curves but heavily covered by existing GKR/sumcheck tests.
Overview
GKR is refactored so compilation, gate metadata, and Fiat–Shamir transcripts are not tied to prime fields only, paving the way for extension-field circuits.
Field model:
CompileGateFunction,RawCircuit.Compile, gate registry, andgkrapi.API.Compilenow takegkrcore.Field(withPrimeField(p)for F_p) instead of*big.Int. Gate degree/solvability testing runs over F_p[X]/(f) via an expandedgateTester, not plain mod-p arithmetic.Transcript: Per-curve duplicate
transcripttypes are removed; all curve GKR packages usegkrcore.NewHashTranscriptwithChallenge()/Bind()and elementMarshal()(replacingBytes()andgetChallenge).resources.transcriptis a pointer passed through prove/verify andBindGkrFinalEvalProof.Codegen & tests: Generator templates and test-vector tooling switch
small_rational→rational, unifysetElementviabig.Rat, and align fake-hash block sizing withMarshal. Benchmarks use Poseidon2;gkrtesting.NewCachetakes aField.gnark-cryptois bumped (PR note: depends on unmerged crypto).Reviewed by Cursor Bugbot for commit f4cdc80. Bugbot is set up for automated code reviews on this repo. Configure here.