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

Set PairingOutput::default() = TargetField::one() #694

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

rozbb
Copy link
Contributor

@rozbb rozbb commented Oct 27, 2023

Previously, PairingOutput<P>::default() was set to P::TargetField::zero(). This is clearly incorrect, since 0 is not in the multiplicative subgroup that PairingOutput represents. This concretely lead to an unexpected error in arkworks-rs/ripp#50.

This PR sets the default value to P::TargetField::one(). I don't think you have to treat this as a breaking change. It is very unlikely that someone was using this behavior successfully, since if you multiply (Add) this value with any other PairingOutput, you get 0.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (master)
  • Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the GitHub PR explorer

@rozbb rozbb requested review from a team as code owners October 27, 2023 06:52
@rozbb rozbb requested review from z-tech, mmagician and weikengchen and removed request for a team October 27, 2023 06:52
@Pratyush Pratyush merged commit 3082750 into arkworks-rs:master Oct 27, 2023
15 checks passed
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