-
Notifications
You must be signed in to change notification settings - Fork 74
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(tests): TSTORE: ensure transient storage is cleared after transactions #798
Merged
marioevz
merged 6 commits into
ethereum:main
from
jochem-brouwer:tstore_clear_storage_between_txs
Sep 18, 2024
Merged
new(tests): TSTORE: ensure transient storage is cleared after transactions #798
marioevz
merged 6 commits into
ethereum:main
from
jochem-brouwer:tstore_clear_storage_between_txs
Sep 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jochem-brouwer
changed the title
new(tests): TSTORE: ensure transient storage is cleared after transac…
new(tests): TSTORE: ensure transient storage is cleared after transactions
Sep 13, 2024
jochem-brouwer
force-pushed
the
tstore_clear_storage_between_txs
branch
from
September 13, 2024 19:35
f44bf6a
to
2da3856
Compare
marioevz
reviewed
Sep 13, 2024
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.
Looks good! Just one comment, thanks!
jochem-brouwer
force-pushed
the
tstore_clear_storage_between_txs
branch
from
September 15, 2024 19:12
12ca3d3
to
7447330
Compare
holgerd77
reviewed
Sep 17, 2024
holgerd77
reviewed
Sep 17, 2024
…rage_between_txs/mypy-tweaks chore: fix mypy tox errors
marioevz
approved these changes
Sep 18, 2024
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, thanks!
jochem-brouwer
force-pushed
the
tstore_clear_storage_between_txs
branch
from
September 18, 2024 22:17
af9c7df
to
48e070a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🗒️ Description
This PR introduces 2 tests, which test that the transient storage is cleared after transactions. EthereumJS did clear storage after "normal" transactions, but did not clear the transient storage after a transaction created a contract. If the deployed contract address was then called, then the transient storage was not empty. See: ethereumjs/ethereumjs-monorepo#3625. This was not caught by these tests, so I have added two tests, one which does the create-tx and then call-contract, and the other calls the same contract twice.
The tests are very repetitive, so I would love some suggestions how to make those more compact (we could also move these two tests into one single test, where we use 3 transactions instead of two, writing to different storage slots and different transient storage slots).
The good/bad cases of these tests have been tested using EthereumJS (with and without the bug) using our new t8ntool 😄
🔗 Related Issues
Test produced by a bug in EthereumJS: ethereumjs/ethereumjs-monorepo#3625
✅ Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.