Skip to content

feat(tests): test all opcodes by fork #748

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

Merged
merged 5 commits into from
Aug 28, 2024
Merged

feat(tests): test all opcodes by fork #748

merged 5 commits into from
Aug 28, 2024

Conversation

winsvega
Copy link
Contributor

@winsvega winsvega commented Aug 15, 2024

πŸ—’οΈ Description

define lists of opcodes by fork and verify that they are actually supported only at the allowed forks

πŸ”— Related Issues

PR ethereum/tests#1399

βœ… 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

This comment was marked as outdated.

@spencer-tb

This comment was marked as outdated.

@winsvega winsvega changed the title add bugs folder feat(tests): test all opcodes by fork Aug 20, 2024
@winsvega winsvega force-pushed the dailytest branch 3 times, most recently from 33095ff to 9af2f28 Compare August 20, 2024 12:16
@winsvega winsvega added the scope:tests Scope: Changes EL client test cases in `./tests` label Aug 20, 2024
@winsvega winsvega requested a review from marioevz August 20, 2024 12:22
@marioevz marioevz requested a review from danceratopz August 20, 2024 22:10
@winsvega winsvega force-pushed the dailytest branch 5 times, most recently from 9fab3b1 to 046d998 Compare August 27, 2024 08:39
@winsvega
Copy link
Contributor Author

I put def test_cover_revert(state_test: StateTestFiller, pre: Alloc):
there to prove that no coverage lost. but is it ok if the coverage is red, and it merged with explanation?

here the coverage is red because in original test there were some failing transactions due to invalid stack for opcodes, and create opcodes didn't work as intended, also transaction was running as creatte instead I use call contracts here.

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.

LGTM - nice test!

Added a few minor suggestions below, mainly just style and clearer docstrings.

Also added a framwork test to check that we cover the full possible opcode range: bfc84a5

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.

One single comment, but I think it could be left for a follow up PR, and we could merge this one as is (after Dan's comments). Thanks!

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.

LGTM! Added a follow-up ticket for @marioevz's idea to extend the Opcode (or Bytecode) class with supported_evm_code_types #770.

@danceratopz danceratopz merged commit 4ae1d32 into main Aug 28, 2024
9 checks passed
@danceratopz danceratopz deleted the dailytest branch August 28, 2024 11:07
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`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants