Skip to content
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

new(test): EIP-7702 + EIP-1153: test that TransientStorage stays at correct address #799

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

jochem-brouwer
Copy link
Member

@jochem-brouwer jochem-brouwer commented Sep 13, 2024

🗒️ Description

This PR tests interaction between EIP-7702 (Set EOA account code) and EIP-1153 (transient storage).

Diagram zonder titel drawio

The call chain contract will call into the EOA, which will then SSTORE in slot 1 the TLOADed value of transient slot 2, and then TSTORE the value 3 in transient slot 2. Then, it will return to the call chain contract and it will now call into the account which the EOA is delegated to and thus re-run the same code. The transient storage should be empty, thus the storage should stay empty.

This is parametrized by:

  • It will perform both CALL and STATICCALL from the chain call contract EDIT: I should remove STATICCALL since we cannot SSTORE
  • The contract which is called first (EOA or the code contract) is also switched

TODO: cleanup

🔗 Related Issues

None

✅ 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: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
  • 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.

@jochem-brouwer jochem-brouwer force-pushed the eip7702-tstore-stays-on-eoa branch from f519b89 to afc2c2e Compare September 13, 2024 19:20
@jochem-brouwer jochem-brouwer force-pushed the eip7702-tstore-stays-on-eoa branch from afc2c2e to 92cbfe2 Compare September 13, 2024 19:30
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.

Thanks! Some suggestions.

tests/prague/eip7702_set_code_tx/test_set_code_txs.py Outdated Show resolved Hide resolved
tests/prague/eip7702_set_code_tx/test_set_code_txs.py Outdated Show resolved Hide resolved
@jochem-brouwer jochem-brouwer force-pushed the eip7702-tstore-stays-on-eoa branch from 5ea8ace to 0b752fc Compare September 15, 2024 19:09
@jochem-brouwer jochem-brouwer marked this pull request as ready for review September 18, 2024 15:37
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.

Awesome, thanks!

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.

2 participants