Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
einar-polygon committed Nov 14, 2024
2 parents 5157244 + b63c8e2 commit ca7ccac
Show file tree
Hide file tree
Showing 69 changed files with 95,319 additions and 479 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/audit-check@v1.4.1
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
30 changes: 12 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[workspace]
members = [
"common",
"compat",
"evm_arithmetization",
"mpt_trie",
"proc_macro",
Expand All @@ -21,7 +20,6 @@ keywords = ["cryptography", "STARK", "plonky2", "ethereum", "zk"]
categories = ["cryptography::cryptocurrencies"]

[workspace.dependencies]
__compat_primitive_types = { version = "0.12.2", package = "primitive-types" }
alloy = { version = '0.3.0', default-features = false, features = [
"consensus",
"reqwest",
Expand All @@ -47,7 +45,8 @@ bytes = "1.6.0"
ciborium = "0.2.2"
ciborium-io = "0.2.2"
clap = { version = "4.5.7", features = ["derive", "env"] }
compat = { path = "compat" }
alloy-compat = "0.1.0"
copyvec = "0.2.0"
criterion = "0.5.1"
derive_more = { version = "1.0.0", features = ["deref", "deref_mut"] }
dotenvy = "0.15.7"
Expand All @@ -73,7 +72,8 @@ num-bigint = "0.4.5"
num-traits = "0.2.19"
nunny = "0.2.1"
once_cell = "1.19.0"
paladin-core = "0.4.3"
# TODO: update when paladin is released to 0.4.4 with abort signal support
paladin-core = { git = "https://github.com/0xPolygonZero/paladin.git", branch = "main" }
parking_lot = "0.12.3"
pest = "2.7.10"
pest_derive = "2.7.10"
Expand Down
91,403 changes: 91,403 additions & 0 deletions artifacts/witness_b1000_b1019.json

Large diffs are not rendered by default.

2,958 changes: 2,958 additions & 0 deletions artifacts/witness_b1033.json

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions compat/Cargo.toml

This file was deleted.

Loading

0 comments on commit ca7ccac

Please sign in to comment.