Skip to content

Commit

Permalink
Merge pull request #173 from bnb-chain/develop
Browse files Browse the repository at this point in the history
chore: merge develop in main
  • Loading branch information
unclezoro authored Oct 28, 2024
2 parents 231d4be + 77d842b commit 6eddfde
Show file tree
Hide file tree
Showing 1,059 changed files with 27,378 additions and 17,269 deletions.
5 changes: 3 additions & 2 deletions .github/assets/check_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ exclude_crates=(
reth-ethereum-payload-builder
reth-etl
reth-evm-ethereum
reth-evm-optimism
reth-execution-errors
reth-exex
reth-exex-test-utils
Expand All @@ -51,8 +50,9 @@ exclude_crates=(
reth-node-ethereum
reth-node-events
reth-node-metrics
reth-node-optimism
reth-optimism-cli
reth-optimism-evm
reth-optimism-node
reth-optimism-payload-builder
reth-optimism-rpc
reth-payload-builder
Expand All @@ -68,6 +68,7 @@ exclude_crates=(
reth-rpc-types
reth-stages
reth-storage-errors
reth-engine-local
# The following are not supposed to be working
reth # all of the crates below
reth-invalid-block-hooks # reth-provider
Expand Down
3 changes: 1 addition & 2 deletions .github/assets/hive/expected_failures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ rpc-compat:
- eth_getBlockByNumber/get-genesis (reth)
- eth_getBlockByNumber/get-latest (reth)
- eth_getBlockByNumber/get-safe (reth)
- eth_sendRawTransaction/send-blob-tx (reth)

# https://github.com/paradigmxyz/reth/issues/8732
# https://github.com/paradigmxyz/reth/issues/8732
engine-withdrawals:
- Withdrawals Fork On Genesis (Paris) (reth)
- Withdrawals Fork on Block 1 (Paris) (reth)
Expand Down
1 change: 0 additions & 1 deletion .github/assets/hive/expected_failures_experimental.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ rpc-compat:
- eth_getBlockByNumber/get-genesis (reth)
- eth_getBlockByNumber/get-latest (reth)
- eth_getBlockByNumber/get-safe (reth)
- eth_sendRawTransaction/send-blob-tx (reth)

# https://github.com/paradigmxyz/reth/issues/8732
engine-withdrawals:
Expand Down
15 changes: 15 additions & 0 deletions .github/assets/kurtosis_network_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
participants:
- el_type: geth
cl_type: lighthouse
- el_type: reth
el_extra_params:
- --engine.experimental
el_image: "ghcr.io/paradigmxyz/reth:kurtosis-ci"
cl_type: teku
additional_services:
- assertoor
assertoor_params:
run_block_proposal_check: true
run_transaction_test: true
run_blob_transaction_test: true
run_opcodes_transaction_test: true
8 changes: 6 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Runs benchmarks.
# Runs benchmarks on serialization/deserialization of storage values and keys.

on:
pull_request:
Expand All @@ -11,6 +11,7 @@ env:
BASELINE: base
IAI_CALLGRIND_RUNNER: iai-callgrind-runner
TOOL_CHAIN: "1.81"
TOOL_CHAIN_NIGHTLY: "nightly-2024-09-09"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -29,7 +30,7 @@ jobs:
run: sudo apt update && sudo apt install valgrind
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.TOOL_CHAIN }}
toolchain: ${{ env.TOOL_CHAIN_NIGHTLY }}
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
Expand All @@ -51,13 +52,16 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref || 'main' }}
# On `main` branch, generates test vectors and serializes them to disk using `serde-json`.
- name: Generate test vectors
run: cargo run --bin reth --features dev -- test-vectors tables
# Runs iai and stores `main` baseline report for comparison later on $BASELINE.
- name: Save baseline
run: cargo bench -p reth-db --bench iai --profile profiling --features test-utils -- --save-baseline=$BASELINE
- name: Checkout PR
uses: actions/checkout@v4
with:
clean: false
# Runs iai on incoming merge using previously generated test-vectors and compares the report against `main` report.
- name: Compare PR benchmarks
run: cargo bench -p reth-db --bench iai --profile profiling --features test-utils -- --baseline=$BASELINE
68 changes: 68 additions & 0 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: build-check

on:
pull_request:
branches: [ main, develop ]

env:
CARGO_TERM_COLOR: always
TOOL_CHAIN: "1.81"
TOOL_CHAIN_NIGHTLY: "nightly-2024-09-09"

jobs:
extract-version:
name: extract version
runs-on: ubuntu-latest
steps:
- name: Extract version
run: echo "VERSION=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT
id: extract_version
outputs:
VERSION: ${{ steps.extract_version.outputs.VERSION }}

build:
name: build release
runs-on: ${{ matrix.configs.os }}
needs: extract-version
strategy:
matrix:
configs:
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
profile: maxperf
- target: aarch64-unknown-linux-gnu
os: ubuntu-20.04
profile: maxperf
- target: x86_64-apple-darwin
os: macos-13
profile: maxperf
- target: aarch64-apple-darwin
os: macos-14
profile: maxperf
- target: x86_64-pc-windows-gnu
os: ubuntu-20.04
profile: maxperf
build:
- command: op-build
binary: op-reth
- command: bsc-build
binary: bsc-reth
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.configs.target }}
toolchain: ${{ env.TOOL_CHAIN_NIGHTLY }}
- uses: taiki-e/install-action@cross
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Apple M1 setup
if: matrix.configs.target == 'aarch64-apple-darwin'
run: |
echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV
- name: Build Reth
run: make PROFILE=${{ matrix.configs.profile }} ${{ matrix.build.command }}-${{ matrix.configs.target }}
4 changes: 4 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ env:
OP_DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/op-reth
BSC_DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/bsc-reth
DOCKER_USERNAME: ${{ github.actor }}
TOOL_CHAIN: "1.81"
TOOL_CHAIN_NIGHTLY: "nightly-2024-09-09"

jobs:
build:
Expand All @@ -29,6 +31,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.TOOL_CHAIN_NIGHTLY }}
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/eth-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:

env:
CARGO_TERM_COLOR: always
TOOL_CHAIN: "1.81"
TOOL_CHAIN_NIGHTLY: "nightly-2024-09-09"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -29,6 +31,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.TOOL_CHAIN_NIGHTLY }}
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/hive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:

env:
CARGO_TERM_COLOR: always
TOOL_CHAIN: "1.81"
TOOL_CHAIN_NIGHTLY: "nightly-2024-09-09"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -25,6 +27,8 @@ jobs:
- uses: actions/checkout@v4
- run: mkdir artifacts
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.TOOL_CHAIN_NIGHTLY }}
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
Expand Down Expand Up @@ -259,8 +263,9 @@ jobs:
runs-on:
group: Reth
steps:
- name: Discord Webhook Action
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.RETH_ALERTS_WEBHOOK }}
content: "Failed run: https://github.com/paradigmxyz/reth/actions/runs/${{ github.run_id }}"
- 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 }}
7 changes: 4 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
CARGO_TERM_COLOR: always
SEED: rustethereumethereumrust
TOOL_CHAIN: "1.81"
TOOL_CHAIN_NIGHTLY: "nightly-2024-09-09"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -38,7 +39,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.TOOL_CHAIN }}
toolchain: ${{ env.TOOL_CHAIN_NIGHTLY }}
- name: Install Geth
run: .github/assets/install_geth.sh
- uses: taiki-e/install-action@nextest
Expand All @@ -56,12 +57,12 @@ jobs:
name: Run tests
run: |
cargo nextest run \
--locked -p reth-node-optimism --features "optimism ${{ matrix.extra-features }}"
--locked -p reth-optimism-node --features "optimism ${{ matrix.extra-features }}"
- if: matrix.network == 'bsc'
name: Run tests
run: |
cargo nextest run \
--locked -p reth-node-bsc --features "bsc ${{ matrix.extra-features }}" \
--locked -p reth-bsc-node --features "bsc ${{ matrix.extra-features }}" \
-E "kind(test)"
integration-success:
Expand Down
99 changes: 99 additions & 0 deletions .github/workflows/kurtosis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Runs `assertoor` tests on a `kurtosis` testnet.

name: kurtosis

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

env:
CARGO_TERM_COLOR: always
TOOL_CHAIN: "1.81"
TOOL_CHAIN_NIGHTLY: "nightly-2024-09-09"

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
with:
toolchain: ${{ env.TOOL_CHAIN_NIGHTLY }}
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Build reth
run: |
cargo build --features asm-keccak --profile hivetests --bin reth --locked
mkdir dist && cp ./target/hivetests/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/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: Run kurtosis
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
ethereum_package_args: '.github/assets/kurtosis_network_params.yaml'

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 }}
Loading

0 comments on commit 6eddfde

Please sign in to comment.