Skip to content
Merged
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
76 changes: 76 additions & 0 deletions .github/actions/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/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/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/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/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/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/build-evm-client/ethjs/action.yaml
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/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/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
45 changes: 45 additions & 0 deletions .github/actions/build-fixtures/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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 --extra test
- 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/build-evm-base
id: evm-builder
with:
type: ${{ steps.properties.outputs.evm-type }}
- name: Generate fixtures using fill
shell: bash
run: |
if [ "${{ steps.evm-builder.outputs.impl }}" = "eels" ]; then
uv run fill -n ${{ steps.evm-builder.outputs.x-dist }} ${{ steps.properties.outputs.fill-params }} --output=fixtures_${{ inputs.release_name }}.tar.gz --build-name ${{ inputs.release_name }}
else
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 }}
fi
- 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/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: null
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"]
24 changes: 24 additions & 0 deletions .github/configs/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Unless filling for special features, all features should fill for previous forks (starting from Frontier) too
stable:
evm-type: stable
fill-params: --until=Prague --fill-static-tests --ignore=tests/static/state_tests/stQuadraticComplexityTest

develop:
evm-type: develop
# TODO: Fix BPO filling.
# fill-params: --until=BPO4 --fill-static-tests --ignore=tests/static/state_tests/stQuadraticComplexityTest
fill-params: --until=Osaka --fill-static-tests --ignore=tests/static/state_tests/stQuadraticComplexityTest -k "not BPO"

benchmark:
evm-type: benchmark
fill-params: --fork=Prague --gas-benchmark-values 1,10,30,45,60,100,150 -m "benchmark and not state_test" ./tests/benchmark

benchmark_develop:
evm-type: benchmark
fill-params: --fork=Osaka --gas-benchmark-values 1,10,30,60,100,150 -m "benchmark and not state_test" ./tests/benchmark
feature_only: true

bal:
evm-type: develop
fill-params: --fork=Amsterdam ./tests/amsterdam/eip7928_block_level_access_lists
feature_only: true
Loading
Loading