Skip to content

feat: add BN254 final exponentiation check with output#1209

Merged
ivokub merged 6 commits intomasterfrom
feat/bn254-is-finalexpcheck
Jul 23, 2024
Merged

feat: add BN254 final exponentiation check with output#1209
ivokub merged 6 commits intomasterfrom
feat/bn254-is-finalexpcheck

Conversation

@ivokub
Copy link
Copy Markdown
Collaborator

@ivokub ivokub commented Jul 18, 2024

Description

In some cases we are interested to obtain the value if the final exponentiation resulted in 1 or not instead of asserting. Refactor and add such method.

With this, also renamed FinalExpCheck to AssertFinalExpCheck to better distinguish different methods.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How has this been tested?

  • TestIsMillerLoopAndFinalExpCircuitTestSolve
  • TestMillerLoopAndMulTestSolve

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

@ivokub ivokub added the type: consolidate strengthen an existing feature label Jul 18, 2024
@ivokub ivokub self-assigned this Jul 18, 2024
@ivokub ivokub marked this pull request as ready for review July 23, 2024 09:45
Copy link
Copy Markdown
Contributor

@yelhousni yelhousni left a comment

Choose a reason for hiding this comment

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

LGTM! just made same renaming suggestions.

Comment thread std/algebra/emulated/sw_bn254/pairing.go Outdated
Comment thread std/algebra/emulated/sw_bn254/pairing.go Outdated
Comment thread std/algebra/emulated/sw_bn254/pairing.go Outdated
@ivokub
Copy link
Copy Markdown
Collaborator Author

ivokub commented Jul 23, 2024

Applied the review suggestions + added documentation for IsMillerLoopAndFinalExpOne. Will wait for CI before merge.

@ivokub ivokub merged commit a3d5433 into master Jul 23, 2024
@ivokub ivokub deleted the feat/bn254-is-finalexpcheck branch July 23, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: consolidate strengthen an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants