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/statetest: Convert most blockchain tests #370

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Jan 3, 2024

🗒️ Description

  • Converts the following tests to StateTest:
    • tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py::test_point_evaluation_precompile_gas_usage
    • tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py::test_valid_precompile_calls
    • tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py::test_invalid_precompile_calls
    • tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py::test_point_evaluation_precompile_external_vectors
    • tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py::test_point_evaluation_precompile_calls
    • tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py::test_point_evaluation_precompile_gas_tx_to
    • tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py::test_point_evaluation_precompile_before_fork
    • tests/cancun/eip7516_blobgasfee/test_blobgasfee_opcode.py::test_blobbasefee_before_fork
    • tests/shanghai/eip3860_initcode/test_initcode.py::test_contract_creating_tx
    • tests/shanghai/eip3860_initcode/test_initcode.py::TestContractCreationGasUsage
  • Adds a default value for env in the StateTest class.

Requirements

All merged #369, #368

🔗 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: 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` scope:fw Scope: Framework (evm|tools|forks|pytest) labels Jan 3, 2024
@marioevz marioevz force-pushed the feat/statetest-convert-most-blockchain-tests branch from 4eee500 to e62d568 Compare January 4, 2024 18:22
@spencer-tb spencer-tb marked this pull request as ready for review January 5, 2024 12:16
@marioevz marioevz changed the title Feat/statetest convert most blockchain tests feat/statetest: Convert most blockchain tests Jan 6, 2024
@marioevz marioevz force-pushed the feat/statetest-convert-most-blockchain-tests branch 2 times, most recently from 966c4ae to 965d0a1 Compare January 6, 2024 00:31
@marioevz marioevz force-pushed the feat/statetest-convert-most-blockchain-tests branch from 965d0a1 to 099bd9d Compare January 6, 2024 00:41
@marioevz marioevz force-pushed the feat/statetest-convert-most-blockchain-tests branch from 099bd9d to 95d12c3 Compare January 6, 2024 00:53
@marioevz marioevz requested a review from spencer-tb January 10, 2024 01:54
Copy link
Collaborator

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

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

LGTM, one comment!

- tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py::test_point_evaluation_precompile_before_fork
- tests/cancun/eip7516_blobgasfee/test_blobgasfee_opcode.py::test_blobbasefee_before_fork
- tests/shanghai/eip3860_initcode/test_initcode.py::test_contract_creating_tx
- tests/shanghai/eip3860_initcode/test_initcode.py::TestContractCreationGasUsage
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am being pedantic here, but should it not be:

Suggested change
- tests/shanghai/eip3860_initcode/test_initcode.py::TestContractCreationGasUsage
- tests/shanghai/eip3860_initcode/test_initcode.py::test_gas_usage

Copy link
Member Author

Choose a reason for hiding this comment

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

This was because this was generated with a test class instead of a test function, so if we change the id here, it will point to an nonexistent test.

I think the case can be made that we change the ids of all of the test classes, just for them to be cohesive with the rest of the names, but I'm not really sure how to do it.

@marioevz marioevz merged commit 0559c67 into ethereum:feat/statetest Jan 10, 2024
5 checks passed
@marioevz marioevz deleted the feat/statetest-convert-most-blockchain-tests branch January 10, 2024 15:48
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) scope:tests Scope: Changes EL client test cases in `./tests`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants