Skip to content
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

Refactor: re-introduce points in KZG verification key #469

Merged
merged 1 commit into from
Nov 17, 2023
Merged

Conversation

yelhousni
Copy link
Collaborator

@yelhousni yelhousni commented Nov 16, 2023

Description

Re-introducing points G1, G2 and [α]G2 in KZG verification key after #466. This is needed in the Solidity Plonk verifier in gnark. My initial thought was to hardcode the values of the points' coordinates in solidity instead of calling the KZG package, but apparently (cc @ThomasPiellard) Linea (and Aztec) use a different G1 point than (1,2) for BN254. We should also then use ScalarMultiplication(x, G1) instead of ScalarMultiplicationBase(x). Anyway it should be flexible for users now.

Type of change

  • Bug fix (non-breaking change which fixes an issue on gnark side)

How has this been tested?

Same current tests.

How has this been benchmarked?

NA

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link
Collaborator

@ivokub ivokub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yelhousni yelhousni merged commit e773088 into master Nov 17, 2023
@yelhousni yelhousni deleted the kzg/srs-vk branch November 17, 2023 16:51
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.

2 participants