Skip to content

Comments

feat: bls precompile input size limits and specify acceleration#570

Merged
refcell merged 1 commit intoethereum-optimism:rf/eip-2537from
meyer9:meyer9/rf/2537
Feb 3, 2025
Merged

feat: bls precompile input size limits and specify acceleration#570
refcell merged 1 commit intoethereum-optimism:rf/eip-2537from
meyer9:meyer9/rf/2537

Conversation

@meyer9
Copy link
Contributor

@meyer9 meyer9 commented Feb 1, 2025

Add precompile limits and acceleration specification to Isthmus BLS precompile spec.

Calculation for Size Limits

  • G1 MSM:

    • (k * multiplication_cost * max_discount) // 1000 < 20000000
    • (k * 12000 * 519) // 1000 < 20000000
    • k < 3211.3, so k <= 3211
    • bytes = 160 * k
    • bytes <= 513760
  • G2 MSM:

    • (k * multiplication_cost * max_discount) // 1000 < 20000000
    • (k * 22500 * 524) // 1000 < 20000000
    • k < 1696.35, so k <= 1696
    • bytes = 288 * k
    • bytes <= 488448
  • Pairing check:

    • 32600 * k + 37700 < 20000000
    • k <= 612
    • bytes = 384 * k
    • bytes <= 235008

@refcell refcell merged commit 6fe5c4e into ethereum-optimism:rf/eip-2537 Feb 3, 2025
1 check passed
tynes pushed a commit that referenced this pull request Feb 3, 2025
* chore: eip-2537

* chore: eip-2537

* fix: doctoc

* fix: fill in todo

* feat: bls precompile input size limits and specify acceleration (#570)

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Co-authored-by: Julian Meyer <julianmeyer2000@gmail.com>
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