ethereum / evmone

Fast Ethereum Virtual Machine implementation
Apache License 2.0
864 stars 286 forks source link

precompiles: Implement EIP-2537's `bls12_g1add` #982

Closed rodiazet closed 2 months ago

rodiazet commented 3 months ago

Implementation of the bls12_g1add precompile: E1 affine points' addition from BLS12-381 curve according to the EIP-2537 spec https://eips.ethereum.org/EIPS/eip-2537#abi-for-g1-addition.

Depends on https://github.com/ethereum/evmone/pull/984

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.13%. Comparing base (07d2f7a) to head (2ca9a94). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #982 +/- ## ========================================== + Coverage 94.08% 94.13% +0.04% ========================================== Files 144 146 +2 Lines 16203 16259 +56 ========================================== + Hits 15245 15305 +60 + Misses 958 954 -4 ``` | [Flag](https://app.codecov.io/gh/ethereum/evmone/pull/982/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | Coverage Δ | | |---|---|---| | [eof_execution_spec_tests](https://app.codecov.io/gh/ethereum/evmone/pull/982/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `16.60% <0.00%> (-0.06%)` | :arrow_down: | | [ethereum_tests](https://app.codecov.io/gh/ethereum/evmone/pull/982/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `26.46% <0.00%> (-0.10%)` | :arrow_down: | | [ethereum_tests_silkpre](https://app.codecov.io/gh/ethereum/evmone/pull/982/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `18.55% <0.00%> (-0.07%)` | :arrow_down: | | [execution_spec_tests](https://app.codecov.io/gh/ethereum/evmone/pull/982/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `17.90% <61.01%> (+0.17%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/ethereum/evmone/pull/982/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `89.53% <83.05%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/ethereum/evmone/pull/982?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | Coverage Δ | | |---|---|---| | [lib/evmone\_precompiles/bls.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/982?src=pr&el=tree&filepath=lib%2Fevmone_precompiles%2Fbls.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-bGliL2V2bW9uZV9wcmVjb21waWxlcy9ibHMuY3Bw) | `100.00% <100.00%> (ø)` | | | [test/state/precompiles.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/982?src=pr&el=tree&filepath=test%2Fstate%2Fprecompiles.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-dGVzdC9zdGF0ZS9wcmVjb21waWxlcy5jcHA=) | `84.97% <100.00%> (+2.28%)` | :arrow_up: | | [test/unittests/precompiles\_bls\_test.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/982?src=pr&el=tree&filepath=test%2Funittests%2Fprecompiles_bls_test.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-dGVzdC91bml0dGVzdHMvcHJlY29tcGlsZXNfYmxzX3Rlc3QuY3Bw) | `100.00% <100.00%> (ø)` | |