regression and benchmark testing between jerigon and zkevm #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Jerigon Zero Testing | |
on: | |
# TODO - Change this before merge | |
# # Uncomment when ready to run on a schedule | |
# schedule: | |
# # Run every Sunday at 12:00 AM (UTC) | |
# - cron: "0 12 * * SUN" | |
push: | |
branches: [develop] | |
pull_request: | |
branches: | |
- "**" | |
workflow_dispatch: | |
branches: | |
- "**" | |
env: | |
CARGO_TERM_COLOR: always | |
REGISTRY: ghcr.io | |
jobs: | |
jerigon_zero_testing: | |
name: Jerigon Zero Testing - Integration and Benchmarking | |
runs-on: zero-reg | |
concurrency: | |
group: jerigon_zero_testing | |
cancel-in-progress: true | |
steps: | |
- name: Checkout zk_evm code | |
uses: actions/checkout@v4 | |
- name: Setup Rust Toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Set up Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
# Build optimized for the native CPU with `lld` linker and allow detailed performance profiling. | |
- name: Build the project | |
run: | | |
RUSTFLAGS='-C target-cpu=native -Zlinker-features=-lld' cargo build --release | |
sudo sysctl kernel.perf_event_paranoid=0 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run Erigon Network | |
run: | | |
cd .. | |
curl -o erigon-test-data.tar.gz \ | |
https://224d54070bdacdb423e0b7594ebdc231.ipfscdn.io/ipfs/bafybeigpm34mzhebd24uljuntmhulo6dpniqf75xtxcviztemb2fi5q74i \ | |
|| { echo "Failed to download erigon.tar.gz"; exit 1; } | |
tar xf ./erigon-test-data.tar.gz | |
docker pull ghcr.io/0xpolygonzero/erigon:feat-zero | |
docker run -d --name erigon \ | |
-p 8545:8545 \ | |
-v $(pwd):/data \ | |
ghcr.io/0xpolygonzero/erigon:feat-zero \ | |
--datadir=/data/erigon/execution-data \ | |
--http.api=eth,erigon,engine,web3,net,debug,trace,txpool,admin \ | |
--http.vhosts=* --ws --http --http.addr=0.0.0.0 \ | |
--http.corsdomain=* --http.port=8545 \ | |
--metrics --metrics.addr=0.0.0.0 --metrics.port=9001 \ | |
--db.size.limit=3000MB || { | |
echo "Failed to start Erigon"; exit 1; | |
} | |
- name: Regression Test with Zero Tracer in Real Mode | |
run: | | |
export ETH_RPC_URL="http://localhost:8545" | |
rm -rf proofs/* circuits/* ./proofs.json test.out verify.out leader.out | |
# TODO - Change block number and checkpoint before merge use 1000 to 1100 | |
OUTPUT_TO_TERMINAL=true ./scripts/prove_rpc.sh 1 1 $ETH_RPC_URL jerigon 0 3000 100 test_only | |
- name: Download Previous Results | |
uses: dawidd6/action-download-artifact@v6 | |
with: | |
workflow: cron_jerigon_zero_testing.yml | |
workflow_conclusion: success | |
name: jerigon_zero_testing | |
path: ./ | |
if_no_artifact_found: ignore | |
- name: Run the Benchmark Script | |
run: | | |
export ETH_RPC_URL="http://localhost:8545" | |
./scripts/jerigon_zero_benchmark.sh | |
- name: Upload New Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jerigon_zero_testing | |
path: | | |
./jerigon_zero_benchmark.log | |
./jerigon_zero_error.log | |
retention-days: 90 | |
overwrite: true |