Skip to content

Commit 96ab18b

Browse files
committed
ci: add mainnet blocks integration test
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
1 parent 1cbbba2 commit 96ab18b

File tree

4 files changed

+89
-4
lines changed

4 files changed

+89
-4
lines changed

.github/workflows/integration-tests.yml renamed to .github/workflows/integration-test-eest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Integration tests
1+
name: Integration tests - EEST
22
on:
33
push:
44
branches: [ master ]
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88
env:
99
CARGO_TERM_COLOR: always
10-
ERE_TAG: 0.0.11-06d15a4
10+
ERE_TAG: 1.0.11-06d15a4
1111

1212
jobs:
1313
witness-generator:
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Integration tests - Mainnet
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
9+
cancel-in-progress: true
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
ERE_TAG: 1.0.11-06d15a4
14+
RUST_LOG: info,sp1_core_executor=warn
15+
16+
jobs:
17+
mainnet-blocks:
18+
name: "${{ matrix.zkvm }}"
19+
runs-on: [self-hosted-ghr, size-xl-x64]
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
zkvm: [sp1, risc0, zisk]
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
28+
- name: Install Rust toolchain
29+
uses: dtolnay/rust-toolchain@nightly
30+
31+
- name: Pull ere images
32+
run: |
33+
for variant in "" "-${{ matrix.zkvm }}"; do
34+
src="ghcr.io/eth-act/ere/ere-base${variant}:${ERE_TAG}"
35+
dst="ere-base${variant}:${ERE_TAG}"
36+
docker pull "$src"
37+
docker tag "$src" "$dst"
38+
done
39+
40+
- name: Untar mainnet fixtures
41+
run: |
42+
tar -xzvf tests/mainnet-zkevm-fixtures-input.tar.gz
43+
mv mainnet-zkevm-fixtures-input zkevm-fixtures-input
44+
45+
- name: Run benchmark
46+
run: cargo run -p ere-hosts --release -- --zkvms ${{ matrix.zkvm }} --action execute stateless-validator
47+
48+
- name: Locate metrics folder (common checks)
49+
id: metrics
50+
run: |
51+
find ./zkevm-metrics
52+
if [ ! -d "./zkevm-metrics" ]; then
53+
echo "zkevm-metrics folder does not exist"
54+
exit 1
55+
fi
56+
if [ ! -f "./zkevm-metrics/hardware.json" ]; then
57+
echo "hardware.json file does not exist in zkevm-metrics folder"
58+
exit 1
59+
fi
60+
zkvm_folder=$(find ./zkevm-metrics -type d -name "${{ matrix.zkvm }}-*" | head -n 1)
61+
if [ -z "$zkvm_folder" ]; then
62+
echo "No ${{ matrix.zkvm }} folder found in zkevm-metrics"
63+
exit 1
64+
fi
65+
echo "folder=$zkvm_folder" >> "$GITHUB_OUTPUT"
66+
67+
- name: Extra checks for stateless-validator
68+
run: |
69+
zkvm_folder='${{ steps.metrics.outputs.folder }}'
70+
ls -l ./zkevm-fixtures-input
71+
ls -l "$zkvm_folder"
72+
input_files_count=$(find ./zkevm-fixtures-input -type f | wc -l)
73+
zkvm_files_count=$(find "$zkvm_folder" -type f | wc -l)
74+
if [ "$input_files_count" -ne "$zkvm_files_count" ]; then
75+
echo "Mismatch in number of files: zkevm-fixtures-input has $input_files_count files, $zkvm_folder has $zkvm_files_count files"
76+
exit 1
77+
fi
78+
79+
- name: Upload metrics artifact
80+
if: always()
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: zkevm-metrics-${{ matrix.zkvm }}
84+
path: zkevm-metrics
85+
retention-days: 14

crates/ere-hosts/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct Cli {
4747
enum GuestProgramCommand {
4848
/// Ethereum Stateless Validator
4949
StatelessValidator {
50-
/// Input folder for benchmark results
50+
/// Input folder for benchmark fixtures
5151
#[arg(short, long, default_value = "zkevm-fixtures-input")]
5252
input_folder: PathBuf,
5353
},
@@ -56,7 +56,7 @@ enum GuestProgramCommand {
5656

5757
/// Block encoding length
5858
BlockEncodingLength {
59-
/// Input folder for benchmark results
59+
/// Input folder for benchmark fixtures
6060
#[arg(short, long, default_value = "zkevm-fixtures-input")]
6161
input_folder: PathBuf,
6262

74.5 MB
Binary file not shown.

0 commit comments

Comments
 (0)