ethereum / evmone

Fast Ethereum Virtual Machine implementation
Apache License 2.0
865 stars 287 forks source link

baseline: Improve code analysis API #941

Closed chfast closed 2 months ago

chfast commented 5 months ago

Passing the evmc_revision to the code analysis is too fine-grained for this public API. On Ethereum Mainnet EOF can be always enabled, but the options is left for other chain configurations.

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 94.52055% with 4 lines in your changes missing coverage. Please review.

Project coverage is 93.89%. Comparing base (7a46e72) to head (6e2f5d9). Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
test/bench/helpers.hpp 0.00% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #941 +/- ## ======================================= Coverage 93.89% 93.89% ======================================= Files 146 147 +1 Lines 15487 15507 +20 ======================================= + Hits 14541 14561 +20 Misses 946 946 ``` | [Flag](https://app.codecov.io/gh/ethereum/evmone/pull/941/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/941/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `17.49% <58.90%> (-0.01%)` | :arrow_down: | | [ethereum_tests](https://app.codecov.io/gh/ethereum/evmone/pull/941/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `27.72% <39.72%> (-0.04%)` | :arrow_down: | | [ethereum_tests_silkpre](https://app.codecov.io/gh/ethereum/evmone/pull/941/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `19.42% <27.53%> (-0.03%)` | :arrow_down: | | [execution_spec_tests](https://app.codecov.io/gh/ethereum/evmone/pull/941/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `19.00% <30.13%> (-0.03%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/ethereum/evmone/pull/941/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `89.00% <94.52%> (+0.01%)` | :arrow_up: | 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/941?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/advanced\_analysis.hpp](https://app.codecov.io/gh/ethereum/evmone/pull/941?src=pr&el=tree&filepath=lib%2Fevmone%2Fadvanced_analysis.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-bGliL2V2bW9uZS9hZHZhbmNlZF9hbmFseXNpcy5ocHA=) | `96.00% <100.00%> (-0.16%)` | :arrow_down: | | [lib/evmone/advanced\_execution.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/941?src=pr&el=tree&filepath=lib%2Fevmone%2Fadvanced_execution.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-bGliL2V2bW9uZS9hZHZhbmNlZF9leGVjdXRpb24uY3Bw) | `100.00% <100.00%> (ø)` | | | [lib/evmone/baseline.hpp](https://app.codecov.io/gh/ethereum/evmone/pull/941?src=pr&el=tree&filepath=lib%2Fevmone%2Fbaseline.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-bGliL2V2bW9uZS9iYXNlbGluZS5ocHA=) | `100.00% <100.00%> (ø)` | | | [lib/evmone/baseline\_analysis.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/941?src=pr&el=tree&filepath=lib%2Fevmone%2Fbaseline_analysis.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-bGliL2V2bW9uZS9iYXNlbGluZV9hbmFseXNpcy5jcHA=) | `100.00% <100.00%> (ø)` | | | [lib/evmone/baseline\_execution.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/941?src=pr&el=tree&filepath=lib%2Fevmone%2Fbaseline_execution.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-bGliL2V2bW9uZS9iYXNlbGluZV9leGVjdXRpb24uY3Bw) | `100.00% <100.00%> (ø)` | | | [lib/evmone/execution\_state.hpp](https://app.codecov.io/gh/ethereum/evmone/pull/941?src=pr&el=tree&filepath=lib%2Fevmone%2Fexecution_state.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-bGliL2V2bW9uZS9leGVjdXRpb25fc3RhdGUuaHBw) | `94.33% <100.00%> (-0.49%)` | :arrow_down: | | [lib/evmone/instructions.hpp](https://app.codecov.io/gh/ethereum/evmone/pull/941?src=pr&el=tree&filepath=lib%2Fevmone%2Finstructions.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-bGliL2V2bW9uZS9pbnN0cnVjdGlvbnMuaHBw) | `100.00% <100.00%> (ø)` | | | [lib/evmone/instructions\_calls.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/941?src=pr&el=tree&filepath=lib%2Fevmone%2Finstructions_calls.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-bGliL2V2bW9uZS9pbnN0cnVjdGlvbnNfY2FsbHMuY3Bw) | `99.52% <100.00%> (ø)` | | | [test/unittests/baseline\_analysis\_test.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/941?src=pr&el=tree&filepath=test%2Funittests%2Fbaseline_analysis_test.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-dGVzdC91bml0dGVzdHMvYmFzZWxpbmVfYW5hbHlzaXNfdGVzdC5jcHA=) | `100.00% <100.00%> (ø)` | | | [test/unittests/execution\_state\_test.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/941?src=pr&el=tree&filepath=test%2Funittests%2Fexecution_state_test.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-dGVzdC91bml0dGVzdHMvZXhlY3V0aW9uX3N0YXRlX3Rlc3QuY3Bw) | `100.00% <100.00%> (ø)` | | | ... and [1 more](https://app.codecov.io/gh/ethereum/evmone/pull/941?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | |
chfast commented 4 months ago

Converted to draft, because I have better idea...

chfast commented 2 months ago

I changed the name for the "full unmodified code" to raw_code. Any better ideas?

pdobacz commented 2 months ago

I changed the name for the "full unmodified code" to raw_code. Any better ideas?

* `raw_code`

* `account_code`

* `original_code`

* `full_code`

* `container_code`

code_bytes or code_binary? All the _code versions imply it's code, while it is a something containing code. But raw_code was ok when I was reading through, I just needed a moment of hesitation and the presence of executable_code nearby. Maybe also just container or container_bytes/binary