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

test(fw): add empty account tests #490

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Apr 1, 2024

🗒️ Description

Fixes empty accounts not being recognized as such because an explicit zero was set as the value to a key.

Edit(dan): The original intent of this PR was also fixed in #486 and this PR now only adds additional tests for empty accounts and one small refactor.

🔗 Related Issues

Fixes #475

✅ 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.

@marioevz marioevz added type:bug Something isn't working scope:fw Scope: Framework (evm|tools|forks|pytest) labels Apr 1, 2024
Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

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

Good catch!

Just a suggestion for readability and checking None storage values - added a few tests for that.

There's no changelog entry. I'd suggest that if we think it's not required, we should make a comment in the pr description next to the item in the todo list. I think it's borderline in this case 🙂

src/ethereum_test_tools/common/types.py Outdated Show resolved Hide resolved
src/ethereum_test_tools/tests/test_types.py Show resolved Hide resolved
Update src/ethereum_test_tools/tests/test_types.py

Co-authored-by: danceratopz <[email protected]>
@marioevz marioevz force-pushed the add-empty-account-test branch from d73d333 to 46566ac Compare April 9, 2024 16:49
Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

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

Thanks for rebasing! LGTM

@danceratopz danceratopz changed the title fix(fw): Explicit zero in storage definitions count as empty test(fw): add empty account tests Apr 10, 2024
@danceratopz danceratopz merged commit 2cd20f1 into ethereum:main Apr 10, 2024
5 checks passed
@marioevz marioevz deleted the add-empty-account-test branch April 10, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:fw Scope: Framework (evm|tools|forks|pytest) type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

still able to generate tests with empty storage records
2 participants