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(fixtures): Add state field to post in state tests #1064

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Jan 9, 2025

🗒️ Description

Adds a state field to each network post result that contains the resulting allocation of the transaction execution.

This is meant to be a debugging aid in case there is a state root mismatch when consuming the tests.

@jochem-brouwer

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

@marioevz marioevz added scope:tests Scope: Changes EL client test cases in `./tests` type:feat type: Feature labels Jan 9, 2025
@jochem-brouwer
Copy link
Member

Amazing, thanks! 😊 👍

@marioevz marioevz requested a review from winsvega January 9, 2025 00:27
@winsvega
Copy link
Contributor

winsvega commented Jan 9, 2025

Why postDecoded. There was a field postState already. We just removed it because there were too many tx and tests. So the idea was if you have a mismatch, you run test fill command with a flag that exports the post state.

But if we don't care about the size, we just restore the postState field.

it was called decoded in blockchain tests because header and data decoded from given rlp.
other than that we call it just postState

Copy link
Contributor

@winsvega winsvega left a comment

Choose a reason for hiding this comment

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

lets keep original namepostState or 'state' since it is already in post dictionary

@marioevz marioevz changed the title feat(fixtures): Add postDecoded field to state tests feat(fixtures): Add state field to post in state tests Jan 9, 2025
@marioevz
Copy link
Member Author

marioevz commented Jan 9, 2025

@winsvega applied the suggestion and the field is now named state.

@jochem-brouwer just a heads-up that the field was renamed.

@marioevz marioevz requested a review from winsvega January 9, 2025 14:45
@marioevz marioevz merged commit f34f19c into main Jan 9, 2025
21 checks passed
@marioevz marioevz deleted the post-dict-in-state-fixtures branch January 9, 2025 16:28
codeofcarson pushed a commit to codeofcarson/execution-spec-tests that referenced this pull request Jan 24, 2025
* feat(fixtures): Add `postDecoded` field to state tests

* rename field to `state`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:tests Scope: Changes EL client test cases in `./tests` type:feat type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants