Skip to content

Commit

Permalink
Merge branch 'main' into l2/state_proof
Browse files Browse the repository at this point in the history
  • Loading branch information
xqft committed Nov 1, 2024
2 parents ffad1e2 + 4c18bd4 commit 2c8b6fb
Show file tree
Hide file tree
Showing 137 changed files with 6,912 additions and 3,099 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: CI
on:
merge_group:
push:
branches: [main]
pull_request:
branches: ["*"]
branches: ["**"]
paths-ignore:
- "README.md"
- "LICENSE"
- "**/README.md"
- "**/docs/**"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -19,14 +22,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt, clippy

- name: Add Rust Cache
uses: Swatinem/rust-cache@v2

- name: Run cargo check
run: cargo check

Expand All @@ -36,7 +42,7 @@ jobs:
- name: Run cargo clippy
run: |
cargo clippy --all-targets --all-features --workspace -- -D warnings
cargo clippy --all-targets --all-features --workspace --exclude ethereum_rust-prover -- -D warnings
- name: Run cargo fmt
run: |
Expand All @@ -47,13 +53,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Caching
uses: Swatinem/rust-cache@v2

- name: Download test vectors
run: |
make download-test-vectors
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/ci_skipped.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI Skipped
on:
pull_request:
branches: ["**"]
paths:
- 'README.md'
- 'LICENSE'
- "**/README.md"
- "**/docs/**"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
if: false
steps: [run: true]

test:
name: Test
runs-on: ubuntu-latest
if: false
steps: [run: true]

docker-build:
name: Build Docker image
runs-on: ubuntu-latest
if: false
steps: [run: true]

prover:
name: Build RISC-V zkVM program
runs-on: ubuntu-latest
if: false
steps: [run: true]
60 changes: 0 additions & 60 deletions .github/workflows/hive.yaml

This file was deleted.

124 changes: 124 additions & 0 deletions .github/workflows/hive_and_assertoor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
name: "Hive & Assertoor"
on:
merge_group:
paths-ignore:
- "crates/l2/**"
- 'README.md'
- 'LICENSE'
- "**/README.md"
- "**/docs/**"
pull_request:
branches: ["**"]
paths-ignore:
- "crates/l2/**"
- 'README.md'
- 'LICENSE'
- "**/README.md"
- "**/docs/**"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
RUST_VERSION: 1.80.1

jobs:
docker-build:
name: Docker Build image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
load: true
tags: ethereum_rust
outputs: type=docker,dest=/tmp/ethereum_rust_image.tar

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ethereum_rust_image
path: /tmp/ethereum_rust_image.tar

run-hive:
name: Hive - ${{ matrix.name }}
needs: [docker-build]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- simulation: rpc-compat
name: "Rpc Compat tests"
run_command: make run-hive-on-latest SIMULATION=ethereum/rpc-compat TEST_PATTERN="/eth_chainId|eth_getTransactionByBlockHashAndIndex|eth_getTransactionByBlockNumberAndIndex|eth_getCode|eth_getStorageAt|eth_call|eth_getTransactionByHash|eth_getBlockByHash|eth_getBlockByNumber|eth_createAccessList|eth_getBlockTransactionCountByNumber|eth_getBlockTransactionCountByHash|eth_getBlockReceipts|eth_getTransactionReceipt|eth_blobGasPrice|eth_blockNumber|ethGetTransactionCount|debug_getRawHeader|debug_getRawBlock|debug_getRawTransaction|debug_getRawReceipts|eth_estimateGas|eth_getBalance|eth_sendRawTransaction|eth_getProof|eth_getLogs"
- simulation: rpc-auth
name: "Rpc Auth tests"
run_command: make run-hive-on-latest SIMULATION=ethereum/rpc-compat TEST_PATTERN="/engine-auth"
- simulation: discv4
name: "Devp2p discv4 tests"
run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="discv4"
- simulation: snap
name: "Devp2p snap tests"
run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="/AccountRange"
- simulation: engine
name: "Engine tests"
run_command: make run-hive-on-latest SIMULATION=ethereum/engine TEST_PATTERN="/Blob Transactions On Block 1, Cancun Genesis|Blob Transactions On Block 1, Shanghai Genesis|Blob Transaction Ordering, Single Account, Single Blob|Blob Transaction Ordering, Single Account, Dual Blob|Blob Transaction Ordering, Multiple Accounts|Replace Blob Transactions|Parallel Blob Transactions|ForkchoiceUpdatedV3 Modifies Payload ID on Different Beacon Root|NewPayloadV3 After Cancun|NewPayloadV3 Versioned Hashes|ForkchoiceUpdated Version on Payload Request"
- simulation: engine-cancun
name: "Cancun Engine tests"
run_command: make run-hive-on-latest SIMULATION=ethereum/engine TEST_PATTERN="cancun/Unique Payload ID|ParentHash equals BlockHash on NewPayload|Re-Execute Payload|Payload Build after New Invalid Payload|RPC|Build Payload with Invalid ChainID|Invalid PayloadAttributes, Zero timestamp, Syncing=False|Invalid PayloadAttributes, Parent timestamp, Syncing=False|Invalid PayloadAttributes, Missing BeaconRoot, Syncing=False|Suggested Fee Recipient Test|PrevRandao Opcode Transactions Test|Invalid Missing Ancestor ReOrg, StateRoot"
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: ethereum_rust_image
path: /tmp

- name: Load image
run: |
docker load --input /tmp/ethereum_rust_image.tar
- name: Checkout sources
uses: actions/checkout@v3

- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Setup Go
uses: actions/setup-go@v3

- name: Run Hive Simulation
run: ${{ matrix.run_command }}

run-assertoor:
name: Assertoor - Stability Check
runs-on: ubuntu-latest
needs: [docker-build]
steps:
- uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: ethereum_rust_image
path: /tmp

- name: Load image
run: |
docker load --input /tmp/ethereum_rust_image.tar
- name: Setup kurtosis testnet and run assertoor tests
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
kurtosis_version: '1.3.1'
ethereum_package_url: 'github.com/lambdaclass/ethereum-package'
ethereum_package_branch: 'ethereum-rust-integration'
ethereum_package_args: './test_data/network_params.yaml'
35 changes: 35 additions & 0 deletions .github/workflows/l2_prover_ci.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<<<<<<< HEAD
name: L2_PROVER_CI
on:
push:
branches:
- main
- l2**
- prover**
=======
name: L2 Prover CI
on:
push:
branches: ["main"]
>>>>>>> main
paths:
- "crates/l2/prover/**"
pull_request:
Expand All @@ -17,8 +24,32 @@ concurrency:
cancel-in-progress: true

jobs:
<<<<<<< HEAD
prover:
name: Build RISC-V zkVM program
=======
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
action:
- command: check
args: -p ethereum_rust-prover
- command: clippy
args: -p ethereum_rust-prover --all-targets --no-default-features
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Add Rust Cache
uses: Swatinem/rust-cache@v2
- name: ${{ matrix.action.command }} Command
run: cargo ${{ matrix.action.command }} ${{ matrix.action.args }}

build_and_test:
name: Build and Test RISC-V zkVM program
>>>>>>> main
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand All @@ -38,4 +69,8 @@ jobs:
- name: Test Prover Execution
run: |
cd crates/l2/prover
<<<<<<< HEAD
RISC0_DEV_MODE=1 make perf_test_proving
=======
RUST_LOG=info make perf_test_proving
>>>>>>> main
2 changes: 0 additions & 2 deletions .github/workflows/levm_bench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ name: LEVM benchmarks

on:
merge_group:
push:
paths:
- 'crates/vm/levm/**'
branches: [ main ]
pull_request:
paths:
- 'crates/vm/levm/**'
Expand Down
9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ members = [
"cmd/ethereum_rust_l2",
"crates/vm/levm",
"crates/vm/levm/bench/revm_comparison",
"crates/l2/",
"crates/l2/prover",
"crates/l2/contracts",
]
resolver = "2"
default-members = ["cmd/ethereum_rust", "cmd/ethereum_rust_l2", "crates/l2/prover"]

default-members = [
"cmd/ethereum_rust",
"cmd/ethereum_rust_l2",
"crates/l2/prover",
]

[workspace.package]
version = "0.1.0"
Expand Down
Loading

0 comments on commit 2c8b6fb

Please sign in to comment.