feat(fw): add eest utils and improve user repo init experience
🗒️ Description
Initializes an EEST utils entry point that provides common eest related commands:
-
eest init: Initializes the repo by installing all the relevant packages. -
eest clean: Cleans up all generated folders and files. -
eest reset: Perfoms a clean and initialization.
Ideally in the future we can add more flags/commands for commonly run local workflows.
Removes solc as an installation dependency
Additionally, this PR adds solc-select to the install requires part of setup.cfg and the tox.ini file. Solc select is a python command line utility used to install and switch between stable solc versions easily: https://github.com/crytic/solc-select, it's similar to pyenv.
As we aim to always stay up to date with the latest stable solidity compiler, solc-select allows us to do this using:
solc-select use latest --always-install
Unfortunately we can't fully rely on the latest version, as from the 0.8.22 release notes:
IMPORTANT NOTE: This release deprecates support for EVM versions older than Constantinople for the reason of ruling out the need to maintain multiple complex code paths or workarounds for ancient EVM versions. In case you rely on the support for such EVM versions, please reach out to us.
Hence we in the future we should additionally always support a solc version below 0.8.22 for filling tests that are older than Constantinople. Ideally this is something we enforce within the framework. This PR additionally installs version 0.8.21 within the venv, but it is not used within the framework.
Replaces Windows with WSL
Its unlikely that users of this repo use Windows, given that most open source contributors develop on unix based systems.
As solc-select doesn't fully support Windows, and other PRs including: https://github.com/ethereum/execution-spec-tests/pull/453 only work for unix based systems - it made sense to replace the support of Windows for WSL within EEST. Due to this the documentation has been updated to support the latter, making it easy for users to get set up with WSL on there Windows machine for all EEST related development.
Updates to workflows
Since solc is removed as a dependency, the github workflows are updated to account for this. Now all workflows run with the latest stable solc binary. Additional changes:
- Bumped up the python version within
fixtures.yaml. - Renamed
test.yamltotox.yamlto better align with what the workflow does.
Remaining Todos
- [x] Replace Windows in docs with WSL.
- [x] Update github workflows.
- [x] Add documentation for eest utils.
Future Todos
- Add the version command to replace
fill --version-info. - Force test filling for forks before Constantinople to require version 0.8.21.
🔗 Related Issues
None
✅ Checklist
- [x] All: Set appropriate labels for the changes.
- [ ] All: Considered squashing commits to improve commit history.
- [ ] All: Added an entry to CHANGELOG.md.
- [x] 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: 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 servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
As highlighted by @danceratopz: we should be careful when fully deprecating all other solc versions, pointing out from version 0.8.22:
IMPORTANT NOTE: This release deprecates support for EVM versions older than Constantinople for the reason of ruling out the need to maintain multiple complex code paths or workarounds for ancient EVM versions. In case you rely on the support for such EVM versions, please reach out to us.
Hence I have added the installation of both solc 0.8.21 and "latest" within: 5652f31
The optimal solution moving forward in my opinion is to always support solc 0.8.21, and the latest version. For forks that are < Constinople we use version 0.8.21. For all others we use the latest version determined by solc-select.
This is getting messy so setting this to WIP.
I'm planning to split this into 2 PRs now:
- for the basic eest utils commands.
- for the deprecation solc as a required dependency. It looks like I can remove a lot more code.
It would be really nice to add something like a wizard to create a new test. It could ask questions like:
- What fork is the test for?
- Is it a new EIP?
- What type of test: blockchain or state test?
The proceed to create the folders and a basic python file, and also the
__init__.py.
It would be really nice to add something like a wizard to create a new test. It could ask questions like:
* What fork is the test for? * Is it a new EIP? * What type of test: blockchain or state test? The proceed to create the folders and a basic python file, and also the `__init__.py`.
Nice idea :smile: https://github.com/ethereum/execution-spec-tests/pull/950
Shame this didn't get over the finish line, great ideas! In the meantime, most of the pain points addressed here have been solved via:
- #777
- #772
I just opened an issue for a clean command, that would still be a welcome addition imo: #976