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

feat(base_types): storage key hint in Storage class #917

Merged
merged 2 commits into from
Nov 4, 2024
Merged

Conversation

winsvega
Copy link
Collaborator

@winsvega winsvega commented Oct 25, 2024

🗒️ Description

Print hint string if assigned in Storage class
Usage:

Op.SSTORE(post.store_next(0, hint="expected_result"), Op.MLOAD(0))
...
        post={
            runner_contract: Account(
                storage=post,
            )
        },

🔗 Related Issues

Surpasses #807

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

@winsvega winsvega added scope:pytest Scope: Pytest plugins type:feat type: Feature labels Oct 25, 2024
@winsvega winsvega force-pushed the storageHint branch 4 times, most recently from b1981f3 to 42c1d4c Compare October 25, 2024 13:36
- Add basic EOF execution tests migrated from ethereum/tests:
  EIPTests/StateTests/stEOF/stEIP3540/EOF1_Execution.json
- Extend execution test of legacy invoking `EXTCODE*` instruction on EOF
  with the case from ethereum/tests.
@winsvega
Copy link
Collaborator Author

winsvega commented Oct 26, 2024

the only thing here about Storage class.

post.store_next(0, hint="expected_result")

when used like this it is unclear that 0 is the expected value. I was very confused

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!

src/ethereum_test_base_types/composite_types.py Outdated Show resolved Hide resolved
src/ethereum_test_base_types/composite_types.py Outdated Show resolved Hide resolved
src/ethereum_test_base_types/composite_types.py Outdated Show resolved Hide resolved
@marioevz marioevz changed the title storage key hint in Storage class feat(base_types): storage key hint in Storage class Nov 4, 2024
@marioevz marioevz merged commit b78eb77 into main Nov 4, 2024
5 checks passed
@marioevz marioevz deleted the storageHint branch November 4, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:pytest Scope: Pytest plugins type:feat type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants