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 5, 2024
2 parents 7ad8cbd + 4a747b2 commit 8e28074
Show file tree
Hide file tree
Showing 79 changed files with 3,855 additions and 2,289 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", "--"]
14 changes: 7 additions & 7 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
* @muursh @Nashtare
/evm_arithmetization/ @wborgeaud @muursh @Nashtare @LindaGuiga
/zero/ @muursh @Nashtare @atanmarko
/smt_trie/ @0xaatif @muursh @Nashtare
/mpt_trie/ @0xaatif @Nashtare @muursh
/trace_decoder/ @0xaatif @muursh @Nashtare
.github/ @0xaatif @atanmarko @muursh @Nashtare
* @Nashtare @paulgoleary
/evm_arithmetization/ @wborgeaud @Nashtare @LindaGuiga
/zero/ @Nashtare @atanmarko @0xaatif
/smt_trie/ @0xaatif @Nashtare
/mpt_trie/ @0xaatif @Nashtare
/trace_decoder/ @0xaatif @Nashtare
.github/ @0xaatif @atanmarko @Nashtare
/vscode-extension @0xaatif
/evm_arithmetization/src/bin/lsp-server.rs @0xaatif
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
5 changes: 4 additions & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
--- # Rust cargo audit workflow

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

jobs:
security_audit:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 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 Down
17 changes: 8 additions & 9 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 Down
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
14 changes: 8 additions & 6 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 All @@ -74,14 +76,14 @@ jobs:
run: |
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)"
ulimit -n 8192
OUTPUT_TO_TERMINAL=true ./scripts/prove_rpc.sh 0x1 0xf $ETH_RPC_URL native true 3000 100 test_only
OUTPUT_TO_TERMINAL=true ./scripts/prove_rpc.sh 1 15 $ETH_RPC_URL native 0 3000 100 test_only
echo "Proving blocks in test_only mode finished"
- name: Run prove blocks with native tracer in real mode
run: |
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)"
rm -rf proofs/* circuits/* ./proofs.json test.out verify.out leader.out
OUTPUT_TO_TERMINAL=true RUN_VERIFICATION=true ./scripts/prove_rpc.sh 0x4 0x7 $ETH_RPC_URL native true 3000 100
OUTPUT_TO_TERMINAL=true RUN_VERIFICATION=true ./scripts/prove_rpc.sh 4 7 $ETH_RPC_URL native 3 3000 100
echo "Proving blocks in real mode finished"
- name: Shut down network
Expand Down
41 changes: 19 additions & 22 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 @@ -10,7 +12,6 @@ on:
branches:
- "**"


env:
CARGO_TERM_COLOR: always
REGISTRY: ghcr.io
Expand All @@ -20,22 +21,21 @@ 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

- name: Checkout test-jerigon-network sources
uses: actions/checkout@v4
uses: actions/checkout@v4
with:
repository: 0xPolygonZero/jerigon-test-network
ref: 'feat/kurtosis-network'
ref: "feat/kurtosis-network"
path: jerigon-test-network

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

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand All @@ -53,43 +53,40 @@ 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
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: |
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)"
cast rpc eth_blockNumber --rpc-url $ETH_RPC_URL
cd jerigon-test-network && set -a && source .env && set +a
bash ./tests/generate_transactions.sh
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)"
cast rpc eth_blockNumber --rpc-url $ETH_RPC_URL
cd jerigon-test-network && set -a && source .env && set +a
bash ./tests/generate_transactions.sh
- name: Run prove blocks with zero tracer in test_only mode
run: |
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)"
ulimit -n 8192
OUTPUT_TO_TERMINAL=true ./scripts/prove_rpc.sh 0x1 0xf $ETH_RPC_URL jerigon true 3000 100 test_only
OUTPUT_TO_TERMINAL=true ./scripts/prove_rpc.sh 1 15 $ETH_RPC_URL jerigon 0 3000 100 test_only
echo "Proving blocks in test_only mode finished"
- name: Run prove blocks with zero tracer in real mode
run: |
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)"
rm -rf proofs/* circuits/* ./proofs.json test.out verify.out leader.out
OUTPUT_TO_TERMINAL=true RUN_VERIFICATION=true ./scripts/prove_rpc.sh 0x2 0x5 $ETH_RPC_URL jerigon true 3000 100
OUTPUT_TO_TERMINAL=true RUN_VERIFICATION=true ./scripts/prove_rpc.sh 2 5 $ETH_RPC_URL jerigon 1 3000 100
echo "Proving blocks in real mode finished"
- name: Shut down network
run: |
kurtosis enclave rm -f cancun-testnet
kurtosis engine stop
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
Loading

0 comments on commit 8e28074

Please sign in to comment.