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

feat constant 'randomness' - domain-size-independent vk #1269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tabaie
Copy link
Contributor

@Tabaie Tabaie commented Sep 4, 2024

This PR fixes (i.e. always the same value) the randomness used in unsafe KZG SRS production. This results in getting the same SRS for a given domain every time, and even the same verifying key for different domain sizes over the same curve.
The intended application of this are tests involving batch verification of commitments - for example when verifying multiple PlonK proofs.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

@Tabaie Tabaie requested a review from gbotrel September 4, 2024 18:49
@ivokub ivokub changed the title feat constant "randomness" - domain-size-independent vk feat constant 'randomness' - domain-size-independent vk Sep 5, 2024
@ivokub
Copy link
Collaborator

ivokub commented Sep 5, 2024

I would instead use an option for this a la WithAlpha etc. and keep the default behaviour to be randomized. I think if we by default use fixed alpha then it may obscure some other errors (e.g. some deserialized values are static when they are not supposed to be).

@gbotrel
Copy link
Collaborator

gbotrel commented Sep 5, 2024

+1 with @ivokub suggestion, just also on the off chance that some cavalier users, by mistake, do use this SRS in prod.

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.

3 participants