Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ N/A.
```console
uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
```
- [ ] All: PR title adheres to the [repo standard](https://eest.ethereum.org/main/getting_started/contributing/?h=contri#commit-messages-issue-and-pr-titles) - it will be used as the squash commit message and should start `type(scope):`.
- [ ] All: Considered adding an entry to [CHANGELOG.md](/ethereum/execution-spec-tests/blob/main/docs/CHANGELOG.md).
- [ ] All: Considered updating the online docs in the [./docs/](/ethereum/execution-spec-tests/blob/main/docs/) directory.
- [ ] All: Considered adding an entry to [CHANGELOG.md](/ethereum/execution-specs/blob/main/docs/CHANGELOG.md).
- [ ] All: Considered updating the online docs in the [./docs/](/ethereum/execution-specs/blob/main/docs/) directory.
- [ ] All: Set appropriate labels for the changes (only maintainers can apply labels).
- [ ] Tests: Ran `mkdocs serve` locally and verified the auto-generated docs for new tests in the [Test Case Reference](https://eest.ethereum.org/main/tests/) are correctly formatted.
- [ ] Tests: For PRs implementing a missed test case, update the [post-mortem document](/ethereum/execution-spec-tests/blob/main/docs/writing_tests/post_mortems.md) to add an entry the list.
- [ ] Ported Tests: All converted JSON/YML tests from [ethereum/tests](/ethereum/tests) or [tests/static](/ethereum/execution-spec-tests/blob/main/tests/static) have been assigned `@ported_from` marker.
- [ ] Tests: For PRs implementing a missed test case, update the [post-mortem document](/ethereum/execution-specs/blob/main/docs/writing_tests/post_mortems.md) to add an entry the list.
- [ ] Ported Tests: All converted JSON/YML tests from [ethereum/tests](/ethereum/tests) or [tests/eest/static](/ethereum/execution-specs/blob/main/tests/eest/static) have been assigned `@ported_from` marker.

#### Cute Animal Picture

Expand Down
76 changes: 76 additions & 0 deletions .github/actions/eest/build-evm-base/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: 'Build EVM'
description: 'Resolves and builds the requested EVM binary by name'
inputs:
type:
description: 'Type of EVM binary to build'
required: true
default: 'main'
outputs:
impl:
description: "Implementation of EVM binary to build"
value: ${{ steps.config-evm-reader.outputs.impl }}
repo:
description: "Repository to use to build the EVM binary"
value: ${{ steps.config-evm-reader.outputs.repo }}
ref:
description: "Reference to branch, commit, or tag to use to build the EVM binary"
value: ${{ steps.config-evm-reader.outputs.ref }}
evm-bin:
description: "Binary name of the evm tool to use"
value: ${{ steps.config-evm-impl-config-reader.outputs.evm-bin }}
x-dist:
description: "Binary name of the evm tool to use"
value: ${{ steps.config-evm-impl-config-reader.outputs.x-dist }}
runs:
using: "composite"
steps:
- name: Get the selected EVM version from the .github/configs/evm.yaml
id: config-evm-reader
shell: bash
run: |
awk "/^${{ inputs.type }}:/{flag=1; next} /^[[:alnum:]]/{flag=0} flag" ./.github/configs/evm.yaml \
| sed 's/ //g' | sed 's/:/=/g' >> "$GITHUB_OUTPUT"
- name: Get the EVM implementation configuration from .github/configs/evm-impl-config.yaml
id: config-evm-impl-config-reader
shell: bash
run: |
awk "/^${{ steps.config-evm-reader.outputs.impl }}:/{flag=1; next} /^[[:alnum:]]/{flag=0} flag" ./.github/configs/evm-impl.yaml \
| sed 's/ //g' | sed 's/:/=/g' >> "$GITHUB_OUTPUT"
- name: Print Variables for the selected EVM type
shell: bash
run: |
echo "Implementation: ${{ steps.config-evm-reader.outputs.impl }}"
echo "Repository: ${{ steps.config-evm-reader.outputs.repo }}"
echo "Reference: ${{ steps.config-evm-reader.outputs.ref }}"
echo "EVM Binary: ${{ steps.config-evm-impl-config-reader.outputs.evm-bin }}"
echo "X-Dist parameter: ${{ steps.config-evm-impl-config-reader.outputs.x-dist }}"
- name: Skip building for EELS
if: steps.config-evm-reader.outputs.impl == 'eels'
shell: bash
run: echo "Skipping build for EELS"
- name: Build the EVM using Geth action
if: steps.config-evm-reader.outputs.impl == 'geth'
uses: ./.github/actions/eest/build-evm-client/geth
with:
repo: ${{ steps.config-evm-reader.outputs.repo }}
ref: ${{ steps.config-evm-reader.outputs.ref }}
- name: Build the EVM using EVMONE action
if: steps.config-evm-reader.outputs.impl == 'evmone'
uses: ./.github/actions/eest/build-evm-client/evmone
with:
repo: ${{ steps.config-evm-reader.outputs.repo }}
ref: ${{ steps.config-evm-reader.outputs.ref }}
# `targets` in the evm.yaml must be an inline array to not interfere with `config-evm-reader`'s parsing
targets: ${{ join(fromJSON(steps.config-evm-reader.outputs.targets), ' ') }}
- name: Build the EVM using Besu action
if: steps.config-evm-reader.outputs.impl == 'besu'
uses: ./.github/actions/eest/build-evm-client/besu
with:
repo: ${{ steps.config-evm-reader.outputs.repo }}
ref: ${{ steps.config-evm-reader.outputs.ref }}
- name: Build the EVM using EthJS action
if: steps.config-evm-reader.outputs.impl == 'ethjs'
uses: ./.github/actions/eest/build-evm-client/ethjs
with:
repo: ${{ steps.config-evm-reader.outputs.repo }}
ref: ${{ steps.config-evm-reader.outputs.ref }}
40 changes: 40 additions & 0 deletions .github/actions/eest/build-evm-client/besu/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'Build Besu EVM'
description: 'Builds the Besu EVM binary'
inputs:
repo:
description: 'Source repository to use to build the EVM binary'
required: true
default: 'hyperledger/besu'
ref:
description: 'Reference to branch, commit, or tag to use to build the EVM binary'
required: true
default: 'main'
java:
description: 'Java version to use to build Besu'
required: false
default: '21'
java-distro:
description: 'Java distribution to use to build Besu'
required: false
default: 'temurin'
runs:
using: "composite"
steps:
- name: Checkout Besu
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.ref }}
path: besu
- name: Setup Java
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
with:
java-version: ${{ inputs.java }}
distribution: ${{ inputs.java-distro }}
cache: 'gradle'
- name: Build evm cmd
shell: bash
run: |
cd $GITHUB_WORKSPACE/besu
./gradlew installDist
echo $GITHUB_WORKSPACE/besu/build/install/besu/bin/ >> $GITHUB_PATH
37 changes: 37 additions & 0 deletions .github/actions/eest/build-evm-client/ethjs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 'Build EthereumJS monorepo'
description: 'Builds the EthereumJS monorepo'
inputs:
repo:
description: 'Source repository to use to build EthereumJS'
required: true
default: 'ethereumjs/ethereumjs-monorepo'
ref:
description: 'Reference to branch, commit, or tag to use to build EthereumJS'
required: true
default: 'master'
runs:
using: "composite"
steps:
- name: Checkout EthereumJS monorepo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.ref }}
path: ethereumjs

