Skip to content

Commit

Permalink
feat: support bsc network (paradigmxyz#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
unclezoro authored Jun 18, 2024
1 parent 94e051d commit 9368d40
Show file tree
Hide file tree
Showing 198 changed files with 14,351 additions and 720 deletions.
135 changes: 0 additions & 135 deletions .github/workflows/book.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: integration

on:
pull_request:
branches: [ main, develop ]
merge_group:
push:
branches: [ main ]
Expand All @@ -29,6 +30,8 @@ jobs:
extra-features: ""
- network: optimism
extra-features: "opbnb"
- network: bsc
extra-features: ""
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
Expand All @@ -51,6 +54,12 @@ jobs:
run: |
cargo nextest run \
--locked -p reth-node-optimism --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 }}" \
-E "kind(test)"
sync:
name: sync / 100k blocks
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jobs:
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash
- name: Check workflow files
run: SHELLCHECK_OPTS="-S error" ${{ steps.get_actionlint.outputs.executable }} -color
run: SHELLCHECK_OPTS="-S error" ${{ steps.get_actionlint.outputs.executable }} -color -config-file .github/actionlint.yaml
shell: bash
69 changes: 20 additions & 49 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
- binary: op-reth
network: optimism
extra-features: "opbnb"
- binary: bsc-reth
network: bsc
extra-features: ""
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@clippy
Expand All @@ -33,19 +36,19 @@ jobs:
env:
RUSTFLAGS: -D warnings

clippy:
name: clippy
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo clippy --workspace --lib --examples --tests --benches --all-features --locked
env:
RUSTFLAGS: -D warnings
# clippy:
# name: clippy
# runs-on: ubuntu-latest
# timeout-minutes: 30
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@clippy
# - uses: Swatinem/rust-cache@v2
# with:
# cache-on-failure: true
# - run: cargo clippy --workspace --lib --examples --tests --benches --all-features --locked
# env:
# RUSTFLAGS: -D warnings

crate-checks:
runs-on: ubuntu-latest
Expand All @@ -72,6 +75,9 @@ jobs:
- binary: op-reth
network: optimism
extra-features: "opbnb"
- binary: bsc-reth
network: bsc
extra-features: ""
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
Expand All @@ -84,22 +90,6 @@ jobs:
env:
RUSTFLAGS: -D warnings

docs:
name: docs
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo docs --document-private-items
env:
# Keep in sync with ./book.yml:jobs.build
# This should only add `-D warnings`
RUSTDOCFLAGS: --cfg docsrs --show-type-layout --generate-link-to-definition --enable-index-page -Zunstable-options -D warnings

fmt:
name: fmt
runs-on: ubuntu-latest
Expand All @@ -111,25 +101,6 @@ jobs:
components: rustfmt
- run: cargo fmt --all --check

book:
name: book
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.76" # MSRV
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo build --bin reth --workspace --features ethereum
env:
RUSTFLAGS: -D warnings
- run: ./book/cli/update.sh target/debug/reth
- name: Check book changes
run: git diff --exit-code

codespell:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand All @@ -153,7 +124,7 @@ jobs:
name: lint success
runs-on: ubuntu-latest
if: always()
needs: [clippy-binaries, clippy, crate-checks, docs, fmt, book, codespell, grafana]
needs: [clippy-binaries, crate-checks, fmt, codespell, grafana]
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
binary: reth
- command: op-build
binary: op-reth
- command: bsc-build
binary: bsc-reth
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -103,7 +105,7 @@ jobs:

draft-release:
name: draft release
needs: [build, extract-version]
needs: [ build, extract-version ]
runs-on: ubuntu-latest
env:
VERSION: ${{ needs.extract-version.outputs.VERSION }}
Expand Down Expand Up @@ -175,7 +177,7 @@ jobs:
[See pre-built binaries documentation.](https://paradigmxyz.github.io/reth/installation/binaries.html)
The binaries are signed with the PGP key: `A3AE 097C 8909 3A12 4049 DF1F 5391 A3C4 1005 30B4`
The binaries are signed with the PGP key: `AF7E D99D 20EA 1CEE F7B4 9919 B9E4 60DC F154 9D61`
| System | Architecture | Binary | PGP Signature |
|:---:|:---:|:---:|:---|
Expand All @@ -186,7 +188,7 @@ jobs:
| <img src="https://simpleicons.org/icons/apple.svg" style="width: 32px;"/> | aarch64 | [reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz.asc) |
| | | | |
| **System** | **Option** | - | **Resource** |
| <img src="https://simpleicons.org/icons/docker.svg" style="width: 32px;"/> | Docker | | [${{ env.IMAGE_NAME }}](https://github.com/paradigmxyz/reth/pkgs/container/reth) |
| <img src="https://simpleicons.org/icons/docker.svg" style="width: 32px;"/> | Docker | | [${{ env.IMAGE_NAME }}](https://github.com/bnb-chain/reth/pkgs/container/reth) |
ENDBODY
)
assets=()
Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ name: unit

on:
pull_request:
branches: [main, develop]
merge_group:
push:
branches: [ main ]
branches: [main]

env:
CARGO_TERM_COLOR: always
Expand All @@ -18,14 +19,14 @@ concurrency:

jobs:
test:
name: test / ${{ matrix.network }} (${{ matrix.partition }}/2)
name: test / ${{ matrix.network }} (${{ matrix.partition }}/3)
runs-on: [ bnb-chain-ap-qa-cicd-runners ]
env:
RUST_BACKTRACE: 1
strategy:
matrix:
partition: [ 1, 2 ]
network: [ ethereum, optimism ]
partition: [ 1, 2, 3 ]
network: [ ethereum, optimism, bsc ]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
Expand All @@ -40,15 +41,24 @@ jobs:
cargo nextest run \
--locked --features "asm-keccak ${{ matrix.network }}" \
--workspace --exclude examples --exclude ef-tests \
--partition hash:${{ matrix.partition }}/2 \
--partition hash:${{ matrix.partition }}/3 \
-E "!kind(test)"
- if: matrix.network == 'optimism'
name: Run tests
run: |
cargo nextest run \
--locked --features "asm-keccak ${{ matrix.network }} opbnb" \
--workspace --exclude examples --exclude ef-tests \
--partition hash:${{ matrix.partition }}/2 \
--workspace --exclude examples --exclude ef-tests --exclude reth-node-ethereum \
--partition hash:${{ matrix.partition }}/3 \
-E "!kind(test)"
- if: matrix.network == 'bsc'
name: Run tests
run: |
cargo nextest run \
--locked --features "asm-keccak ${{ matrix.network }}" \
--workspace --exclude examples --exclude exex-rollup --exclude ef-tests --exclude reth-beacon-consensus \
--exclude reth-blockchain-tree --exclude reth-node-ethereum --exclude reth-rpc-engine-api \
--partition hash:${{ matrix.partition }}/3 \
-E "!kind(test)"
state:
Expand Down Expand Up @@ -88,6 +98,8 @@ jobs:
extra-features: ""
- network: optimism
extra-features: "opbnb"
- network: bsc
extra-features: ""
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand Down
Loading

0 comments on commit 9368d40

Please sign in to comment.