Skip to content

precompiles: Upgrade blst to v0.3.16#1534

Merged
chfast merged 1 commit into
masterfrom
blst
May 21, 2026
Merged

precompiles: Upgrade blst to v0.3.16#1534
chfast merged 1 commit into
masterfrom
blst

Conversation

@chfast

@chfast chfast commented May 20, 2026

Copy link
Copy Markdown
Member

BLST v0.3.16 now tolerates points-at-infinity in multi-scalar muls.

BLST v0.3.16 now tolerates points-at-infinity in multi-scalar muls.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the BLST dependency to v0.3.16 and adapts the BLS12-381 MSM precompile implementation to rely on BLST’s updated behavior (tolerating points-at-infinity in multi-scalar multiplication).

Changes:

  • Updated BLST ExternalProject download to v0.3.16 (URL + SHA256).
  • Removed explicit filtering of points-at-infinity in g1_msm() / g2_msm() and adjusted MSM calls to use npoints.
  • Added assertions around MSM input sizing/point counts.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/evmone_precompiles/bls.cpp Updates G1/G2 MSM logic to stop filtering infinity points and calls BLST Pippenger MSM with npoints.
cmake/blst.cmake Bumps BLST tarball URL and hash to v0.3.16.
Comments suppressed due to low confidence (1)

lib/evmone_precompiles/bls.cpp:250

  • Same as in g1_msm(): assert(size != 0) is debug-only, and in release builds size==0 leads to npoints==0 and a call to blst_p2s_mult_pippenger*() with 0 points (previously avoided). Please add an explicit npoints==0 handling path instead of relying on an assert, and keep behavior consistent for callers that may pass empty input.
[[nodiscard]] bool g2_msm(uint8_t _rx[128], uint8_t _ry[128], const uint8_t* _xycs, size_t size)
{
    constexpr auto SINGLE_ENTRY_SIZE = (128 * 2 + 32);
    assert(size != 0);
    assert(size % SINGLE_ENTRY_SIZE == 0);
    const auto npoints = size / SINGLE_ENTRY_SIZE;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +197 to 198
assert(size != 0);
assert(size % SINGLE_ENTRY_SIZE == 0);
@codecov

codecov Bot commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.71%. Comparing base (9101114) to head (bd845c1).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1534      +/-   ##
==========================================
- Coverage   96.71%   96.71%   -0.01%     
==========================================
  Files         160      160              
  Lines       14337    14327      -10     
  Branches     3367     3363       -4     
==========================================
- Hits        13866    13856      -10     
  Misses        332      332              
  Partials      139      139              
Flag Coverage Δ
eest-develop 91.96% <100.00%> (-0.02%) ⬇️
eest-develop-gmp 27.25% <100.00%> (-0.06%) ⬇️
eest-legacy 17.63% <0.00%> (+0.01%) ⬆️
eest-libsecp256k1 28.93% <100.00%> (-0.06%) ⬇️
eest-stable 91.88% <100.00%> (-0.02%) ⬇️
evmone-unittests 92.33% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
core 96.03% <100.00%> (-0.01%) ⬇️
tooling 84.52% <ø> (ø)
tests 99.79% <ø> (ø)
Files with missing lines Coverage Δ
lib/evmone_precompiles/bls.cpp 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chfast chfast merged commit 159bfc9 into master May 21, 2026
27 checks passed
@chfast chfast deleted the blst branch May 21, 2026 11:42
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