Skip to content

ci: add mainnet blocks integration test #1

ci: add mainnet blocks integration test

ci: add mainnet blocks integration test #1

name: Integration tests - Mainnet
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
ERE_TAG: 1.0.11-06d15a4
RUST_LOG: info,sp1_core_executor=warn
jobs:
mainnet-blocks:
name: "${{ matrix.zkvm }}"
runs-on: [self-hosted-ghr, size-xl-x64]
strategy:
fail-fast: false
matrix:
zkvm: [sp1, risc0, zisk]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Pull ere images
run: |
for variant in "" "-${{ matrix.zkvm }}"; do
src="ghcr.io/eth-act/ere/ere-base${variant}:${ERE_TAG}"
dst="ere-base${variant}:${ERE_TAG}"
docker pull "$src"
docker tag "$src" "$dst"
done
- name: Untar mainnet fixtures
run: |
tar -xzvf tests/mainnet-zkevm-fixtures-input.tar.gz
mv mainnet-zkevm-fixtures-input zkevm-fixtures-input
- name: Run benchmark
run: cargo run -p ere-hosts --release -- --zkvms ${{ matrix.zkvm }} --action execute stateless-validator
- name: Locate metrics folder (common checks)
id: metrics
run: |
find ./zkevm-metrics
if [ ! -d "./zkevm-metrics" ]; then
echo "zkevm-metrics folder does not exist"
exit 1
fi
if [ ! -f "./zkevm-metrics/hardware.json" ]; then
echo "hardware.json file does not exist in zkevm-metrics folder"
exit 1
fi
zkvm_folder=$(find ./zkevm-metrics -type d -name "${{ matrix.zkvm }}-*" | head -n 1)
if [ -z "$zkvm_folder" ]; then
echo "No ${{ matrix.zkvm }} folder found in zkevm-metrics"
exit 1
fi
echo "folder=$zkvm_folder" >> "$GITHUB_OUTPUT"
- name: Extra checks for stateless-validator
run: |
zkvm_folder='${{ steps.metrics.outputs.folder }}'
ls -l ./zkevm-fixtures-input
ls -l "$zkvm_folder"
input_files_count=$(find ./zkevm-fixtures-input -type f | wc -l)
zkvm_files_count=$(find "$zkvm_folder" -type f | wc -l)
if [ "$input_files_count" -ne "$zkvm_files_count" ]; then
echo "Mismatch in number of files: zkevm-fixtures-input has $input_files_count files, $zkvm_folder has $zkvm_files_count files"
exit 1
fi
- name: Upload metrics artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: zkevm-metrics-${{ matrix.zkvm }}
path: zkevm-metrics
retention-days: 14