Quick Start¶
Testing features under active development
The EVM features under test must be implemented in the evm
tool and solc
executables that are used by the execution-spec-tests framework. The following guide installs stable versions of these tools.
To test features under active development, start with this base configuration and then follow the steps in executing tests for features under development.
The following requires a Python 3.10 installation.
-
Ensure go-ethereum's
evm
tool andsolc
are in your path. Either build the required versions, or alternatively:More help:sudo add-apt-repository -y ppa:ethereum/ethereum sudo apt-get update sudo apt-get install ethereum solc
More help:brew update brew upgrade brew tap ethereum/ethereum brew install ethereum solidity
Binaries available here:
More help:
-
Clone the execution-spec-tests repo and install its and dependencies (it's recommended to use a virtual environment for the installation):
git clone https://github.com/ethereum/execution-spec-tests cd execution-spec-tests python3 -m venv ./venv/ source ./venv/bin/activate pip install -e .[docs,lint,test]
-
Verify installation:
- Explore test cases:
console fill --collect-only
Expected console output: 3. Execute the test cases (verbosely) in the
./tests/berlin/eip2930_access_list/test_acl.py
module:Expected console output:fill -v tests/berlin/eip2930_access_list/test_acl.py
Check:
- The versions of the
evm
andsolc
tools are as expected (your versions may differ from those in the highlighted box). -
The corresponding fixture file has been generated:
head fixtures/berlin/eip2930_access_list/acl/access_list.json
Next Steps¶
- Learn useful command-line flags.
- Execute tests for features under development via the
--fork
flag. - Optional: Configure VS Code to auto-format Python code and execute tests within VS Code.
- Implement a new test case, see Writing Tests.