Skip to content

Conversation

@chfast chfast added precompiles Related to EVM precompiles Prague Changes for Prague upgrade labels Dec 20, 2024
@codecov
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.30%. Comparing base (7e658c9) to head (fcc69b6).
Report is 3 commits behind head on master.

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     
Flag Coverage Δ
eof_execution_spec_tests 18.62% <0.00%> (+0.01%) ⬆️
ethereum_tests 26.87% <0.00%> (+0.02%) ⬆️
ethereum_tests_silkpre 18.94% <0.00%> (+0.01%) ⬆️
execution_spec_tests 21.05% <94.59%> (+0.99%) ⬆️
unittests 89.06% <5.40%> (+0.07%) ⬆️

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

Files with missing lines Coverage Δ
test/state/precompiles.cpp 98.87% <100.00%> (+24.58%) ⬆️
test/unittests/state_precompiles_test.cpp 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@chfast chfast requested a review from rodiazet December 20, 2024 09:24
@chfast chfast force-pushed the precompiles/bls_updates branch from 9971bd0 to 6e214c6 Compare December 20, 2024 09:38
Copy link
Member

@rodiazet rodiazet left a 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.

static constexpr auto POINT_COSTS =
bls12_msm_discounts_to_point_costs(G1MUL_GAS_COST, DISCOUNTS);

if (input.empty() || input.size() % 160 != 0)
Copy link
Member

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

Copy link
Member Author

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,
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed.

@chfast chfast force-pushed the precompiles/bls_updates branch from 64d0901 to a7d3dcc Compare January 17, 2025 16:15
@chfast chfast changed the base branch from master to eip7623_calldata_cost January 17, 2025 16:16
@chfast chfast marked this pull request as ready for review January 17, 2025 16:37
@chfast chfast requested a review from gumb0 January 17, 2025 16:37
@chfast chfast force-pushed the precompiles/bls_updates branch from 86be2af to bf96564 Compare January 17, 2025 16:44
Base automatically changed from eip7623_calldata_cost to master January 20, 2025 14:47
@chfast chfast force-pushed the precompiles/bls_updates branch from bf96564 to b722957 Compare January 20, 2025 14:58
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.
@chfast chfast force-pushed the precompiles/bls_updates branch from b722957 to fcc69b6 Compare January 20, 2025 15:43
@chfast chfast merged commit 3fcb59d into master Jan 20, 2025
23 checks passed
@chfast chfast deleted the precompiles/bls_updates branch January 20, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Prague Changes for Prague upgrade precompiles Related to EVM precompiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants