Skip to content

Commit

Permalink
Merge branch 'main' into feat/op-mainnet-pre-bedrock-warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Nov 14, 2024
2 parents 2abf0a2 + 68a6ada commit ccf7498
Show file tree
Hide file tree
Showing 614 changed files with 16,376 additions and 9,002 deletions.
1 change: 1 addition & 0 deletions .config/zepter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ workflows:
# Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually.
"--left-side-feature-missing=ignore",
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.

"--left-side-outside-workspace=ignore",
# Auxillary flags:
"--offline",
Expand Down
1 change: 0 additions & 1 deletion .github/assets/check_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ exclude_crates=(
# The following are not working yet, but known to be fixable
reth-exex-types # https://github.com/paradigmxyz/reth/issues/9946
# The following require investigation if they can be fixed
reth-auto-seal-consensus
reth-basic-payload-builder
reth-beacon-consensus
reth-bench
Expand Down
15 changes: 15 additions & 0 deletions .github/assets/kurtosis_op_network_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ethereum_package:
participants:
- el_type: reth
cl_type: lighthouse
optimism_package:
chains:
- participants:
- el_type: op-geth
cl_type: op-node
- el_type: op-reth
el_image: "ghcr.io/paradigmxyz/op-reth:kurtosis-ci"
cl_type: op-node
batcher_params:
extra_params:
- "--throttle-interval=0"
3 changes: 2 additions & 1 deletion .github/workflows/compact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ jobs:
ref: ${{ github.base_ref || 'main' }}
# On `main` branch, generates test vectors and serializes them to disk using `Compact`.
- name: Generate compact vectors
run: ${{ matrix.bin }} -- test-vectors compact --write
run: |
${{ matrix.bin }} -- test-vectors compact --write
- name: Checkout PR
uses: actions/checkout@v4
with:
Expand Down
119 changes: 119 additions & 0 deletions .github/workflows/kurtosis-op.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Runs simple OP stack setup in Kurtosis

name: kurtosis-op

on:
workflow_dispatch:
schedule:
# every day
- cron: "0 1 * * *"

env:
CARGO_TERM_COLOR: always

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

jobs:
prepare-reth:
if: github.repository == 'paradigmxyz/reth'
timeout-minutes: 45
runs-on:
group: Reth
steps:
- uses: actions/checkout@v4
- run: mkdir artifacts
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Build reth
run: |
cargo build --features optimism,asm-keccak --profile hivetests --bin op-reth --manifest-path crates/optimism/bin/Cargo.toml --locked
mkdir dist && cp ./target/hivetests/op-reth ./dist/reth
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export reth image
uses: docker/build-push-action@v6
with:
context: .
file: .github/assets/hive/Dockerfile
tags: ghcr.io/paradigmxyz/op-reth:kurtosis-ci
outputs: type=docker,dest=./artifacts/reth_image.tar
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Upload reth image
uses: actions/upload-artifact@v4
with:
name: artifacts
path: ./artifacts

test:
timeout-minutes: 60
strategy:
fail-fast: false
name: run kurtosis
runs-on:
group: Reth
needs:
- prepare-reth
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Load Docker image
run: |
docker load -i /tmp/reth_image.tar &
wait
docker image ls -a
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Run kurtosis
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
kurtosis engine start
kurtosis run --enclave op-devnet github.com/ethpandaops/optimism-package --args-file .github/assets/kurtosis_op_network_params.yaml
ENCLAVE_ID=$(curl http://127.0.0.1:9779/api/enclaves | jq --raw-output 'keys[0]')
GETH_PORT=$(curl "http://127.0.0.1:9779/api/enclaves/$ENCLAVE_ID/services" | jq '."op-el-1-op-geth-op-node-op-kurtosis".public_ports.rpc.number')
RETH_PORT=$(curl "http://127.0.0.1:9779/api/enclaves/$ENCLAVE_ID/services" | jq '."op-el-2-op-reth-op-node-op-kurtosis".public_ports.rpc.number')
echo "GETH_RPC=http://127.0.0.1:$GETH_PORT" >> $GITHUB_ENV
echo "RETH_RPC=http://127.0.0.1:$RETH_PORT" >> $GITHUB_ENV
- name: Assert that clients advance
run: |
for i in {1..100}; do
sleep 5
BLOCK_GETH=$(cast bn --rpc-url $GETH_RPC)
BLOCK_RETH=$(cast bn --rpc-url $RETH_RPC)
if [ $BLOCK_GETH -ge 100 ] && [ $BLOCK_RETH -ge 100 ] ; then exit 0; fi
echo "Waiting for clients to advance..., Reth: $BLOCK_RETH Geth: $BLOCK_GETH"
done
exit 1
notify-on-error:
needs: test
if: failure()
runs-on:
group: Reth
steps:
- name: Slack Webhook Action
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "Failed run: https://github.com/paradigmxyz/reth/actions/runs/${{ github.run_id }}"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
matrix:
include:
- type: ethereum
args: --bin reth --workspace --locked
args: --bin reth --workspace --lib --examples --tests --benches --locked
features: "ethereum asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
- type: optimism
args: --bin op-reth --workspace --locked
args: --bin op-reth --workspace --lib --examples --tests --benches --locked
features: "optimism asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
- type: book
args: --manifest-path book/sources/Cargo.toml --workspace --bins
Expand Down
Loading

0 comments on commit ccf7498

Please sign in to comment.