ethereum / evmone

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

precompiles: Implement BLS pairing check #1016

Closed rodiazet closed 2 months ago

rodiazet commented 2 months ago

Implementation of the bls12_pairing_check precompile: According to spec https://eips.ethereum.org/EIPS/eip-2537#abi-for-pairing-check

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

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 98.03922% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.18%. Comparing base (f007e7c) to head (7603add). Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
test/state/precompiles.cpp 92.85% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1016 +/- ## ========================================== + Coverage 94.15% 94.18% +0.03% ========================================== Files 147 147 Lines 15796 15843 +47 ========================================== + Hits 14872 14922 +50 + Misses 924 921 -3 ``` | [Flag](https://app.codecov.io/gh/ethereum/evmone/pull/1016/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/1016/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `17.26% <0.00%> (-0.06%)` | :arrow_down: | | [ethereum_tests](https://app.codecov.io/gh/ethereum/evmone/pull/1016/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `27.28% <0.00%> (-0.09%)` | :arrow_down: | | [ethereum_tests_silkpre](https://app.codecov.io/gh/ethereum/evmone/pull/1016/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `19.15% <0.00%> (-0.06%)` | :arrow_down: | | [execution_spec_tests](https://app.codecov.io/gh/ethereum/evmone/pull/1016/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `20.34% <88.23%> (+0.22%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/ethereum/evmone/pull/1016/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `88.76% <62.74%> (-0.07%)` | :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/1016?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/1016?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/unittests/precompiles\_bls\_test.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/1016?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%> (ø)` | | | [test/state/precompiles.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/1016?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=) | `98.87% <92.85%> (+1.21%)` | :arrow_up: |