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(fw): EOF - Add containerKind to EOF fixtures, add --initcode flag when calling evmone-eofparse #651

Merged
merged 8 commits into from
Jun 26, 2024

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Jun 26, 2024

🗒️ Description

Introduces kind field in the Container class and the EOFTest class, used to mark a container as a specific kind of container, such as "INITCODE".
When the field is set:

  • evmone-eofparse is called with the --initcode flag
  • the output EOF fixture contains containerKind: "INITCODE" field in all vectors, by default it contains containerKind: "RUNTIME".

Example of a test fixture JSON file after this change:

{
    "tests/prague/eip7692_eof_v1/eip3540_eof_v1/test_all_opcodes_in_container.py::test_all_opcodes_in_container[fork_CancunEIP7692-eof_test-opcode_STOP]": {
        "vectors": {
            "0": {
                "code": "0xef00010100040200010029030001001404002000008000146000600060006000600060006000600060006000600060006000600060006000600060006000600000ef000101000402000100010400000000800000001122334455667788112233445566778811223344556677881122334455667788",
                "containerKind": "INITCODE",  # NEW FIELD
                "results": {
                    "Prague": {
                        "result": true
                    }
                }
            }
        }
    }
}

🔗 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 the scope:fw Scope: Framework (evm|tools|forks|pytest) label Jun 26, 2024
@marioevz marioevz requested a review from shemnon June 26, 2024 14:56
@marioevz marioevz force-pushed the eof-test-initcode-flag branch from 9820fec to 74ba61b Compare June 26, 2024 18:13
@marioevz marioevz changed the title feat(fw): EOF - Add initcode flag feat(fw): EOF - Add containerKind to EOF fixtures, add --initcode flag when calling evmone-eofparse Jun 26, 2024
Copy link
Collaborator

@shemnon shemnon left a comment

Choose a reason for hiding this comment

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

Looks good.

@marioevz marioevz merged commit 22b96b9 into main Jun 26, 2024
7 checks passed
@marioevz marioevz deleted the eof-test-initcode-flag branch June 26, 2024 19:54
chfast added a commit to ethereum/evmone that referenced this pull request Jun 28, 2024
This is the fixture format agreed on EOF implementers call and produced
by EEST in ethereum/execution-spec-tests#651

Based on #916 because it removes the tests for `initcode_runtime`
container kind, and those were failing the run of exported validation
tests.
chfast added a commit to ethereum/evmone that referenced this pull request Jul 3, 2024
Add support for `"containerKind"` in the EOF validation JSON tests.
Specified in ethereum/execution-spec-tests#651.
pdobacz pushed a commit to ethereum/evmone that referenced this pull request Jul 3, 2024
Add support for `"containerKind"` in the EOF validation JSON tests.
Specified in ethereum/execution-spec-tests#651.

(cherry picked from commit f552184)
chfast added a commit to ethereum/evmone that referenced this pull request Jul 3, 2024
Add support for `"containerKind"` in the EOF validation JSON tests.
Specified in ethereum/execution-spec-tests#651.
chfast added a commit to ethereum/evmone that referenced this pull request Jul 3, 2024
Add support for `"containerKind"` in the EOF validation JSON tests.
Specified in ethereum/execution-spec-tests#651.
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants