ethereum / evmone

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

test: Add tests for create collision with storage #969

Closed chfast closed 3 months ago

chfast commented 3 months ago

Add tests for EIP-7610 behavior: create address colliding with an account having non-empty storage should fail.

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 94.29%. Comparing base (bf6c91d) to head (fb42b74). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #969 +/- ## ======================================= Coverage 94.29% 94.29% ======================================= Files 143 143 Lines 16132 16145 +13 ======================================= + Hits 15211 15224 +13 Misses 921 921 ``` | [Flag](https://app.codecov.io/gh/ethereum/evmone/pull/969/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/969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `16.63% <0.00%> (-0.02%)` | :arrow_down: | | [ethereum_tests](https://app.codecov.io/gh/ethereum/evmone/pull/969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `26.90% <0.00%> (-0.03%)` | :arrow_down: | | [ethereum_tests_silkpre](https://app.codecov.io/gh/ethereum/evmone/pull/969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `18.67% <0.00%> (-0.02%)` | :arrow_down: | | [execution_spec_tests](https://app.codecov.io/gh/ethereum/evmone/pull/969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `17.71% <0.00%> (-0.02%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/ethereum/evmone/pull/969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `89.73% <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](https://app.codecov.io/gh/ethereum/evmone/pull/969?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | Coverage Δ | | |---|---|---| | [test/unittests/state\_transition\_create\_test.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/969?src=pr&el=tree&filepath=test%2Funittests%2Fstate_transition_create_test.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-dGVzdC91bml0dGVzdHMvc3RhdGVfdHJhbnNpdGlvbl9jcmVhdGVfdGVzdC5jcHA=) | `100.00% <100.00%> (ø)` | |
chfast commented 3 months ago

LGTM. 2 points:

* don't we prefer to rely on EEST for that?

* if not, then for completeness we should have a test for eof creation tx too?

ethereum/tests have this covered, I just need a local test because I plan to rework the feature. The EOF context: this is one of the 100s EVM features we may want to test from EOF.

chfast commented 3 months ago

LGTM. 2 points:

* don't we prefer to rely on EEST for that?

* if not, then for completeness we should have a test for eof creation tx too?

ethereum/tests have this covered, I just need a local test because I plan to rework the feature. The EOF context: this is one of the 100s EVM features we may want to test from EOF.