Skip to content

EIP 2537 - Precompile for BLS12-381 curve operations #2759

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

Merged
merged 6 commits into from
May 11, 2025

Conversation

anvacaru
Copy link
Contributor

@anvacaru anvacaru commented May 8, 2025

Overview

  • Adds seven new BLS12 precompiled contracts (addresses 11-17) for the Prague fork
  • Extends precompiled contract upper bound from 10 to 17

New Precompiled Contracts

  • BLS12_G1ADD: Point addition in G1 (curve over base field)

  • BLS12_G1MSM: Multi-scalar-multiplication in G1

  • BLS12_G2ADD: Point addition in G2 (curve over quadratic extension)

  • BLS12_G2MSM: Multi-scalar-multiplication in G2

  • BLS12_PAIRING_CHECK: Pairing operations between G1 and G2 points

  • BLS12_MAP_FP_TO_G1: Maps base field element to G1 point

  • BLS12_MAP_FP2_TO_G2: Maps extension field element to G2 point

  • Adds utility functions for BLS12 curve operations

  • Implements validation logic for coordinates, scalars, and curve points

  • Defines error handling for invalid inputs

Gas costs

  • G1 operations: add (375), mul (12000)
  • G2 operations: add (600), mul (22500)
  • Mapping: Fp→G1 (5500), Fp2→G2 (23800)
  • Pairing: base (37700) + per pair (32600)
  • MSM operations include discount tables based on batch size

anvacaru and others added 4 commits May 9, 2025 17:11
* update blob throughput values

* update execution-spec-tests/failing.llvm

* update execution-spec-tests/failing.llvm
…g round (#2760)

adding funding.json to qualify evm-semantics for optimism retrofunding round
Copy link
Collaborator

@Robertorosmaninho Robertorosmaninho left a comment

Choose a reason for hiding this comment

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

LGTM!

@automergerpr-permission-manager automergerpr-permission-manager bot merged commit 7fb1f9a into master May 11, 2025
12 checks passed
@automergerpr-permission-manager automergerpr-permission-manager bot deleted the eip-2537 branch May 11, 2025 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants