Conversation
BLST v0.3.16 now tolerates points-at-infinity in multi-scalar muls.
There was a problem hiding this comment.
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 usenpoints. - 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 buildssize==0leads tonpoints==0and a call toblst_p2s_mult_pippenger*()with 0 points (previously avoided). Please add an explicitnpoints==0handling 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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BLST v0.3.16 now tolerates points-at-infinity in multi-scalar muls.