Skip to content

Conversation

Tabaie
Copy link
Contributor

@Tabaie Tabaie commented Aug 28, 2025

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 to false should this happen.
  • Debug methods SolveInTestEngine and Print are no longer available. This will not affect the Linea use case.

@Tabaie Tabaie requested a review from Copilot August 28, 2025 21:42
Copy link
Contributor

@Copilot Copilot AI left a 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.

cursor[bot]

This comment was marked as outdated.

@Tabaie Tabaie requested a review from ivokub August 28, 2025 21:55
cursor[bot]

This comment was marked as outdated.

@ivokub ivokub added the feat: gkr PRs related to GKR label Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: gkr PRs related to GKR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants