-
Notifications
You must be signed in to change notification settings - Fork 483
refactor: GKR v1 #1589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/gkr/add-instance
Are you sure you want to change the base?
refactor: GKR v1 #1589
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This is a major refactor that introduces GKR v2 API while maintaining backward compatibility through a new v1 API that wraps v2. The changes primarily reorganize the GKR interface from gnark v0.14.0, update import paths throughout the codebase, and implement additional security validations for signature verification.
- Introduces new
std/gkrapi/v2
module with updated compilation interface that uses functional options - Creates
std/gkrapi/v1
as a compatibility layer wrapping the v2 API - Updates signature verification to add range checks for EdDSA and ECDSA signatures
- Reorganizes internal imports and fixes various code quality issues
Reviewed Changes
Copilot reviewed 99 out of 101 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
std/gkrapi/v2/* | New v2 API with functional options pattern for compilation |
std/gkrapi/v1/* | Backward compatibility layer wrapping v2 API |
std/signature/eddsa/eddsa.go | Adds signature range validation for EdDSA |
std/signature/ecdsa/ecdsa.go | Adds signature range validation for ECDSA |
test/engine.go | Refactors boolean validation logic |
internal/gkr/* | Updates import paths to use v2 API |
Multiple algebra files | Standardizes variable naming (c->pr, P->p) |
Comments suppressed due to low confidence (1)
std/gkrapi/v2/compile.go:1
- [nitpick] The new functional options pattern for compilation requires more verbose syntax. Consider if a default hash name could be provided to reduce boilerplate in common cases.
package gkrapi
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…into refactor/gkr/v1
Mostly reintroduces the GKR interface from gnark v0.14.0.
Remaining breaking changes:
gkrgates.Register
will not replace an already registered gate of the same name. An extra boolean return argument is set tofalse
should this happen.SolveInTestEngine
andPrint
are no longer available. This will not affect the Linea use case.