Skip to content

Commit

Permalink
Merge branch 'develop' into kernel-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
LindaGuiga committed Nov 14, 2024
2 parents 8e28074 + b63c8e2 commit d5ec8d4
Show file tree
Hide file tree
Showing 59 changed files with 95,223 additions and 523 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: rustsec/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
64 changes: 64 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
--- # Proof generation benchmarking workflow

name: Benchmark proving

on:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:
branches:
- "**"

env:
BENCHMARK_WITNESS: artifacts/witness_b1000_b1019.json

jobs:
benchmark_proving:
name: Benchmark proving for representative blocks
runs-on: zero-reg
timeout-minutes: 300
steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Build the project
run: |
RUSTFLAGS='-C target-cpu=native -Zlinker-features=-lld' cargo build --release
sudo sysctl kernel.perf_event_paranoid=0
- name: Download previous results
uses: dawidd6/action-download-artifact@v6
with:
workflow: benchmark.yml
workflow_conclusion: success
name: proving_benchmark
path: ./
if_no_artifact_found: ignore

- name: Run the script
run: |
echo "Benchmarking proving with $BENCHMARK_WITNESS"
./scripts/benchmark_input.sh $BENCHMARK_WITNESS | tee benchmark_output.log
MEASURED_PROVING_TIME_SEC=`cat benchmark_output.log | grep 'Proving duration:' | tail -1 | awk '{ print $3}'`
PERF_TIME=`cat output.log | grep "seconds time elapsed" | tail -1 | awk '{ print ($1)}'`
PERF_USER_TIME=`cat output.log | grep "seconds user" | tail -1 | awk '{ print ($1)}'`
PERF_SYS_TIME=`cat output.log | grep "seconds sys" | tail -1 | awk '{ print ($1)}'`
echo "RUN_ID=${{ github.run_id }} MEASURED_PROVING_TIME_SEC=$MEASURED_PROVING_TIME_SEC \
PERF_TIME=$PERF_TIME PERF_USER_TIME=$PERF_USER_TIME \
PERF_SYS_TIME=$PERF_SYS_TIME FILE=$BENCHMARK_WITNESS"
printf '%12s %-12s %-24s %-20s %-20s %-20s %-s\n' \
`date --utc +%y-%m-%d-%H:%M:%S` ${{ github.run_id }} \
$MEASURED_PROVING_TIME_SEC $PERF_TIME $PERF_USER_TIME \
$PERF_SYS_TIME $BENCHMARK_WITNESS >> proving_benchmark_results.txt
- name: Upload new results
uses: actions/upload-artifact@v4
with:
name: proving_benchmark
path: |
./proving_benchmark_results.txt
./output.log
retention-days: 90
overwrite: true
4 changes: 2 additions & 2 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download built book
uses: actions/download-artifact@v3
Expand Down
28 changes: 24 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,26 @@ jobs:
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

run_ignored_tests:
name: Slow evm_arithmetization tests in release mode
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout sources
uses: actions/checkout@v4

- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Set up rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Run specific ignored tests in release mode
run: |
cargo test --release \
--test empty_tables --test erc721 --test two_to_one_block -- --ignored
test_zero_bin:
name: Test zero_bin
runs-on: ubuntu-latest
Expand Down Expand Up @@ -148,7 +168,7 @@ jobs:
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run the script
run: ./scripts/prove_stdio.sh artifacts/witness_b19807080.json
Expand All @@ -159,7 +179,7 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run the script
run: ./scripts/prove_stdio.sh artifacts/witness_b19807080.json test_only
Expand All @@ -170,7 +190,7 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run the script
run: ./scripts/prove_stdio.sh artifacts/witness_b3_b6.json
run: ./scripts/prove_stdio.sh artifacts/witness_b3_b6.json "" use_test_config
15 changes: 7 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- # Rust lint related checks
--- # Rust lint related checks

name: lint

Expand All @@ -21,15 +21,15 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- run: cargo clippy --all-targets -- -D warnings
- run: cargo clippy --all-targets --no-default-features --features cdk_erigon -- -D warnings
udeps:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- uses: taiki-e/install-action@v2
with:
Expand All @@ -40,29 +40,28 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- run: RUSTDOCFLAGS='-D warnings -A rustdoc::private_intra_doc_links' cargo doc --all --no-deps
# TODO(zero): https://github.com/0xPolygonZero/zk_evm/issues/718
- run: >
RUSTDOCFLAGS='-D warnings -A rustdoc::private_intra_doc_links' cargo doc --no-deps --document-private-items
--package trace_decoder
--package compat
--package smt_trie
--package zk_evm_proc_macro
--package zk_evm_common
cargo-fmt:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- run: cargo fmt --check
taplo-fmt:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- uses: taiki-e/install-action@v2
with:
Expand All @@ -72,7 +71,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- uses: taiki-e/install-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
yamllint
--format github
-d "{extends: default, rules: {line-length: {max: 120}, truthy: {check-keys: false}}}"
.github
.github scripts
Loading

0 comments on commit d5ec8d4

Please sign in to comment.