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): Implement execute command to run tests in live networks #686

Merged
merged 21 commits into from
Oct 24, 2024

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Jul 15, 2024

Requires

#822, #823, #824, #825, #826, #827

Will stay in draft until these requirements are merged.

🗒️ Description

Introduces the new command execute that allows to run tests in live networks when provided with enough funds to send test transactions.

execute Command

It includes two modes of executing tests.

Hive Local Network Mode

Run the tests in a local network instantiated using hive. The execute command drives the network by use of the Engine API and does not require a consensus client.

Remote RPC Network Mode

Run the tests on a live network by sending the transactions using the JSON RPC endpoint of an execution client connected to the network.

The command requires a private key with funds to be specified by using a parameter (--rpc-seed-key).

For more information see the included doc page: https://github.com/ethereum/execution-spec-tests/pull/686/files#diff-39b858dd04aa8508cf00fe9dafe46936865a8a3cded669a628c8ee1556b6cee1

New Test Markers

Included in this PR there are two new markers which can aid to mark tests with specific behavior on execute and fill modes.

pytest.mark.fill, pytest.mark.execute

These marks accept any number of markers as arguments which will be applied to the tests in the respective mode.

For example:

@pytest.mark.execute(pytest.mark.skip(reason="excessive amount of balance required"))

for tests that cannot be executed on a live network due to balance requirements.

🔗 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 force-pushed the fill-execute-modes branch 3 times, most recently from cf0f3c9 to b3b2496 Compare September 6, 2024 14:37
@marioevz marioevz changed the title feat(fw): Allow EEST to run tests in live networks feat(fw): Implement execute command to run tests in live networks Sep 13, 2024
@marioevz marioevz added scope:tests Scope: Test cases type:feat type: Feature scope:fw Scope: Framework (evm|tools|forks|pytest) scope:pytest Scope: Pytest plugins labels Sep 13, 2024
@marioevz marioevz marked this pull request as ready for review September 13, 2024 23:12
@marioevz marioevz marked this pull request as draft September 20, 2024 16:33
@marioevz marioevz marked this pull request as ready for review October 1, 2024 19:14
@marioevz
Copy link
Member Author

marioevz commented Oct 2, 2024

Hi @danceratopz @spencer-tb this has been rebased on top of main and I think is ready for review.

One thing that could be missing is the changes to existing tests to add markers or make the tests more execute-friendly, but that would add many files to this PR (I have a commit on other branch). Should that be on a different PR for easier review?

@danceratopz
Copy link
Member

One thing that could be missing is the changes to existing tests to add markers or make the tests more execute-friendly, but that would add many files to this PR (I have a commit on other branch). Should that be on a different PR for easier review?

@marioevz Let's get this merged without getting hung up on running with existing tests and handle that in a subsequent PR 🚀

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!

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.

Let's get this merged!

@danceratopz danceratopz merged commit ac615f6 into main Oct 24, 2024
5 checks passed
@danceratopz danceratopz deleted the fill-execute-modes branch October 24, 2024 03:49
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:pytest Scope: Pytest plugins scope:tests Scope: Test cases type:feat type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants