-
Notifications
You must be signed in to change notification settings - Fork 333
Updates to BLS precompiles (EIP-2537) #1089
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1089 +/- ##
==========================================
+ Coverage 93.84% 94.30% +0.45%
==========================================
Files 159 159
Lines 17330 17316 -14
==========================================
+ Hits 16263 16329 +66
+ Misses 1067 987 -80
Flags with carried forward coverage won't be shown. Click here to find out more.
|
9971bd0 to
6e214c6
Compare
rodiazet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's OK in general. A few nits to be fixed.
test/state/precompiles.cpp
Outdated
| static constexpr auto POINT_COSTS = | ||
| bls12_msm_discounts_to_point_costs(G1MUL_GAS_COST, DISCOUNTS); | ||
|
|
||
| if (input.empty() || input.size() % 160 != 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we define single input size and use ut here and below? Same for G2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I defined constants for sizes, but not used it &input[64]... I think the input handling may need separate improvement.
| return {EVMC_SUCCESS, 128}; | ||
| } | ||
|
|
||
| ExecutionResult bls12_g1mul_execute(const uint8_t* input, size_t input_size, uint8_t* output, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove also their analysis counterparts for g1 and g2. Here and from the header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
64d0901 to
a7d3dcc
Compare
86be2af to
bf96564
Compare
bf96564 to
b722957
Compare
This updates the gas costs of BLS precompiles. Discounts tables for MSMs are now split between G1 and G2 variants.
Remove redundant G1/G2 MUL precompiles easily replaceable with MSMs. Spec update: ethereum/EIPs#8945.
b722957 to
fcc69b6
Compare
Apply recent EIP-2537 spec updates: