Skip to content

Test EIP-7069 Address Space Extension implications#522

Merged
marioevz merged 18 commits intoethereum:mainfrom
shemnon:eof/ase
Jun 6, 2024
Merged

Test EIP-7069 Address Space Extension implications#522
marioevz merged 18 commits intoethereum:mainfrom
shemnon:eof/ase

Conversation

@shemnon
Copy link
Collaborator

@shemnon shemnon commented Apr 23, 2024

🗒️ 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

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

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>
shemnon added 3 commits April 24, 2024 13:20
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
@shemnon shemnon marked this pull request as ready for review May 9, 2024 19:32
shemnon added 3 commits May 13, 2024 12:44
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>
Copy link
Member

@marioevz marioevz left a 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.

Signed-off-by: Danno Ferrin <danno@numisight.com>
@shemnon shemnon changed the title Validate EIP-7676 Prepare for Address Space Extension Test EIP-7069 Address Space Extension implications May 23, 2024
Signed-off-by: Danno Ferrin <danno@numisight.com>
@shemnon
Copy link
Collaborator Author

shemnon commented May 23, 2024

Since 7979 is out of scope for EOFv1 I migrated this into a 7069 test that only tests the ASE aspects.

Copy link
Member

@marioevz marioevz left a 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.

shemnon added 3 commits May 28, 2024 16:43
* Apply specific edits
* Parameterize by opcode as well

Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
@shemnon
Copy link
Collaborator Author

shemnon commented May 28, 2024

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.

Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments, thanks!

@marioevz
Copy link
Member

marioevz commented Jun 3, 2024

One last comment I forgot in the review (sorry), I think variables with the addresses could be renamed like this:
address_caller -> address_entry_point
address_target -> address_caller

Because, currently, there is target_address but it does not match what is being placed in the pre-alloc IMO.

shemnon added 3 commits June 4, 2024 14:32
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>
Copy link
Member

@marioevz marioevz left a 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.

shemnon added 3 commits June 6, 2024 12:38
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
@marioevz marioevz dismissed winsvega’s stale review June 6, 2024 23:15

All changes have been addressed.

Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@marioevz marioevz merged commit 53fc6d8 into ethereum:main Jun 6, 2024
kclowes pushed a commit to kclowes/execution-spec-tests that referenced this pull request Oct 20, 2025
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants