Skip to content

Use direct blst Pippenger for BLS MSM#3764

Open
decofe wants to merge 1 commit into
mainfrom
dan/direct-blst-pippenger-g1msm
Open

Use direct blst Pippenger for BLS MSM#3764
decofe wants to merge 1 commit into
mainfrom
dan/direct-blst-pippenger-g1msm

Conversation

@decofe

@decofe decofe commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace blst's Rust MultiPoint::mult wrapper with direct blst_p1s/blst_p2s_mult_pippenger calls for BLS12-381 MSM
  • keep the existing single-point scalar multiplication fast path
  • allocate scratch with blst's scratch sizing helpers and pass null-terminated pointer batches expected by the C API

Tests

  • cargo fmt -p revm-precompile
  • cargo test -p revm-precompile bls12_381 --features blst
  • cargo test -p revm-precompile --features blst
  • cargo bench -p revm-precompile --features blst --bench bench --no-run

Prompted by: @Rjected

@Rjected
Rjected marked this pull request as ready for review June 17, 2026 13:47
@Rjected

Rjected commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

only marking ready to see if codspeed runs

@codspeed-hq

codspeed-hq Bot commented Jun 17, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 179 untouched benchmarks
⏩ 1 skipped benchmark1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation g2_msm (size 2) 2.7 ms 2.8 ms -5.37%
Simulation g1_msm (size 2) 1.4 ms 1.3 ms +7.15%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing dan/direct-blst-pippenger-g1msm (af36d41) with main (b31a3d5)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

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