Skip to content

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, 3.11 or 3.12 installation.

  1. Ensure go-ethereum's evm tool and solc (0.8.20, 0.8.21, 0.8.22, 0.8.23 supported) are in your path. Either build the required versions, or alternatively:

    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
    
    More help:

    Binaries available here:

    More help:

  2. Clone the execution-spec-tests repo and install its 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]'
    
  3. Verify installation:

    1. Explore test cases:

      fill --collect-only
      

      Expected console output:

      Screenshot of pytest test collection console output

    2. Execute the test cases (verbosely) in the ./tests/berlin/eip2930_access_list/test_acl.py module:

      fill -v tests/berlin/eip2930_access_list/test_acl.py
      

      Expected console output:

      Screenshot of pytest test collection console output
      Check:

      1. The versions of the evm and solc tools are as expected (your versions may differ from those in the highlighted box).
      2. The generated HTML test report by clicking the link at the bottom of the console output.
      3. The corresponding fixture file has been generated:

        head fixtures/blockchain_tests/berlin/eip2930_access_list/acl/access_list.json
        

Installation Troubleshooting

If you encounter issues during installation, see the Installation Troubleshooting guide.

Next Steps

  1. Learn useful command-line flags.
  2. Execute tests for features under development via the --fork flag.
  3. Optional: Configure VS Code to auto-format Python code and execute tests within VS Code.
  4. Implement a new test case, see Writing Tests.