ethereum / evmone

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

test: Ensure exported state tests have all fields #993

Closed pdobacz closed 2 months ago

pdobacz commented 2 months ago

I was wrong when I said that the format inconsistency had a test which we can make pass by amending the exported format - there were no exclusions which my fix would fix. So to have some testing mechanism of correctness, we can maybe add an assertion in statetest_loader like this? I don't want to overdo it and this seems safe to do.

I guess we can also leave it without the assertion.

I don't know yet about the other format inconsistencies found, so I might add more commits here

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 93.84%. Comparing base (ad04d4e) to head (68da00b). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #993 +/- ## ======================================= Coverage 93.84% 93.84% ======================================= Files 146 146 Lines 15456 15460 +4 ======================================= + Hits 14505 14509 +4 Misses 951 951 ``` | [Flag](https://app.codecov.io/gh/ethereum/evmone/pull/993/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/993/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `17.42% <20.00%> (+<0.01%)` | :arrow_up: | | [ethereum_tests](https://app.codecov.io/gh/ethereum/evmone/pull/993/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `27.81% <20.00%> (-0.01%)` | :arrow_down: | | [ethereum_tests_silkpre](https://app.codecov.io/gh/ethereum/evmone/pull/993/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `19.48% <20.00%> (+<0.01%)` | :arrow_up: | | [execution_spec_tests](https://app.codecov.io/gh/ethereum/evmone/pull/993/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `18.93% <20.00%> (+<0.01%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/ethereum/evmone/pull/993/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `89.01% <100.00%> (+<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/993?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | Coverage Δ | | |---|---|---| | [test/statetest/statetest\_export.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/993?src=pr&el=tree&filepath=test%2Fstatetest%2Fstatetest_export.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-dGVzdC9zdGF0ZXRlc3Qvc3RhdGV0ZXN0X2V4cG9ydC5jcHA=) | `100.00% <100.00%> (ø)` | | | [test/statetest/statetest\_loader.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/993?src=pr&el=tree&filepath=test%2Fstatetest%2Fstatetest_loader.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-dGVzdC9zdGF0ZXRlc3Qvc3RhdGV0ZXN0X2xvYWRlci5jcHA=) | `96.83% <100.00%> (+0.01%)` | :arrow_up: | | [test/unittests/state\_transition.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/993?src=pr&el=tree&filepath=test%2Funittests%2Fstate_transition.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-dGVzdC91bml0dGVzdHMvc3RhdGVfdHJhbnNpdGlvbi5jcHA=) | `97.58% <100.00%> (+0.05%)` | :arrow_up: |
pdobacz commented 2 months ago

@chfast Hey I think I figured out that it is ok to add accessLists and currentRandom like that (see the recent commit). Both were reported missing by EELS team, PTAL