- name: Setup node
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e
with:
node-version: 18

- name: Build monorepo
shell: bash
run: |
cd $GITHUB_WORKSPACE/ethereumjs
npm ci

- name: Add t8ntool to $PATH
shell: bash
run: |
echo $GITHUB_WORKSPACE/ethereumjs/packages/vm/test/t8n/ >> $GITHUB_PATH
echo $GITHUB_WORKSPACE/ethereumjs/node_modules/.bin >> $GITHUB_PATH
46 changes: 46 additions & 0 deletions .github/actions/eest/build-evm-client/evmone/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'Build evmone EVM'
description: 'Builds the evmone EVM binary'
inputs:
repo:
description: 'Source repository to use to build the EVM binary'
required: true
default: 'ethereum/evmone'
ref:
description: 'Reference to branch, commit, or tag to use to build the EVM binary'
required: true
default: 'master'
targets:
description: 'Which targets to build from evmone repo'
required: false
default: 'all'
runs:
using: "composite"
steps:
- name: Checkout evmone
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.ref }}
path: evmone
submodules: true
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be
with:
cmake-version: '3.x'
- name: "Install GMP Linux"
if: runner.os == 'Linux'
shell: bash
run: sudo apt-get -q update && sudo apt-get -qy install libgmp-dev
- name: Install GMP macOS
if: runner.os == 'macOS'
shell: bash
run: |
brew update && brew install gmp
- name: Build evmone binary
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/bin
cd $GITHUB_WORKSPACE/evmone
cmake -S . -B build -DEVMONE_TESTING=ON -DEVMONE_PRECOMPILES_SILKPRE=1
cmake --build build --parallel --target ${{ inputs.targets }}
echo $GITHUB_WORKSPACE/evmone/build/bin/ >> $GITHUB_PATH
36 changes: 36 additions & 0 deletions .github/actions/eest/build-evm-client/geth/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 'Build Go-Ethereum EVM'
description: 'Builds the Go-Ethereum EVM binary'
inputs:
repo:
description: 'Source repository to use to build the EVM binary'
required: true
default: 'ethereum/go-ethereum'
ref:
description: 'Reference to branch, commit, or tag to use to build the EVM binary'
required: true
default: 'master'
golang:
description: 'Golang version to use to build Geth'
required: false
default: '1.21.x'
runs:
using: "composite"
steps:
- name: Checkout go-ethereum
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.ref }}
path: go-ethereum
- name: Setup golang
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b
with:
go-version: ${{ inputs.golang }}
cache-dependency-path: go-ethereum/go.sum
- name: Build evm cmd
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/bin
cd $GITHUB_WORKSPACE/go-ethereum/cmd/evm
go build .
echo $GITHUB_WORKSPACE/go-ethereum/cmd/evm >> $GITHUB_PATH
59 changes: 59 additions & 0 deletions .github/actions/eest/build-fixtures/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build and Package Fixture Release
inputs:
release_name:
description: "Name of the fixture release"
required: true
uv_version:
description: "Version of UV to install"
required: true
python_version:
description: "Version of Python to install"
required: true
runs:
using: "composite"
steps:
- name: Install uv ${{ inputs.uv_version }} and python ${{ inputs.python_version }}
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182
with:
enable-cache: false
version: ${{ inputs.uv_version }}
python-version: ${{ inputs.python_version }}
- name: Install EEST
shell: bash
run: uv sync --no-progress
- name: Extract fixture release properties from config
id: properties
shell: bash
run: |
echo "release_name=${{ inputs.release_name }}"
uv run -q .github/scripts/get_release_props.py ${{ inputs.release_name }} >> "$GITHUB_OUTPUT"
- uses: ./.github/actions/eest/build-evm-base
id: evm-builder
with:
type: ${{ steps.properties.outputs.evm-type }}
- name: Generate fixtures using fill
shell: bash
run: |
uv run fill -n ${{ steps.evm-builder.outputs.x-dist }} --evm-bin=${{ steps.evm-builder.outputs.evm-bin }} ${{ steps.properties.outputs.fill-params }} --output=fixtures_${{ inputs.release_name }}.tar.gz --build-name ${{ inputs.release_name }}
- name: Wrap ethereum/tests fixtures with eofwrap tool
shell: bash
if: ${{ steps.properties.outputs.eofwrap }}
run: |
curl -L ${tests_url}${tests_version}.tar.gz | tar -xz
ls -l
uv run eofwrap tests-${tests_version}/BlockchainTests/GeneralStateTests/ fixtures/${output_path}
rm -rf fixtures_${{ inputs.release_name }}
mkdir -p ./fixtures/.meta
mv fixtures/${output_path}/metrics.json ./fixtures/.meta/eofwrap_metrics.json
gunzip fixtures_${{ inputs.release_name }}.tar.gz
tar rf fixtures_${{ inputs.release_name }}.tar fixtures
gzip fixtures_${{ inputs.release_name }}.tar
rm -rf fixtures
env:
tests_url: https://github.com/ethereum/tests/archive/refs/tags/v
tests_version: 14.1
output_path: blockchain_tests/unscheduled/eofwrap
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: fixtures_${{ inputs.release_name }}
path: fixtures_${{ inputs.release_name }}.tar.gz
31 changes: 31 additions & 0 deletions .github/actions/eest/fetch-binary/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Fetch and Install Binary"
description: "Downloads a binary from a GitHub release, verifies its checksum, and installs it to PATH. Only works for Linux."
inputs:
version:
description: "Release version (e.g., v0.8.24)"
required: true
repo_owner:
description: "GitHub repository owner"
required: true
repo_name:
description: "GitHub repository name"
required: true
remote_name:
description: "Binary filename in the release"
required: true
binary_name:
description: "Name to install the binary as"
required: true
expected_sha256:
description: "Expected SHA256 checksum"
required: true
runs:
using: "composite"
steps:
- name: Download binary
shell: bash
run: |
curl -sSL "https://github.com/${{ inputs.repo_owner }}/${{ inputs.repo_name }}/releases/download/${{ inputs.version }}/${{ inputs.remote_name }}" -o ./${{ inputs.binary_name }}
echo "${{ inputs.expected_sha256 }} ${{ inputs.binary_name }}" | sha256sum -c -
sudo mv ./${{ inputs.binary_name }} /usr/local/bin/${{ inputs.binary_name }}
sudo chmod +x /usr/local/bin/${{ inputs.binary_name }}
15 changes: 15 additions & 0 deletions .github/configs/evm-impl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
eels:
evm-bin: ethereum-spec-evm-resolver
x-dist: auto
geth:
evm-bin: evm
x-dist: auto
evmone:
evm-bin: evmone-t8n
x-dist: auto
besu:
evm-bin: evmtool
x-dist: 0
ethjs:
evm-bin: ethereumjs-t8ntool.sh
x-dist: auto
18 changes: 18 additions & 0 deletions .github/configs/evm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
stable:
impl: eels
repo: null
ref: null
develop:
impl: eels
repo: null
ref: null
static:
impl: evmone
repo: ethereum/evmone
ref: master
targets: ["evmone-t8n"]
benchmark:
impl: evmone
repo: ethereum/evmone
ref: master
targets: ["evmone-t8n"]
Loading
Loading