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

refactor(ethereum_clis): move generic code from TransitionTool to a new generic base class EthereumCLI #894

Merged
merged 7 commits into from
Oct 15, 2024

Conversation

danceratopz
Copy link
Member

@danceratopz danceratopz commented Oct 14, 2024

🗒️ Description

This refactors src/evm_transition_tool/ to a more library src/ethereum_clis/. The main aim being to allow easier definition of EVM sub-commands (for use in consume, for example) that can take advantage of a new base class EthereumCLI.

Next Steps

I would prefer to keep this PR tight in scope, in subsequent PRs, the next steps would be to:

  • refactor(GethTransitionTool): move the statetest and blocktest commands out of TransitionTool and to subclass them from new StateTest and BlockTest classes (which in turn are derived from the EthereumCLI base class.
  • refactor(solc): move the Solc class from src/ethereum_test_tools/code/yul.py to src/ethereum_clis/.
  • feat(consume): add python interfaces for the statetest and blocktest commands for other clients and use them in consume direct.

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

…ereumCLI

This refactors src/evm_transition_tool/ to src/ethereum_clis/. The aim being to allow easier definition of EVM sub-commands (for use in consume, for example) that can take advantage of a new base class EthereumCLI.
@danceratopz danceratopz marked this pull request as draft October 14, 2024 15:46
@danceratopz danceratopz added scope:evm Scope: evm_transition_tool package scope:tests Scope: Test cases scope:docs Scope: Documentation type:refactor Type: Refactor scope:fw Scope: Framework (evm|tools|forks|pytest) labels Oct 14, 2024
@danceratopz danceratopz marked this pull request as ready for review October 14, 2024 16:14
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.

This is very nice! Just a single comment, but otherwise looks good 👍

src/ethereum_clis/transition_tool.py Outdated Show resolved Hide resolved
@danceratopz danceratopz merged commit 619e7d8 into main Oct 15, 2024
5 checks passed
@danceratopz danceratopz deleted the refactor/create-ethereum-clis branch October 15, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:docs Scope: Documentation scope:evm Scope: evm_transition_tool package scope:fw Scope: Framework (evm|tools|forks|pytest) scope:tests Scope: Test cases type:refactor Type: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants