Skip to content

Conversation

@yelhousni
Copy link
Contributor

Description

Similar to #1312 and #1339 but for BLS12-381.

Type of change

  • New feature (non-breaking change which adds functionality)

How has this been tested?

  • New tests corresponding to new methods.
  • PairingCheck and FinalExpCheck tests against gnark-crypto.

How has this been benchmarked?

size-2 pairing check circuit, i.e. e(a,b)e(c,d)==1, in a BN254-PLONK:

  • old: 4,586,709 scs
  • new: 2,686,878 scs
    - diff: 1,899,831 scs

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

@yelhousni yelhousni requested a review from ivokub December 13, 2024 19:47
@yelhousni yelhousni self-assigned this Dec 13, 2024
@yelhousni yelhousni added type: consolidate strengthen an existing feature type: perf labels Dec 13, 2024
@yelhousni yelhousni changed the title feat(bls12-381): pairing using direct Fp12 + non-native `Eval() feat(bls12-381): pairing using direct Fp12 + non-native Eval() Dec 13, 2024
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.

Looks perfect! Only a small comment about a duplicate code and potential refactor, but I think we can keep the refactor in a separate PR. And imo it is only small thing, dunno if it is worth it.

@yelhousni yelhousni merged commit 148d5ec into master Dec 14, 2024
5 checks passed
@yelhousni yelhousni deleted the perf/bls12381-eval-pair branch December 14, 2024 16:04
@yelhousni yelhousni mentioned this pull request Dec 16, 2024
9 tasks
lucasmenendez pushed a commit to lucasmenendez/gnark that referenced this pull request Jan 31, 2025
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 type: perf

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants