Test EIP-7069 Address Space Extension implications#522
Test EIP-7069 Address Space Extension implications#522marioevz merged 18 commits intoethereum:mainfrom
Conversation
tests/prague/eip7676_address_space_extension/test_ase_opcodes.py
Outdated
Show resolved
Hide resolved
tests/prague/eip7676_address_space_extension/test_ase_opcodes.py
Outdated
Show resolved
Hide resolved
Validate ASE behaviors on legacy and EOF opcodes for ASE, when targeting EOAs, Contracts, and empty accounts. Opcodes are BALANCE, EXTCALL/CALL, EXTDELEGATECALL/DELEGATECALL, EXTSTATICCALL/STATICCALL, and CALLCODE. Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
EIP-7676 moved the critical EXTCALL sections into the main spec. EOF does not depend on a new BALANCE op, so don't test it. Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
marioevz
left a comment
There was a problem hiding this comment.
Just a comment about the pattern used to write these tests.
tests/prague/eip7692_eof_v1/eip7676_address_space_extension/test_ase_opcodes.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
|
Since 7979 is out of scope for EOFv1 I migrated this into a 7069 test that only tests the ASE aspects. |
marioevz
left a comment
There was a problem hiding this comment.
It looks really good overall, but one change I would probably do is:
Instead of doing all types of calls in a single shot, maybe we could simply parameterize for each call opcode.
Reason being that, running the tests like this makes it difficult to single out the failing ones to a single opcode with an incorrect behavior, but if it was parameterized, it would be very easy to do this, even if it comes at the cost of having to run more tests.
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Show resolved
Hide resolved
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
* Apply specific edits * Parameterize by opcode as well Signed-off-by: Danno Ferrin <danno@numisight.com>
|
Refactored so it's parameterized on opcode. However the logic to determine the "correct" output is still in place. The other alternative is 7 slightly different versions of the test and parameters, dropping most if the conditional building. |
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
|
One last comment I forgot in the review (sorry), I think variables with the addresses could be renamed like this: Because, currently, there is |
Remove RETURNDATALOAD from ASE tests, to be moved to a different test Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
marioevz
left a comment
There was a problem hiding this comment.
Some more comments after another review pass.
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Show resolved
Hide resolved
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Show resolved
Hide resolved
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
…ereum#522) * Validate EIP-7676 Prepare for Address Space Extension Validate ASE behaviors on legacy and EOF opcodes for ASE, when targeting EOAs, Contracts, and empty accounts. Opcodes are BALANCE, EXTCALL/CALL, EXTDELEGATECALL/DELEGATECALL, EXTSTATICCALL/STATICCALL, and CALLCODE. Signed-off-by: Danno Ferrin <danno@numisight.com> * Reviewer requested changes Signed-off-by: Danno Ferrin <danno@numisight.com> * formatting Signed-off-by: Danno Ferrin <danno@numisight.com> * speling Signed-off-by: Danno Ferrin <danno@numisight.com> * comment out balance from ASE checks EIP-7676 moved the critical EXTCALL sections into the main spec. EOF does not depend on a new BALANCE op, so don't test it. Signed-off-by: Danno Ferrin <danno@numisight.com> * move to new subfolder Signed-off-by: Danno Ferrin <danno@numisight.com> * Recast as EIP-7069 test Signed-off-by: Danno Ferrin <danno@numisight.com> * use itertools.count instead of hard coded address Signed-off-by: Danno Ferrin <danno@numisight.com> * Review changes * Apply specific edits * Parameterize by opcode as well Signed-off-by: Danno Ferrin <danno@numisight.com> * tox fixes Signed-off-by: Danno Ferrin <danno@numisight.com> * remove RETURNDATALOAD from ASE tests Remove RETURNDATALOAD from ASE tests, to be moved to a different test Signed-off-by: Danno Ferrin <danno@numisight.com> * reviewer comments Signed-off-by: Danno Ferrin <danno@numisight.com> * Reviewer comments Signed-off-by: Danno Ferrin <danno@numisight.com> * extreneous changes Signed-off-by: Danno Ferrin <danno@numisight.com> --------- Signed-off-by: Danno Ferrin <danno@numisight.com>
🗒️ Description
Validate ASE behaviors on legacy and EOF opcodes for ASE, when targeting
EOAs, Contracts, and empty accounts. Opcodes are EXTCALL/CALL,
EXTDELEGATECALL/DELEGATECALL, EXTSTATICCALL/STATICCALL, and CALLCODE.
🔗 Related Issues
✅ Checklist
mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.