-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test EIP-7069 Address Space Extension implications #522
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 <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
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 <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Since 7979 is out of scope for EOFv1 I migrated this into a 7069 test that only tests the ASE aspects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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
* Apply specific edits * Parameterize by opcode as well Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, thanks!
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 <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
tests/prague/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
🗒️ 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 serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.