regression and benchmark testing between jerigon and zkevm #48
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 | |
- name: Build the project | |
run: | | |
RUSTFLAGS='-C target-cpu=native -Zlinker-features=-lld -Copt-level=3' 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 .. | |
# TODO - Download from IPFS | |
tar xf "$(pwd)/zk_evm/test_data/erigon-test-data.tar.gz" || { | |
echo "Failed to extract erigon-test-data.tar.gz"; exit 1; | |
} | |
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 10 $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_benchmark | |
path: ./ | |
if_no_artifact_found: ignore | |
- name: Run the Benchmark Script | |
run: | | |
export ETH_RPC_URL="http://localhost:8545" | |
./scripts/jerigon_zero_benchmark.sh \ | |
./jerigon_zero_output.log ./jerigon_zero_error.log | |
- name: Upload New Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jerigon_zero_benchmark | |
path: ./jerigon_zero_output.log ./jerigon_zero_error.log | |
retention-days: 90 | |
overwrite: true |