Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into type2_merge_linda
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Nov 5, 2024
2 parents 00c6292 + deba488 commit 7f89495
Show file tree
Hide file tree
Showing 49 changed files with 612 additions and 197 deletions.
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
# https://github.com/rust-lang/rust/pull/124129
# https://github.com/dtolnay/linkme/pull/88
rustflags = ["-Z", "linker-features=-lld"]

[alias]
xtask = ["run", "--package=xtask", "--"]
6 changes: 4 additions & 2 deletions .github/actions/rust/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
--- # Common CI steps

name: "Rust"
description: |
Common steps for CI
See <https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action>
runs:
using: composite
using: composite
steps:
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: Swatinem/rust-cache@v2
Expand Down
22 changes: 12 additions & 10 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
--- # Github labeler configuration file

# Add 'crate: mpt_trie' label to any changes within 'mpt_trie' folder.
'crate: mpt_trie':
- changed-files:
- any-glob-to-any-file: mpt_trie/**
- changed-files:
- any-glob-to-any-file: mpt_trie/**

# Add 'crate: evm_arithmetization' label to any changes within 'evm_arithmetization' folder.
'crate: evm_arithmetization':
- changed-files:
- any-glob-to-any-file: evm_arithmetization/**
- changed-files:
- any-glob-to-any-file: evm_arithmetization/**

# Add 'crate: trace_decoder' label to any changes within 'trace_decoder' folder.
'crate: trace_decoder':
- changed-files:
- any-glob-to-any-file: trace_decoder/**
- changed-files:
- any-glob-to-any-file: trace_decoder/**

# Add 'crate: zero_bin' label to any changes within 'zero' folder.
'crate: zero_bin':
- changed-files:
- any-glob-to-any-file: zero/**
- changed-files:
- any-glob-to-any-file: zero/**

# Add 'specs' label to any changes within 'docs' or `book` folder.
'specs':
- changed-files:
- any-glob-to-any-file: ['docs/**', 'book/**']
- changed-files:
- any-glob-to-any-file: ['docs/**', 'book/**']

# Add 'crate: common' label to any changes within 'common' folder.
'crate: common':
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
--- # Rust cargo audit workflow

name: Security audit
on:
push:
paths:
paths:
- '**/Cargo.toml'

jobs:
security_audit:
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 }}
6 changes: 4 additions & 2 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # MD Book generation and deployment workflow

name: zkEVM mdbook

on:
Expand All @@ -12,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 @@ -47,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
23 changes: 11 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Workflow with multiple jobs to test different parts of the project

name: Continuous Integration

on:
Expand All @@ -22,7 +24,6 @@ jobs:
name: Test mpt_trie
runs-on: ubuntu-latest
timeout-minutes: 30
if: ${{ ! contains(toJSON(github.event.commits.*.message), '[skip-ci]') }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -37,7 +38,11 @@ jobs:
- name: Test in mpt_trie subdirectory
run: cargo test --manifest-path mpt_trie/Cargo.toml
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUSTFLAGS: >
-Copt-level=3
-Cdebug-assertions
-Coverflow-checks=y
-Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1
Expand All @@ -50,8 +55,6 @@ jobs:
RUST_LOG: info
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

if: ${{ ! contains(toJSON(github.event.commits.*.message), '[skip-ci]') }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -63,7 +66,7 @@ jobs:
with:
cache-on-failure: true

- name: build # build separately so test logs are actually nice
- name: build # build separately so test logs are actually nice
run: cargo build --tests --manifest-path trace_decoder/Cargo.toml

- name: test
Expand All @@ -73,7 +76,6 @@ jobs:
name: Test evm_arithmetization
runs-on: ubuntu-latest
timeout-minutes: 20
if: ${{ ! contains(toJSON(github.event.commits.*.message), '[skip-ci]') }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -97,7 +99,6 @@ jobs:
name: Test zero_bin
runs-on: ubuntu-latest
timeout-minutes: 10
if: ${{ ! contains(toJSON(github.event.commits.*.message), '[skip-ci]') }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -112,7 +113,6 @@ jobs:
- name: Test in zero_bin subdirectory
run: |
cargo test --manifest-path zero/Cargo.toml
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
Expand All @@ -123,7 +123,6 @@ jobs:
name: Test zk_evm_proc_macro
runs-on: ubuntu-latest
timeout-minutes: 5
if: ${{ ! contains(toJSON(github.event.commits.*.message), '[skip-ci]') }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -149,7 +148,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 @@ -160,7 +159,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 @@ -171,7 +170,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
2 changes: 2 additions & 0 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Workflow for building and running docker images as regression test

name: Docker Build & Run

on:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Workflow for building and deploying docker images

name: Docker Build & Push

on:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/jerigon-native.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Run and populate blockchain with transactions and generate proofs using native tracer

name: Jerigon Integration

on:
Expand All @@ -19,7 +21,6 @@ jobs:
name: Native tracer proof generation
runs-on: zero-ci
timeout-minutes: 30
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand Down Expand Up @@ -52,16 +53,17 @@ jobs:
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
sudo apt update
sudo apt install kurtosis-cli
sudo apt install kurtosis-cli=1.3.1
#It is much easier to use cast tool in scripts so install foundry
# It is much easier to use cast tool in scripts so install foundry
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Run cancun test network
run: |
docker pull ghcr.io/0xpolygonzero/erigon:feat-zero
kurtosis run --enclave cancun-testnet github.com/ethpandaops/[email protected] --args-file jerigon-test-network/network_params.yml
kurtosis run --enclave cancun-testnet github.com/ethpandaops/[email protected] \
--args-file jerigon-test-network/network_params.yml
- name: Generate blocks with transactions
run: |
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/jerigon-zero.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Run and populate blockchain with transactions and generate proofs using zero tracer

name: Jerigon Integration

on:
Expand All @@ -19,7 +21,6 @@ jobs:
name: Zero tracer proof generation
runs-on: zero-ci
timeout-minutes: 30
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand Down Expand Up @@ -52,16 +53,17 @@ jobs:
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
sudo apt update
sudo apt install kurtosis-cli
sudo apt install kurtosis-cli=1.3.1
#It is much easier to use cast tool in scripts so install foundry
# It is much easier to use cast tool in scripts so install foundry
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Run cancun test network
run: |
docker pull ghcr.io/0xpolygonzero/erigon:feat-zero
kurtosis run --enclave cancun-testnet github.com/ethpandaops/[email protected] --args-file jerigon-test-network/network_params.yml
kurtosis run --enclave cancun-testnet github.com/ethpandaops/[email protected] \
--args-file jerigon-test-network/network_params.yml
- name: Generate blocks with transactions
run: |
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
--- # Add labels to the PR

name: "Pull Request Labeler"
on:
- pull_request_target
- pull_request_target

jobs:
labeler:
Expand All @@ -10,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/labeler@v5
with:
# Allow to remove labels that are no longer relevant when new changes are pushed.
sync-labels: true
- uses: actions/labeler@v5
with:
# Allow to remove labels that are no longer relevant when new changes are pushed.
sync-labels: true
22 changes: 17 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Rust lint related checks

name: lint

on:
Expand All @@ -19,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 @@ -38,7 +40,7 @@ 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
Expand All @@ -53,16 +55,26 @@ jobs:
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:
tool: taplo-cli
- run: taplo fmt --check
outdated:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- uses: taiki-e/install-action@v2
with:
tool: cargo-outdated
- run: cargo xtask outdated
Loading

0 comments on commit 7f89495

Please sign in to comment.