diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml deleted file mode 100644 index 2a437ae9..00000000 --- a/.github/workflows/Release.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Release - -on: - release: - types: [created] - -jobs: - build-release-assets: - name: build-release-assets - # This permissions block is the required change - permissions: - contents: write - strategy: - matrix: - include: - - target: x86_64-unknown-linux-gnu - os: ubuntu-latest - - target: x86_64-unknown-linux-musl - os: ubuntu-latest - - target: x86_64-apple-darwin - os: macos-latest - runs-on: ${{ matrix.os }} - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - # Full history + tags so `git describe --tags` in build.rs can resolve - # the release tag into RETH_BSC_VERSION (e.g. 0.1.0-fix). - fetch-depth: 0 - - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: ${{ matrix.target }} - override: true - - - name: Install system dependencies (Ubuntu) - if: startsWith(matrix.os, 'ubuntu') && matrix.target != 'x86_64-unknown-linux-musl' - run: sudo apt-get update && sudo apt-get install -y liburing-dev pkg-config libclang-dev - - - name: Install cross for MUSL builds - if: matrix.target == 'x86_64-unknown-linux-musl' - run: | - cargo install cross --git https://github.com/cross-rs/cross - - - name: Build binary - run: | - if [ "${{ matrix.target }}" = "x86_64-unknown-linux-musl" ]; then - cross build --profile maxperf --features jemalloc,asm-keccak --target ${{ matrix.target }} - else - cargo build --profile maxperf --features jemalloc,asm-keccak --target ${{ matrix.target }} - fi - env: - RUSTFLAGS: ${{ matrix.target == 'x86_64-unknown-linux-gnu' && '-C strip=symbols -C target-cpu=native' || matrix.target == 'x86_64-unknown-linux-musl' && '-C strip=symbols -C target-feature=+crt-static -C default-linker-libraries -Clink-arg=-static-libgcc' || '-C strip=symbols' }} - - - name: Prepare artifact - run: | - set -e - bin_name="reth-bsc" - tag_name="${{ github.ref_name }}" - asset_name="${bin_name}-${tag_name}-${{ matrix.target }}" - mkdir -p "${asset_name}" - cp "target/${{ matrix.target }}/maxperf/${bin_name}" "${asset_name}/" - tar -czvf "${asset_name}.tar.gz" "${asset_name}" - echo "ASSET_NAME=${asset_name}.tar.gz" >> $GITHUB_ENV - - - name: Upload release asset - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - uses: softprops/action-gh-release@v1 - with: - files: ${{ env.ASSET_NAME }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40969b52..c89d9b60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ name: Continuous Integration +env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" + on: + workflow_dispatch: push: branches: - "**" @@ -14,6 +18,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + # Git dependencies pinned to the private pinax-network org (if any) need a + # read token; the rewrite is scoped to that prefix so public fetches stay + # anonymous. Unused when nothing is pinned there. + - name: Configure git credentials for private crates + run: git config --global url."https://x-access-token:${{ secrets.PAT_INTERNAL_REPOSITORIES }}@github.com/pinax-network/".insteadOf "https://github.com/pinax-network/" - name: Install system dependencies run: sudo apt-get update && sudo apt-get install -y liburing-dev pkg-config libclang-dev - uses: actions-rs/toolchain@v1 @@ -29,6 +38,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + # Git dependencies pinned to the private pinax-network org (if any) need a + # read token; the rewrite is scoped to that prefix so public fetches stay + # anonymous. Unused when nothing is pinned there. + - name: Configure git credentials for private crates + run: git config --global url."https://x-access-token:${{ secrets.PAT_INTERNAL_REPOSITORIES }}@github.com/pinax-network/".insteadOf "https://github.com/pinax-network/" - name: Install system dependencies run: sudo apt-get update && sudo apt-get install -y liburing-dev pkg-config libclang-dev - uses: actions-rs/toolchain@v1 @@ -45,6 +59,11 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v4 + # Git dependencies pinned to the private pinax-network org (if any) need a + # read token; the rewrite is scoped to that prefix so public fetches stay + # anonymous. Unused when nothing is pinned there. + - name: Configure git credentials for private crates + run: git config --global url."https://x-access-token:${{ secrets.PAT_INTERNAL_REPOSITORIES }}@github.com/pinax-network/".insteadOf "https://github.com/pinax-network/" - name: Install system dependencies run: sudo apt-get update && sudo apt-get install -y liburing-dev pkg-config libclang-dev - uses: actions-rs/toolchain@v1 @@ -62,6 +81,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + # Git dependencies pinned to the private pinax-network org (if any) need a + # read token; the rewrite is scoped to that prefix so public fetches stay + # anonymous. Unused when nothing is pinned there. + - name: Configure git credentials for private crates + run: git config --global url."https://x-access-token:${{ secrets.PAT_INTERNAL_REPOSITORIES }}@github.com/pinax-network/".insteadOf "https://github.com/pinax-network/" - name: Install system dependencies run: sudo apt-get update && sudo apt-get install -y liburing-dev pkg-config libclang-dev - uses: actions-rs/toolchain@v1 diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml deleted file mode 100644 index 242cbda5..00000000 --- a/.github/workflows/docker-publish.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: Build and Publish Docker Image - -on: - push: - tags: - - 'v*' - workflow_dispatch: - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - build-amd64: - runs-on: ubuntu-latest # x86_64 runner - permissions: - contents: read - packages: write - outputs: - digest: ${{ steps.build.outputs.digest }} - steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-buildx-action@v3 - - - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push (AMD64) - id: build - uses: docker/build-push-action@v5 - with: - context: . - platforms: linux/amd64 - push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-amd64 - cache-from: type=gha,scope=amd64 - cache-to: type=gha,mode=max,scope=amd64 - provenance: false - - build-arm64: - runs-on: ubuntu-24.04-arm - permissions: - contents: read - packages: write - outputs: - digest: ${{ steps.build.outputs.digest }} - steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-buildx-action@v3 - - - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push (ARM64) - id: build - uses: docker/build-push-action@v5 - with: - context: . - platforms: linux/arm64 - push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-arm64 - cache-from: type=gha,scope=arm64 - cache-to: type=gha,mode=max,scope=arm64 - provenance: false - - merge-manifests: - needs: [build-amd64, build-arm64] - runs-on: ubuntu-latest - permissions: - packages: write - steps: - - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Create multi-arch manifest - run: | - docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} \ - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-amd64 \ - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-arm64 - - docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} - - if [[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \ - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-amd64 \ - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-arm64 - docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest - fi diff --git a/.github/workflows/lockfile.yml b/.github/workflows/lockfile.yml new file mode 100644 index 00000000..f1c0213c --- /dev/null +++ b/.github/workflows/lockfile.yml @@ -0,0 +1,55 @@ +# Keeps Cargo.lock consistent on the Firehose branches without a local Rust +# toolchain: after a rebase of the Firehose series onto a new upstream commit the +# lockfile is taken from upstream and lacks the Firehose crates' entries. This +# job runs `cargo fetch`, which adds/updates only what the manifests require +# (unlike `cargo generate-lockfile`, it does not re-resolve unrelated deps), and +# commits the result back to the branch. The commit is made with the default +# GITHUB_TOKEN, which does not trigger push workflows, so this cannot loop; the +# job therefore dispatches ci.yml and the Docker build explicitly so the repaired +# lockfile is the commit that gets verified, not the stale one before it. +# +# Reth crates are pinned by tag, so `cargo fetch` can only add entries for new +# dependencies; it cannot move the reth layer to a different commit. +name: Update Cargo.lock + +on: + push: + branches: + - "release/**" + paths: + - "Cargo.toml" + - "Cargo.lock" + - "**/Cargo.toml" + workflow_dispatch: + +permissions: + contents: write + actions: write + +jobs: + lockfile: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref_name }} + - uses: dtolnay/rust-toolchain@stable + - name: Resolve lockfile + run: cargo fetch --locked || cargo fetch + - name: Commit if changed + run: | + if git diff --quiet -- Cargo.lock; then echo "Cargo.lock already consistent"; exit 0; fi + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add Cargo.lock + git commit -m "Update Cargo.lock for the Firehose crates" -m "Generated by .github/workflows/lockfile.yml (cargo fetch) after the Firehose series was rebased." + git push origin HEAD:${{ github.ref_name }} + echo "pushed=true" >> "$GITHUB_OUTPUT" + id: commit + - name: Verify the repaired lockfile + if: steps.commit.outputs.pushed == 'true' + env: + GH_TOKEN: ${{ github.token }} + run: | + gh workflow run ci.yml --ref "${{ github.ref_name }}" + gh workflow run sf-release.yml --ref "${{ github.ref_name }}" diff --git a/.github/workflows/sf-release.yml b/.github/workflows/sf-release.yml new file mode 100644 index 00000000..917e337f --- /dev/null +++ b/.github/workflows/sf-release.yml @@ -0,0 +1,186 @@ +# Firehose Docker image build, push and (on tag) release. +# +# Inherited from the StreamingFast fork and maintained by Pinax here; +# intentionally kept separate from upstream CI so that upstream merges stay +# clean. If a git dependency is pinned to the private pinax-network org (for +# example a pinax-network/reth fork), the Docker build receives the +# `PAT_INTERNAL_REPOSITORIES` secret as the `github_token` build secret and +# Dockerfile.sf applies it to pinax-network/* URLs only; public dependencies are +# always fetched anonymously. With no such pin the secret is unused. +# +# Triggers: `firehose/*` branch pushes, `*-fh*` tags, pull requests and manual +# dispatch. Pull requests opened from a fork get a read-only GITHUB_TOKEN, so the +# login/push steps are skipped for them (the image still builds, to validate the +# Dockerfile); same-repo ("inner") PRs, branch pushes and tag pushes authenticate +# and push normally. Only tag builds use the full-LTO `maxperf` profile. +# +# Single architecture (linux/amd64): the `reth-bsc` `maxperf` full-node build is too +# heavy to reliably build on GitHub-hosted arm64 runners, so we do not produce a +# multi-arch manifest. Re-introduce a matrix + manifest-merge job here if arm64 +# becomes worthwhile. +# +# Tag naming: `-fh-` for releases built on an upstream tag; +# `dev--fh-` for builds on an upstream branch commit. `dev-` +# tags build with the same `maxperf` profile but are published as prereleases and +# never move the `latest` image tag. +name: Build, push and release (if tag) + +on: + push: + tags: + - "*-fh*" + pull_request: + workflow_dispatch: + inputs: + firehose_ethereum: + description: "Bundled Firehose Ethereum (fireeth) image tag" + required: false + default: "latest" + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + runs-on: ubuntu-24.04 + + permissions: + contents: read + packages: write + + env: + # Tag pushes, branch pushes, same-repo PRs and manual dispatch can + # authenticate to ghcr and push images. A PR opened from a fork gets a + # read-only GITHUB_TOKEN with no `packages: write`, so we must skip login + # and push for it — the build still runs to validate the Dockerfile + # compiles. The value is the string "true"/"false". + IS_EXTERNAL_PR: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + if: env.IS_EXTERNAL_PR != 'true' + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract version + id: extract-version + run: | + version="edge" + if [[ "${GITHUB_REF}" == refs/tags/* ]]; then + version=${GITHUB_REF#refs/tags/} + fi + # Docker tags forbid `/`; a tag (or ref) containing slashes would make + # the `-` tag invalid. Match docker/metadata-action's own + # sanitization by replacing `/` with `-`. + version=${version//\//-} + echo "VERSION=${version}" >> "$GITHUB_OUTPUT" + + - name: Generate docker tags/labels from github build context + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # The version-suffixed sha tag uniquely identifies the image for a given + # build, appending the extracted version (either `edge` or the tag). This + # avoids a race condition when a tag and its branch are pushed together: + # both builds run on the same commit and would otherwise push the same + # `` tag, with the last writer winning and possibly clobbering the + # tag build's version label. The `-` tag stays distinct + # (`-edge` vs `-v2.2.0-fh1`), and the `release` job below + # reads `-` so it always picks up the correct image. + tags: | + type=ref,event=tag,prefix= + type=ref,event=branch + type=ref,event=pr + type=sha,prefix= + type=sha,prefix=,suffix=-${{ steps.extract-version.outputs.VERSION }} + type=edge + flavor: | + latest=${{ startsWith(github.ref, 'refs/tags/') && !startsWith(github.ref, 'refs/tags/dev-') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc') && !contains(github.ref, 'alpha') }} + + - name: Build and push Docker image (linux/amd64) + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile.sf + platforms: linux/amd64 + push: ${{ env.IS_EXTERNAL_PR != 'true' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + provenance: false + # Cache the cargo-chef dependency layer across runs (ephemeral runners + # otherwise cold-rebuild all deps every time). Keyed per profile by + # buildx, so branch/PR (release) and tag (maxperf) caches stay separate. + cache-from: type=gha + cache-to: type=gha,mode=max + # Optional read token for git dependencies pinned to the private + # pinax-network org (see header and Dockerfile.sf); unused when none + # are. Mounted as a BuildKit secret, never baked into a layer. + secrets: | + github_token=${{ secrets.PAT_INTERNAL_REPOSITORIES }} + build-args: | + VERSION=${{ steps.extract-version.outputs.VERSION }} + FIREHOSE_ETHEREUM=${{ inputs.firehose_ethereum || 'latest' }} + # Full LTO `maxperf` is only worth its long link tail for shippable + # stable builds. Pre-release tags (beta/rc/alpha), PRs and manual + # dispatch use the `release` profile (thin LTO) to iterate faster. + BUILD_PROFILE=${{ (startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc') && !contains(github.ref, 'alpha')) && 'maxperf' || 'release' }} + + release: + if: startsWith(github.ref, 'refs/tags/') + needs: build + runs-on: ubuntu-24.04 + + permissions: + contents: write + + steps: + - name: Docker login + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract image + id: image + run: | + version=${GITHUB_REF#refs/tags/} + # Match the sanitization done in the build job's "Extract version" step + # so this ID resolves to the same `-` image tag. + version=${version//\//-} + echo "ID=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_SHA::7}-${version}" >> "$GITHUB_OUTPUT" + + - name: Extract assets + run: | + # The --platform is not strictly needed for a single-arch image, but it + # silences the buildx warning. + docker cp $(docker create --platform=linux/amd64 ${{ steps.image.outputs.ID }}):/usr/local/bin/reth-bsc ./reth-bsc_linux_amd64 + + - name: Extract Changelog + id: changelog + run: | + curl -L https://github.com/streamingfast/sfreleaser/releases/download/v0.12.1/sfreleaser_linux_x86_64.tar.gz | tar -xz + chmod +x sfreleaser + + ./sfreleaser changelog extract-section \ + github://token:${{ github.token }}@${{ github.repository }}/$GITHUB_SHA/CHANGELOG.md \ + --github-output="changelog:$GITHUB_OUTPUT" + + - name: Release + uses: softprops/action-gh-release@v2 + with: + body: ${{ steps.changelog.outputs.changelog }} + prerelease: ${{ startsWith(github.ref, 'refs/tags/dev-') || contains(github.ref, 'beta') || contains(github.ref, 'rc') || contains(github.ref, 'alpha') }} + files: | + ./reth-bsc_linux_amd64 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..4184c317 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,171 @@ +# Changelog + +All notable changes to the Pinax-maintained Firehose fork of bnb-chain/reth-bsc are documented +here. Entries up to `v0.1.1-fh` were written by StreamingFast in `streamingfast/reth-bsc`, from +which this fork was seeded. + +This changelog covers Firehose-specific changes only. For upstream changes, see the +[bnb-chain/reth-bsc repository](https://github.com/bnb-chain/reth-bsc). + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +## dev-049d306-fh3.1-1 + +Firehose build of upstream `develop` commit `049d3065` ("fix: refine new-payload/fcu flow to +avoid memory accumulation", bnb-chain/reth-bsc #501; upstream `v0.1.2` + 15 commits). First +release cut from an upstream commit rather than an upstream tag, using the +`release/-fh` branch model: the StreamingFast Firehose series as of `v0.1.1-fh3.1` +replayed onto `049d3065`. + +### Changed + +- `reth-*` crates come from `pinax-network/bnb-reth` tag `bnb-bf76323c-fh3.1-1` (branch + `firehose/develop`): bnb-chain/reth `bf76323c` (what `049d3065`'s lockfile resolves + `branch = "develop"` to) plus StreamingFast's 17 Firehose hook commits from `bnb-v0.1.1-fh3.1` + and a regenerated lockfile. Public repository, no token needed. +- Two glue conflicts resolved against upstream changes since `v0.1.1`: the Pasteur contract + upgrade path now both reports the code change to the state hook (upstream's bsc-qanet root + fix) and emits the Firehose `on_code_change` event; internal consensus `eth_call`s use + upstream's `view_call_tx_env()` helper with Firehose tracing suspended around them. +- `dev-*` tags are published as prereleases and never move the `latest` image tag. +- The `v0.1.1-fh3.1-1` clippy fix is not needed here: upstream already rewrote that code. + +## v0.1.1-fh3.1-1 + +First release built from `pinax-network/reth-bsc`. `Cargo.toml` and `Cargo.lock` are identical +to StreamingFast's `v0.1.1-fh3.1` (`56c35604c`), so `--locked` resolves exactly the dependency +bytes StreamingFast shipped: `streamingfast/reth` tag `bnb-v0.1.1-fh3.1` and `streamingfast/evm` +`sf/v0.34.0`. One source file differs (see Fixed). + +### Fixed + +- `read_all_system_contracts` initialises `dir` at its declaration (clippy 1.98 + `needless_late_init`, which `ci.yml` runs with `-D warnings` on unpinned stable). Same behaviour; + the identical failure shows on `streamingfast/reth-bsc` `release/0.1.x`. + +### Changed + +- Release pipeline runs in this repository: images publish to `ghcr.io//reth-bsc` + and the `reth-bsc_linux_amd64` asset attaches to the GitHub release here. +- Docker build and CI can authenticate git for dependencies pinned to the private + `pinax-network` org (secret `PAT_INTERNAL_REPOSITORIES`, applied to `pinax-network/*` URLs + only). Byte-identical mirrors of the two StreamingFast dependencies exist at + `pinax-network/reth` (`release/bnb-0.x`, tag `bnb-v0.1.1-fh3.1`) and `pinax-network/evm` + (`sf/v0.34.0`) for the day the pins move off `streamingfast/*`. + +## v0.1.1-fh + +Release ready for prime time + + +## v0.1.1-fh-beta-13 + +### Fixed + +- Include the SELFDESTRUCT refund when resolving an account's post-transaction balance + (`streamingfast/bnb-reth` port of `streamingfast/reth` `v2.3.0-fh-7`). On the truly-destroyed + path (EIP-6780: contract created in the same transaction, or pre-Cancun) revm credits the + beneficiary in place and records the move only inside its `AccountDestroyed` journal entry — no + `BalanceTransfer` is pushed — so the journal walk backing the `RewardTransactionFee` and + `GasRefund` events missed it. A coinbase or sender that received a suicide refund then reported + an `old_balance` contradicting the `SuicideRefund` event emitted moments earlier. + +## v0.1.1-fh-beta-12 + +### Fixed + +- Restored two beta-4/6 fixes dropped during the v0.1.1 rebase: the EIP-2935 + history-storage system call is captured again (`transact_system_call` routes through the + inspector when tracing), and the canonical block size again excludes blob sidecars. + (beta-10/11 traces were missing `system_calls` entirely and misreported `size` on blob + blocks.) + +## v0.1.1-fh-beta-10 + +### Changed + +- Rebased onto upstream `v0.1.1` (`457f81a`): Pasteur mainnet activation scheduled + (2026-08-25), upstream network/blocks-by-range improvements, and the new + `bnb-chain/reth` pin (`c13b0986`) which streams finalization-appended (system-tx) + receipts to the engine receipt-root task. The Firehose fork of the reth crates moved to + `streamingfast/bnb-reth` branch `firehose/0.1.x-bsc` accordingly, with the same + finalization-receipt streaming mirrored in the Firehose-traced engine execution path. +- Carries the beta-8 hard funding gate (replay funding never active under the Firehose + inspector) and the beta-9 fast RocksDB `TransactionHashNumbers` healing. + +Note: the block 106696194 pipeline divergence (deposit system tx short by one tx fee) is +NOT known to be fixed by this rebase — it reproduces with tracing disabled and is being +reported upstream. + +## v0.1.0-fh-beta-7 + +### Added + +- `FIREHOSE_DISABLED=true` kill-switch: skips tracer initialization entirely, so the node + executes through the plain untraced path, byte-identical to un-instrumented reth-bsc. The + firehose ExEx idles in no-op mode (still advancing `FinishedHeight` so the WAL prunes). Ops + lever for isolating tracing-induced behavior — e.g. the block 106696194 deposit-value + divergence under investigation. + +## v0.1.0-fh-beta-3 + +### Fixed + +- Panic during mainnet sync ("mismatch between call log and receipt log BlockIndex"): system + transactions bypass the generic wrapper's per-transaction log accounting, so a log-bearing + system tx (e.g. the validator deposit) left the block-wide log counter behind and the next + system tx's call logs lagged its receipt logs. The chain executor now reports each system + tx's committed log count and the inspector folds it into block-wide log indices. + +## v0.1.0-fh-beta-2 + +### Fixed + +- Panic during mainnet pipeline sync ("caller expected to be in transaction state"): BSC's + internal consensus reads (validator-set / turn-length `eth_call`s) run on the same + inspector-carrying EVM as real transactions and fired tracer hooks between transactions. + These reads are now executed with Firehose tracing suspended — matching geth, which never + traces them. + +## v0.1.0-fh-beta-1 + +### Fixed + +Parity with the geth-BSC Firehose reference (`streamingfast/go-ethereum`, `release/bnb-1.x-fh3.0`): + +- Transaction fee (and EIP-4844 blob fee) balance changes are now credited to the consensus + `SYSTEM_ADDRESS` (`0xffff…fffe`) instead of the block beneficiary, matching BSC's + fee routing (`REASON_REWARD_TRANSACTION_FEE` / `REASON_REWARD_BLOB_FEE`). +- Parlia system transactions (deposit, slash, finality reward, validator-set update, genesis + and Feynman initialization) are now traced as ordinary transaction traces at their actual + execution point inside the end-of-block finalize step, instead of empty placeholder traces + during body iteration with the real EVM work mis-attributed to a system-call window. +- The `distribute_incoming` sweep (SYSTEM_ADDRESS → validator, a direct non-EVM state write) + now emits its two balance changes (`REASON_REWARD_TRANSACTION_FEE`), like geth's + `BalanceDecrease/IncreaseBSCDistributeReward` hooks. +- System-contract code upgrades and the Prague history-storage deploy (direct non-EVM code + installs) now emit code changes. + +Known divergences from geth, by design or accepted: no gas-change events (dropped in Firehose +Ethereum tracer v5); system-tx sender nonce changes inside the EVM are emitted (geth suppresses +them under its backward-compatibility flag); the pre-Kepler two-step system-reward split emits a +single sweep pair here (modern blocks are identical). + +## v0.1.0-fh-beta + +### Added + +- Firehose instrumentation for BSC: the `reth` crates are consumed from the + [streamingfast/bnb-reth](https://github.com/streamingfast/bnb-reth) fork (branch + `firehose/0.x-bsc`), which carries the `reth-firehose` crate and the engine-tree / + pipeline tracing hooks. The `reth-bsc` binary initializes the process-wide tracer, + wraps `BscEvmConfig` in `FirehoseEvmConfig` (pipeline path), and installs the + Firehose ExEx — every validated block is emitted as a `FIRE BLOCK` line on stdout. +- `Dockerfile.sf` / `sf-release.yml`: Docker image build that bundles `fireeth` driving + `reth-bsc` as its reader node, published to `ghcr.io/streamingfast/reth-bsc`. + +### Fixed + +- A fresh node (still at genesis) could never peer: the chain-spec `head()` helpers leave + the head hash at the zero default, eth/69 status advertised that zero hash, and the + handshake rejects zero blockhashes. The network head now falls back to the genesis hash. diff --git a/Cargo.lock b/Cargo.lock index 9de8b567..3b2469d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -292,8 +292,7 @@ dependencies = [ [[package]] name = "alloy-evm" version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ceeea6dcbbcd4e546b27700763a6f6c3b3fee30054209884f521078b6fda4f" +source = "git+https://github.com/streamingfast/evm.git?branch=sf%2Fv0.34.0#49b4c64c3bc768ef687fdba27b0d9bada749d3e9" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -1594,6 +1593,16 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + [[package]] name = "base64ct" version = "1.8.3" @@ -3764,6 +3773,29 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +[[package]] +name = "firehose-tracer" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68617cc0fb3d0dfb49cbe29f3e05969fcabf93fcecaa1e0fda577c7c6c95494c" +dependencies = [ + "alloy-consensus", + "alloy-eips 2.0.5", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "base64-simd", + "eyre", + "hex 0.4.3", + "k256", + "num_enum", + "prost 0.14.3", + "prost-types 0.14.3", + "serde", + "serde_json", + "tracing", +] + [[package]] name = "fixed-cache" version = "0.1.10" @@ -6338,6 +6370,12 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "outref" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" + [[package]] name = "p256" version = "0.13.2" @@ -6974,6 +7012,15 @@ dependencies = [ "prost 0.12.6", ] +[[package]] +name = "prost-types" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7" +dependencies = [ + "prost 0.14.3", +] + [[package]] name = "pulldown-cmark" version = "0.9.6" @@ -7535,12 +7582,14 @@ checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" [[package]] name = "reth" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ + "alloy-evm", "alloy-primitives", "alloy-rpc-types", "aquamarine", "clap", + "firehose-tracer", "reth-chainspec", "reth-cli-runner", "reth-cli-util", @@ -7548,8 +7597,10 @@ dependencies = [ "reth-consensus-common", "reth-db", "reth-ethereum-cli", + "reth-ethereum-forks", "reth-ethereum-payload-builder", "reth-ethereum-primitives", + "reth-firehose", "reth-network", "reth-network-api", "reth-node-api", @@ -7576,7 +7627,7 @@ dependencies = [ [[package]] name = "reth-basic-payload-builder" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -7586,7 +7637,7 @@ dependencies = [ "metrics", "reth-chain-state", "reth-execution-cache", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-payload-builder", "reth-payload-builder-primitives", "reth-payload-primitives", @@ -7603,7 +7654,7 @@ dependencies = [ [[package]] name = "reth-chain-state" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -7620,7 +7671,7 @@ dependencies = [ "reth-errors", "reth-ethereum-primitives", "reth-execution-types", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-primitives-traits", "reth-storage-api", "reth-trie", @@ -7636,7 +7687,7 @@ dependencies = [ [[package]] name = "reth-chainspec" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-chains", "alloy-consensus", @@ -7656,7 +7707,7 @@ dependencies = [ [[package]] name = "reth-cli" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-genesis", "clap", @@ -7669,7 +7720,7 @@ dependencies = [ [[package]] name = "reth-cli-commands" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-chains", "alloy-consensus", @@ -7759,7 +7810,7 @@ dependencies = [ [[package]] name = "reth-cli-runner" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "reth-tasks", "tokio", @@ -7769,7 +7820,7 @@ dependencies = [ [[package]] name = "reth-cli-util" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", @@ -7818,7 +7869,7 @@ dependencies = [ [[package]] name = "reth-config" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "eyre", "humantime-serde", @@ -7834,7 +7885,7 @@ dependencies = [ [[package]] name = "reth-consensus" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -7847,7 +7898,7 @@ dependencies = [ [[package]] name = "reth-consensus-common" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -7860,7 +7911,7 @@ dependencies = [ [[package]] name = "reth-consensus-debug-client" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -7886,7 +7937,7 @@ dependencies = [ [[package]] name = "reth-db" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "derive_more 2.1.1", @@ -7899,7 +7950,7 @@ dependencies = [ "reth-db-api", "reth-fs-util", "reth-libmdbx", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-nippy-jar", "reth-static-file-types", "reth-storage-errors", @@ -7915,7 +7966,7 @@ dependencies = [ [[package]] name = "reth-db-api" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -7941,7 +7992,7 @@ dependencies = [ [[package]] name = "reth-db-common" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-genesis", @@ -7975,7 +8026,7 @@ dependencies = [ [[package]] name = "reth-db-models" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", @@ -7990,7 +8041,7 @@ dependencies = [ [[package]] name = "reth-discv4" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8015,7 +8066,7 @@ dependencies = [ [[package]] name = "reth-discv5" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8028,7 +8079,7 @@ dependencies = [ "rand 0.9.4", "reth-chainspec", "reth-ethereum-forks", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-network-peers", "secp256k1 0.30.0", "thiserror 2.0.18", @@ -8039,7 +8090,7 @@ dependencies = [ [[package]] name = "reth-dns-discovery" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "dashmap 6.2.1", @@ -8063,7 +8114,7 @@ dependencies = [ [[package]] name = "reth-downloaders" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8079,7 +8130,7 @@ dependencies = [ "reth-config", "reth-consensus", "reth-ethereum-primitives", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-network-p2p", "reth-network-peers", "reth-primitives-traits", @@ -8098,7 +8149,7 @@ dependencies = [ [[package]] name = "reth-ecies" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "aes", "alloy-primitives", @@ -8126,7 +8177,7 @@ dependencies = [ [[package]] name = "reth-engine-local" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8149,7 +8200,7 @@ dependencies = [ [[package]] name = "reth-engine-primitives" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8174,7 +8225,7 @@ dependencies = [ [[package]] name = "reth-engine-tree" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -8201,7 +8252,8 @@ dependencies = [ "reth-evm", "reth-execution-cache", "reth-execution-types", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-firehose", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-network-p2p", "reth-payload-builder", "reth-payload-primitives", @@ -8235,7 +8287,7 @@ dependencies = [ [[package]] name = "reth-engine-util" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-rpc-types-engine", @@ -8263,7 +8315,7 @@ dependencies = [ [[package]] name = "reth-era" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8279,7 +8331,7 @@ dependencies = [ [[package]] name = "reth-era-downloader" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "bytes 1.11.1", @@ -8295,7 +8347,7 @@ dependencies = [ [[package]] name = "reth-era-utils" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8317,7 +8369,7 @@ dependencies = [ [[package]] name = "reth-errors" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "reth-consensus", "reth-execution-errors", @@ -8328,7 +8380,7 @@ dependencies = [ [[package]] name = "reth-eth-wire" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-chains", "alloy-primitives", @@ -8342,7 +8394,7 @@ dependencies = [ "reth-ecies", "reth-eth-wire-types", "reth-ethereum-forks", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-network-peers", "reth-primitives-traits", "serde", @@ -8357,7 +8409,7 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-chains", "alloy-consensus", @@ -8382,7 +8434,7 @@ dependencies = [ [[package]] name = "reth-ethereum-cli" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "clap", "eyre", @@ -8405,7 +8457,7 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8421,7 +8473,7 @@ dependencies = [ [[package]] name = "reth-ethereum-engine-primitives" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", @@ -8437,7 +8489,7 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eip2124", "alloy-hardforks", @@ -8451,7 +8503,7 @@ dependencies = [ [[package]] name = "reth-ethereum-payload-builder" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8481,7 +8533,7 @@ dependencies = [ [[package]] name = "reth-ethereum-primitives" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8495,7 +8547,7 @@ dependencies = [ [[package]] name = "reth-etl" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "rayon", "reth-db-api", @@ -8505,7 +8557,7 @@ dependencies = [ [[package]] name = "reth-evm" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8518,7 +8570,7 @@ dependencies = [ "rayon", "reth-execution-errors", "reth-execution-types", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-primitives-traits", "reth-storage-api", "reth-storage-errors", @@ -8530,7 +8582,7 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8550,14 +8602,14 @@ dependencies = [ [[package]] name = "reth-execution-cache" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "fixed-cache", "metrics", "parking_lot", "reth-errors", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-primitives-traits", "reth-provider", "reth-revm", @@ -8568,7 +8620,7 @@ dependencies = [ [[package]] name = "reth-execution-errors" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-evm", "alloy-primitives", @@ -8581,7 +8633,7 @@ dependencies = [ [[package]] name = "reth-execution-types" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8600,7 +8652,7 @@ dependencies = [ [[package]] name = "reth-exex" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8617,7 +8669,7 @@ dependencies = [ "reth-evm", "reth-exex-types", "reth-fs-util", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-node-api", "reth-node-core", "reth-payload-builder", @@ -8638,7 +8690,7 @@ dependencies = [ [[package]] name = "reth-exex-types" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", @@ -8649,10 +8701,38 @@ dependencies = [ "serde_with", ] +[[package]] +name = "reth-firehose" +version = "2.2.0" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" +dependencies = [ + "alloy-consensus", + "alloy-eip7928", + "alloy-eips 2.0.5", + "alloy-evm", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "eyre", + "firehose-tracer", + "futures", + "reth-chainspec", + "reth-ethereum-forks", + "reth-ethereum-primitives", + "reth-evm", + "reth-execution-types", + "reth-exex", + "reth-node-api", + "reth-primitives-traits", + "reth-provider", + "reth-revm", + "reth-tracing", +] + [[package]] name = "reth-fs-util" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "serde", "serde_json", @@ -8662,7 +8742,7 @@ dependencies = [ [[package]] name = "reth-invalid-block-hooks" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8690,7 +8770,7 @@ dependencies = [ [[package]] name = "reth-ipc" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "bytes 1.11.1", "futures", @@ -8710,7 +8790,7 @@ dependencies = [ [[package]] name = "reth-libmdbx" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "bitflags 2.11.1", "byteorder", @@ -8727,7 +8807,7 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "bindgen", "cc", @@ -8736,7 +8816,7 @@ dependencies = [ [[package]] name = "reth-metrics" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "futures", "metrics", @@ -8762,7 +8842,7 @@ dependencies = [ [[package]] name = "reth-net-banlist" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "ipnet", @@ -8771,7 +8851,7 @@ dependencies = [ [[package]] name = "reth-net-nat" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "futures-util", "if-addrs", @@ -8785,7 +8865,7 @@ dependencies = [ [[package]] name = "reth-network" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8816,7 +8896,7 @@ dependencies = [ "reth-ethereum-primitives", "reth-evm-ethereum", "reth-fs-util", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-net-banlist", "reth-network-api", "reth-network-p2p", @@ -8843,7 +8923,7 @@ dependencies = [ [[package]] name = "reth-network-api" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8868,7 +8948,7 @@ dependencies = [ [[package]] name = "reth-network-p2p" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8891,7 +8971,7 @@ dependencies = [ [[package]] name = "reth-network-peers" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8906,7 +8986,7 @@ dependencies = [ [[package]] name = "reth-network-types" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eip2124", "humantime-serde", @@ -8920,7 +9000,7 @@ dependencies = [ [[package]] name = "reth-nippy-jar" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "anyhow", "bincode", @@ -8937,7 +9017,7 @@ dependencies = [ [[package]] name = "reth-node-api" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-rpc-types-engine", "eyre", @@ -8961,7 +9041,7 @@ dependencies = [ [[package]] name = "reth-node-builder" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -8993,6 +9073,7 @@ dependencies = [ "reth-engine-util", "reth-evm", "reth-exex", + "reth-firehose", "reth-fs-util", "reth-invalid-block-hooks", "reth-network", @@ -9031,7 +9112,7 @@ dependencies = [ [[package]] name = "reth-node-core" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -9086,7 +9167,7 @@ dependencies = [ [[package]] name = "reth-node-ethereum" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eips 2.0.5", "alloy-network", @@ -9124,7 +9205,7 @@ dependencies = [ [[package]] name = "reth-node-ethstats" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -9148,7 +9229,7 @@ dependencies = [ [[package]] name = "reth-node-events" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -9172,7 +9253,7 @@ dependencies = [ [[package]] name = "reth-node-metrics" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "bytes 1.11.1", "eyre", @@ -9185,7 +9266,7 @@ dependencies = [ "metrics-util", "procfs", "reqwest 0.13.4", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-tasks", "tikv-jemalloc-ctl", "tokio", @@ -9196,7 +9277,7 @@ dependencies = [ [[package]] name = "reth-node-types" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "reth-chainspec", "reth-db-api", @@ -9208,7 +9289,7 @@ dependencies = [ [[package]] name = "reth-payload-builder" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -9219,7 +9300,7 @@ dependencies = [ "reth-chain-state", "reth-ethereum-engine-primitives", "reth-execution-cache", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-payload-builder-primitives", "reth-payload-primitives", "reth-primitives-traits", @@ -9232,7 +9313,7 @@ dependencies = [ [[package]] name = "reth-payload-builder-primitives" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "pin-project", "reth-payload-primitives", @@ -9244,7 +9325,7 @@ dependencies = [ [[package]] name = "reth-payload-primitives" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -9268,7 +9349,7 @@ dependencies = [ [[package]] name = "reth-payload-validator" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-rpc-types-engine", @@ -9310,7 +9391,7 @@ dependencies = [ [[package]] name = "reth-provider" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -9334,7 +9415,7 @@ dependencies = [ "reth-ethereum-primitives", "reth-execution-types", "reth-fs-util", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-nippy-jar", "reth-node-types", "reth-primitives-traits", @@ -9359,7 +9440,7 @@ dependencies = [ [[package]] name = "reth-prune" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -9371,7 +9452,7 @@ dependencies = [ "reth-db-api", "reth-errors", "reth-exex-types", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-primitives-traits", "reth-provider", "reth-prune-types", @@ -9388,7 +9469,7 @@ dependencies = [ [[package]] name = "reth-prune-types" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "arbitrary", @@ -9404,7 +9485,7 @@ dependencies = [ [[package]] name = "reth-revm" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9419,7 +9500,7 @@ dependencies = [ [[package]] name = "reth-rpc" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -9462,7 +9543,7 @@ dependencies = [ "reth-evm", "reth-evm-ethereum", "reth-execution-types", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-network-api", "reth-network-peers", "reth-network-types", @@ -9497,7 +9578,7 @@ dependencies = [ [[package]] name = "reth-rpc-api" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eips 2.0.5", "alloy-genesis", @@ -9527,7 +9608,7 @@ dependencies = [ [[package]] name = "reth-rpc-builder" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-network", "alloy-provider", @@ -9542,7 +9623,7 @@ dependencies = [ "reth-engine-primitives", "reth-evm", "reth-ipc", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-network-api", "reth-node-core", "reth-payload-primitives", @@ -9570,7 +9651,7 @@ dependencies = [ [[package]] name = "reth-rpc-convert" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-evm", @@ -9591,7 +9672,7 @@ dependencies = [ [[package]] name = "reth-rpc-engine-api" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", @@ -9603,7 +9684,7 @@ dependencies = [ "metrics", "reth-chainspec", "reth-engine-primitives", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-network-api", "reth-payload-builder", "reth-payload-builder-primitives", @@ -9622,7 +9703,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-api" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -9670,7 +9751,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-types" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -9695,7 +9776,7 @@ dependencies = [ "reth-ethereum-primitives", "reth-evm", "reth-execution-types", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-primitives-traits", "reth-revm", "reth-rpc-convert", @@ -9719,7 +9800,7 @@ dependencies = [ [[package]] name = "reth-rpc-layer" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-rpc-types-engine", "http 1.4.1", @@ -9733,7 +9814,7 @@ dependencies = [ [[package]] name = "reth-rpc-server-types" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", @@ -9763,7 +9844,7 @@ dependencies = [ [[package]] name = "reth-stages" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -9818,7 +9899,7 @@ dependencies = [ [[package]] name = "reth-stages-api" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", @@ -9829,7 +9910,7 @@ dependencies = [ "reth-codecs", "reth-consensus", "reth-errors", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-network-p2p", "reth-primitives-traits", "reth-provider", @@ -9846,7 +9927,7 @@ dependencies = [ [[package]] name = "reth-stages-types" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "arbitrary", @@ -9860,7 +9941,7 @@ dependencies = [ [[package]] name = "reth-static-file" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "parking_lot", @@ -9880,7 +9961,7 @@ dependencies = [ [[package]] name = "reth-static-file-types" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "clap", @@ -9895,7 +9976,7 @@ dependencies = [ [[package]] name = "reth-storage-api" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -9919,7 +10000,7 @@ dependencies = [ [[package]] name = "reth-storage-errors" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", @@ -9937,7 +10018,7 @@ dependencies = [ [[package]] name = "reth-tasks" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "crossbeam-utils", "dashmap 6.2.1", @@ -9947,7 +10028,7 @@ dependencies = [ "parking_lot", "pin-project", "rayon", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "thiserror 2.0.18", "thread-priority", "tokio", @@ -9958,7 +10039,7 @@ dependencies = [ [[package]] name = "reth-testing-utils" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -9974,7 +10055,7 @@ dependencies = [ [[package]] name = "reth-tokio-util" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "tokio", "tokio-stream", @@ -9984,7 +10065,7 @@ dependencies = [ [[package]] name = "reth-tracing" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "clap", "eyre", @@ -9999,7 +10080,7 @@ dependencies = [ [[package]] name = "reth-tracing-otlp" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "clap", "eyre", @@ -10017,7 +10098,7 @@ dependencies = [ [[package]] name = "reth-transaction-pool" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -10041,7 +10122,7 @@ dependencies = [ "reth-evm-ethereum", "reth-execution-types", "reth-fs-util", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-primitives-traits", "reth-storage-api", "reth-tasks", @@ -10062,7 +10143,7 @@ dependencies = [ [[package]] name = "reth-trie" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", @@ -10074,7 +10155,7 @@ dependencies = [ "metrics", "parking_lot", "reth-execution-errors", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-primitives-traits", "reth-stages-types", "reth-storage-errors", @@ -10088,7 +10169,7 @@ dependencies = [ [[package]] name = "reth-trie-common" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10117,14 +10198,14 @@ dependencies = [ [[package]] name = "reth-trie-db" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "metrics", "parking_lot", "reth-db-api", "reth-execution-errors", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-primitives-traits", "reth-stages-types", "reth-storage-api", @@ -10138,7 +10219,7 @@ dependencies = [ [[package]] name = "reth-trie-parallel" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-eip7928", "alloy-evm", @@ -10151,7 +10232,7 @@ dependencies = [ "metrics", "rayon", "reth-execution-errors", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-primitives-traits", "reth-provider", "reth-storage-errors", @@ -10166,7 +10247,7 @@ dependencies = [ [[package]] name = "reth-trie-sparse" version = "2.2.0" -source = "git+https://github.com/bnb-chain/reth.git?branch=develop#bf76323c2d292448b22d16f91a7b5067231a9a1a" +source = "git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1#1fccff496cfcbfeff9402a4879d73edd0c311f77" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -10174,7 +10255,7 @@ dependencies = [ "metrics", "rayon", "reth-execution-errors", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-primitives-traits", "reth-trie-common", "serde", @@ -10232,6 +10313,7 @@ dependencies = [ "either", "eth-keystore", "eyre", + "firehose-tracer", "futures", "hex 0.4.3", "jsonrpsee", @@ -10271,8 +10353,9 @@ dependencies = [ "reth-evm", "reth-evm-ethereum", "reth-execution-types", + "reth-firehose", "reth-ipc", - "reth-metrics 2.2.0 (git+https://github.com/bnb-chain/reth.git?branch=develop)", + "reth-metrics 2.2.0 (git+https://github.com/pinax-network/bnb-reth.git?tag=bnb-bf76323c-fh3.1-1)", "reth-network", "reth-network-api", "reth-network-p2p", @@ -12905,6 +12988,12 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "wait-timeout" version = "0.2.1" diff --git a/Cargo.toml b/Cargo.toml index 30c0a3fe..0ceeb627 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,61 +16,65 @@ name = "reth-bsc" path = "src/main.rs" [dependencies] -reth = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-cli = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-cli-commands = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-basic-payload-builder = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-db = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-engine-local = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-engine-tree = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-node-builder = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-chainspec = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-cli-util = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-discv4 = { git = "https://github.com/bnb-chain/reth.git", branch = "develop", features = [ +reth = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-cli = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-cli-commands = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-basic-payload-builder = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-db = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-engine-local = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-engine-tree = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-node-builder = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-chainspec = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-cli-util = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-discv4 = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1", features = [ "test-utils", ] } -reth-engine-primitives = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-ethereum-forks = { git = "https://github.com/bnb-chain/reth.git", branch = "develop", features = [ +reth-engine-primitives = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-ethereum-forks = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1", features = [ "serde", ] } -reth-ethereum-payload-builder = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-payload-builder-primitives = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-chain-state = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-ethereum-primitives = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-eth-wire = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-eth-wire-types = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-evm = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-evm-ethereum = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-execution-types = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-ipc = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-metrics = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-node-core = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-revm = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-network = { git = "https://github.com/bnb-chain/reth.git", branch = "develop", features = [ +reth-ethereum-payload-builder = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-payload-builder-primitives = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-chain-state = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-ethereum-primitives = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } + +# Firehose +reth-firehose = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +firehose-tracer = "5" +reth-eth-wire = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-eth-wire-types = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-evm = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-evm-ethereum = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-execution-types = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-ipc = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-metrics = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-node-core = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-revm = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-network = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1", features = [ "test-utils", ] } -reth-network-p2p = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-network-api = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-node-ethereum = { git = "https://github.com/bnb-chain/reth.git", branch = "develop", features = [ +reth-network-p2p = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-network-api = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-node-ethereum = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1", features = [ "test-utils", ] } -reth-network-peers = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-payload-primitives = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-ethereum-engine-primitives = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } +reth-network-peers = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-payload-primitives = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-ethereum-engine-primitives = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } reth-primitives-traits = { git = "https://github.com/bnb-chain/reth-core.git", branch = "v0.3.1-v2", default-features = false } reth-codecs = { git = "https://github.com/bnb-chain/reth-core.git", branch = "v0.3.1-v2" } -reth-provider = { git = "https://github.com/bnb-chain/reth.git", branch = "develop", features = [ +reth-provider = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1", features = [ "test-utils", ] } -reth-rpc-eth-api = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-rpc-eth-types = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-rpc-convert = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-rpc-engine-api = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-rpc-server-types = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-trie-common = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-trie-db = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-tasks = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-transaction-pool = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } +reth-rpc-eth-api = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-rpc-eth-types = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-rpc-convert = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-rpc-engine-api = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-rpc-server-types = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-trie-common = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-trie-db = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-tasks = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-transaction-pool = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } revm = "38.0.0" revm-database = "13.0.0" @@ -251,7 +255,12 @@ strip = false [dev-dependencies] uuid = { version = "1", features = ["v4"] } -reth-transaction-pool = { git = "https://github.com/bnb-chain/reth.git", branch = "develop", features = ["test-utils"] } +reth-transaction-pool = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1", features = ["test-utils"] } # `test-util` gives tests a paused clock (`start_paused`, `time::advance`), so timing invariants # can be asserted by ordering instead of racing a wall clock. tokio = { version = "1.44", features = ["full", "test-util"] } + +[patch.crates-io] +# Firehose: alloy-evm fork that lets the inspector observe system calls (streamingfast/evm, +# alloy-rs/evm v0.34.0 + 4 commits). Must match the patch in pinax-network/bnb-reth. +alloy-evm = { git = "https://github.com/streamingfast/evm.git", branch = "sf/v0.34.0" } diff --git a/Dockerfile.sf b/Dockerfile.sf new file mode 100644 index 00000000..2bf40233 --- /dev/null +++ b/Dockerfile.sf @@ -0,0 +1,104 @@ +# syntax=docker.io/docker/dockerfile:1.7-labs +# +# Firehose variant of reth-bsc's `Dockerfile` (inherited from the StreamingFast +# fork, maintained by Pinax in this repository). +# +# Intentionally kept separate from upstream's `Dockerfile` so that upstream +# merges stay clean. It builds the +# Firehose-instrumented `reth-bsc` binary (Firehose tracing is compiled into the +# default binary in this fork) and installs it at a stable path +# (`/usr/local/bin/reth-bsc`) that the `sf-release.yml` workflow can `docker cp` +# out of the image to attach as a GitHub release asset. +# +# The final stage is based on the `firehose-ethereum` image, so the published +# image bundles both the `fireeth` binary and `reth-bsc`. `fireeth` is the image +# entrypoint and drives `reth-bsc` as its reader node. The bundled `fireeth` +# version is selected by the `FIREHOSE_ETHEREUM` build arg (default `latest`). + +# Bundled `fireeth` version = the `firehose-ethereum` runtime base image tag. +# Declared before the first FROM so it is usable in the runtime stage's FROM. +ARG FIREHOSE_ETHEREUM="latest" + +FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef +WORKDIR /app + +LABEL org.opencontainers.image.source=https://github.com/pinax-network/reth-bsc +LABEL org.opencontainers.image.licenses="MIT OR Apache-2.0" + +# Install system dependencies +RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config + +# Git dependencies may live in the private pinax-network org (e.g. a pinax-network/reth +# fork). Fetch git +# dependencies with the git CLI so the `github_token` build secret (mounted in +# the cook/build steps below via an `insteadOf` rewrite) is honoured; cargo's +# built-in fetcher has no way to receive it. +ENV CARGO_NET_GIT_FETCH_WITH_CLI=true + +# Builds a cargo-chef plan +FROM chef AS planner +COPY --exclude=.git --exclude=dist . . +RUN cargo chef prepare --recipe-path recipe.json + +FROM chef AS builder +COPY --from=planner /app/recipe.json recipe.json + +# Build profile: `maxperf` (full LTO) for release/tag builds, `release` for +# faster branch/PR builds. Set by sf-release.yml. +ARG BUILD_PROFILE=maxperf +ENV BUILD_PROFILE=$BUILD_PROFILE + +# Extra Cargo flags +ARG RUSTFLAGS="" +ENV RUSTFLAGS="$RUSTFLAGS" + +# Extra Cargo features. Matches the upstream Makefile's release build. +ARG FEATURES="jemalloc,asm-keccak" +ENV FEATURES=$FEATURES + +# Version of the release being built (e.g. the pushed tag). Stamped as an OCI +# image label on the runtime stage below. +ARG VERSION="dev" + +# Builds dependencies. The `github_token` secret is optional: a build with +# public mirrors (or a warm cargo git cache) works without it, and nothing is +# written to the image layer because the credential lives in /run/secrets. +RUN --mount=type=secret,id=github_token,required=false \ + set -eu; \ + if [ -s /run/secrets/github_token ]; then \ + git config --global url."https://x-access-token:$(cat /run/secrets/github_token)@github.com/pinax-network/".insteadOf "https://github.com/pinax-network/"; \ + fi; \ + cargo chef cook --profile $BUILD_PROFILE --features "$FEATURES" --recipe-path recipe.json; \ + rm -f /root/.gitconfig + +# Build application +COPY --exclude=dist . . +RUN --mount=type=secret,id=github_token,required=false \ + set -eu; \ + if [ -s /run/secrets/github_token ]; then \ + git config --global url."https://x-access-token:$(cat /run/secrets/github_token)@github.com/pinax-network/".insteadOf "https://github.com/pinax-network/"; \ + fi; \ + cargo build --bin reth-bsc --profile $BUILD_PROFILE --features "$FEATURES" --locked; \ + rm -f /root/.gitconfig + +# ARG is not resolved in COPY so we copy the binary to a fixed location. +RUN cp /app/target/$BUILD_PROFILE/reth-bsc /app/reth-bsc-bin + +# Runtime image bundles the Firehose Ethereum stack (`fireeth`, at /app/fireeth) +# plus the freshly built `reth-bsc`. The base is Ubuntu-based and already ships +# ca-certificates / libstdc++ / openssl, so no extra packages are installed here. +FROM ghcr.io/streamingfast/firehose-ethereum:${FIREHOSE_ETHEREUM} + +ARG VERSION="dev" +LABEL org.opencontainers.image.version="${VERSION}" + +# Keep reth-bsc at the stable /usr/local/bin path that sf-release.yml `docker cp`s +# out as a release asset, and symlink it into /app next to the bundled `fireeth`. +COPY --from=builder /app/reth-bsc-bin /usr/local/bin/reth-bsc +RUN chmod +x /usr/local/bin/reth-bsc && ln -sf /usr/local/bin/reth-bsc /app/reth-bsc +COPY LICENSE* /app/ + +EXPOSE 30303 30303/udp 9001 8545 8546 8551 + +# No ENTRYPOINT: inherit the firehose-ethereum image's entrypoint (`fireeth`), +# which launches `reth-bsc` as its reader node. diff --git a/src/chainspec/parser.rs b/src/chainspec/parser.rs index cb818abc..283f54db 100644 --- a/src/chainspec/parser.rs +++ b/src/chainspec/parser.rs @@ -81,7 +81,26 @@ pub fn parse_genesis_json(json_str: &str) -> eyre::Result> { chain_spec = chain_spec.with_fork(BscHardfork::Bohr, ForkCondition::Block(0)); } - let chain_spec = chain_spec.build(); + let mut chain_spec = chain_spec.build(); + + // This fix was done to allow running a reth-bsc devnet on the StreamingFast battlefield + // suite. + // BSC genesis headers never carry post-merge header fields, even when the corresponding + // forks are active at the genesis timestamp (dev genesis files activate + // Shanghai/Cancun/Prague at time 0). reth's fork-aware genesis builder would populate + // withdrawals/blob/requests fields, yielding a genesis hash that mismatches geth-bsc and + // breaking the P2P status handshake. Strip them and re-seal, mirroring geth's behavior. + { + let mut header = chain_spec.genesis_header().clone(); + header.withdrawals_root = None; + header.blob_gas_used = None; + header.excess_blob_gas = None; + header.parent_beacon_block_root = None; + header.requests_hash = None; + let hash = alloy_primitives::Sealable::hash_slow(&header); + chain_spec.genesis_header = reth_primitives_traits::SealedHeader::new(header, hash); + } + Ok(Arc::new(BscChainSpec { inner: chain_spec })) } diff --git a/src/lib.rs b/src/lib.rs index a5f11187..8705baf2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,5 +9,6 @@ pub mod shared; pub use node::primitives::BscPrimitives; pub use node::primitives::{BscBlock, BscBlockBody, BscBlobTransactionSidecar}; mod system_contracts; +pub use system_contracts::is_invoke_system_contract; pub use system_contracts::SLASH_CONTRACT; pub use system_contracts::{encode_add_node_ids_call, encode_remove_node_ids_call}; diff --git a/src/main.rs b/src/main.rs index 310c2659..4c26ad4a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -195,13 +195,52 @@ fn main() -> eyre::Result<()> { std::env::set_var("RUST_BACKTRACE", "1"); } + // Initialize the process-wide Firehose tracer. FIRE lines are emitted on stdout; the + // engine-tree live path and the pipeline execution stage pick this up via + // reth_firehose::is_tracer_initialized(). + // + // FIREHOSE_DISABLED=true skips initialization entirely: the node then executes through the + // plain (untraced) path, byte-identical to un-instrumented reth-bsc. Ops kill-switch and + // A/B lever for isolating tracing-induced behavior. + let firehose_disabled = std::env::var("FIREHOSE_DISABLED") + .map(|v| matches!(v.as_str(), "1" | "true" | "TRUE" | "True")) + .unwrap_or(false); + if firehose_disabled { + eprintln!("FIREHOSE_DISABLED set: Firehose tracing is OFF for this run"); + } else { + reth_firehose::init_tracer(firehose_tracer::config::Config { + chain_client: firehose_tracer::config::ChainClient::Reth, + ..Default::default() + }); + } + + // BSC-specific tracing behavior (mirrors the geth Firehose reference): + // - tx fees (and blob fees) are credited to the consensus SYSTEM_ADDRESS, not the + // block beneficiary; Parlia sweeps them to the validator at finalize time; + // - body system transactions are deferred by the block executor and traced by it at + // actual execution time inside finish(), so the generic wrapper must skip them and + // must not wrap finish() in a system-call window. + reth_firehose::set_chain_tracing_config(reth_firehose::ChainTracingConfig { + fee_recipient: Some(reth_bsc::consensus::SYSTEM_ADDRESS), + reward_blob_fee: true, + is_deferred_system_tx: |to, max_fee_per_gas, signer, beneficiary| { + signer == beneficiary && + max_fee_per_gas == 0 && + to.is_some_and(|to| reth_bsc::is_invoke_system_contract(&to)) + }, + trace_finish_in_system_call: false, + // BSC headers carry Some(0) base fee post-London; geth Firehose reports it as absent, + // which also makes dynamic-fee tx gas_price report the fee cap like geth. + treat_zero_base_fee_as_absent: true, + }); + // Initialize bid package queue at startup reth_bsc::shared::init_bid_package_queue(); Cli::::parse().run_with_components::( |spec| { ( - BscEvmConfig::new(spec.clone()), + reth_firehose::FirehoseEvmConfig::new(BscEvmConfig::new(spec.clone())), Arc::new(BscConsensus::new(spec)) as Arc>, ) @@ -543,6 +582,14 @@ fn main() -> eyre::Result<()> { tracing::info!("Succeed to register eth_config (EIP-7910) API"); Ok(()) }) + .install_exex("firehose", |ctx| async move { + // Box::pin works around a rustc higher-ranked lifetime limitation when + // proving the (deeply generic) run_exex future Send inside this closure. + Ok(Box::pin(reth_firehose::run_exex(ctx)) + as std::pin::Pin< + Box> + Send>, + >) + }) .launch().await?; // Send the engine handle to the network diff --git a/src/node/evm/executor.rs b/src/node/evm/executor.rs index 53a060a0..b75f196f 100644 --- a/src/node/evm/executor.rs +++ b/src/node/evm/executor.rs @@ -143,7 +143,10 @@ where BlockEnv = crate::evm::block_env::BscBlockEnv, >, Spec: EthereumHardforks + BscHardforks + EthChainSpec + Hardforks + Clone + 'static, - R: ReceiptBuilder, + R: ReceiptBuilder< + Transaction = TransactionSigned, + Receipt: TxReceipt, + >, ::Transaction: Unpin + From, ::Tx: FromTxWithEncoded<::Transaction>, BscTxEnv: IntoTxEnv<::Tx>, @@ -352,6 +355,22 @@ where let db = self.evm.db_mut(); let mut info = db.basic(address).map_err(BlockExecutionError::other)?.unwrap_or_default(); + // Firehose: this is a direct (non-EVM) code install, invisible to the inspector. Geth + // performs the same upgrade via state.SetCode, which fires OnCodeChange. + { + let old_code_hash = info.code_hash; + let old_code = info + .code + .as_ref() + .map(|c| c.original_bytes()) + .or_else(|| db.code_by_hash(old_code_hash).ok().map(|c| c.original_bytes())) + .unwrap_or_default(); + let new_code = code.original_bytes(); + let new_code_hash = code.hash_slow(); + reth_firehose::with_active_tracer(|tracer| { + tracer.on_code_change(address, old_code_hash, new_code_hash, &old_code, &new_code); + }); + } info.code_hash = code.hash_slow(); info.code = Some(code); let mut account = RevmAccount::from(info); @@ -402,6 +421,22 @@ where ); let mut new_info = old_info.unwrap_or_default(); + // Firehose: direct (non-EVM) code install; geth's equivalent deploy fires OnCodeChange. + { + let old_code_hash = new_info.code_hash; + let old_code = + new_info.code.as_ref().map(|c| c.original_bytes()).unwrap_or_default(); + let new_code_hash = keccak256(HISTORY_STORAGE_CODE.clone()); + reth_firehose::with_active_tracer(|tracer| { + tracer.on_code_change( + HISTORY_STORAGE_ADDRESS, + old_code_hash, + new_code_hash, + &old_code, + &HISTORY_STORAGE_CODE, + ); + }); + } new_info.code_hash = keccak256(HISTORY_STORAGE_CODE.clone()); new_info.code = Some(Bytecode::new_raw(Bytes::from_static(&HISTORY_STORAGE_CODE))); new_info.nonce = 1_u64; @@ -441,7 +476,10 @@ where BlockEnv = crate::evm::block_env::BscBlockEnv, >, Spec: EthereumHardforks + BscHardforks + EthChainSpec + Hardforks + 'static, - R: ReceiptBuilder, + R: ReceiptBuilder< + Transaction = TransactionSigned, + Receipt: TxReceipt, + >, ::Transaction: Unpin + From, ::Tx: FromTxWithEncoded<::Transaction>, BscTxEnv: IntoTxEnv<::Tx>, diff --git a/src/node/evm/factory.rs b/src/node/evm/factory.rs index 496c2bc2..cfde5a49 100644 --- a/src/node/evm/factory.rs +++ b/src/node/evm/factory.rs @@ -45,6 +45,19 @@ impl EvmFactory for BscEvmFactory { input: EvmEnv, inspector: I, ) -> Self::Evm { - BscEvm::new(input, db, inspector, true, true) + // `trace` enables `fund_beneficiary_for_system_tx_replay`, a stand-in for + // `distribute_incoming`'s validator credit that is only correct when replaying a single + // transaction against archive state (RPC debug_trace, which wraps the DB in CacheDB). + // Full-block execution — including the Firehose inspector path — runs `distribute_incoming` + // itself, so funding again double-credits the validator and shows up as a phantom GAS_BUY + // on the validator in the Firehose trace. Gate on the same CacheDB heuristic as `create_evm` + // so only the single-tx replay path funds. + // Hard gate: never fund under Firehose full-block execution, regardless of what the DB + // type-name heuristic concludes — the heuristic is inherently fragile (it inspects + // monomorphized type names), and a misfire double-credits the validator with committed + // state, i.e. a consensus break. The Firehose inspector only ever drives full blocks. + let is_firehose = std::any::type_name::().contains("FirehoseInspector"); + let is_trace = !is_firehose && std::any::type_name::().contains("CacheDB"); + BscEvm::new(input, db, inspector, true, is_trace) } } diff --git a/src/node/evm/mod.rs b/src/node/evm/mod.rs index 5d7b855d..16914e59 100644 --- a/src/node/evm/mod.rs +++ b/src/node/evm/mod.rs @@ -24,7 +24,7 @@ use revm::{ context::{ result::{EVMError, HaltReason, ResultAndState}, CfgEnv, }, - Context, ExecuteEvm, InspectEvm, Inspector, SystemCallEvm, + Context, ExecuteEvm, InspectEvm, InspectSystemCallEvm, Inspector, SystemCallEvm, }; mod assembler; @@ -101,7 +101,16 @@ where contract: Address, data: Bytes, ) -> Result, Self::Error> { - let result = self.inner.system_call_one_with_caller(caller, contract, data)?; + // Route through the inspected variant when tracing is on, mirroring `transact_raw` + // (line above). The plain `system_call_one_with_caller` bypasses the inspector, so the + // Firehose tracer never sees the call and omits it from the block. geth emits these as + // `system_calls` — e.g. the per-block EIP-2935 history-storage update, whose state is + // committed either way but only appears in the trace when inspected. + let result = if self.inspect { + self.inner.inspect_one_system_call_with_caller(caller, contract, data)? + } else { + self.inner.system_call_one_with_caller(caller, contract, data)? + }; let state = self.finalize(); Ok(ResultAndState::new(result, state)) } @@ -144,10 +153,13 @@ where Storage = crate::node::storage::BscStorage, >, { - type EVM = BscEvmConfig; + // Firehose: wrap the BSC EVM config so the pipeline (staged sync) batch executor routes + // through FirehoseBlockExecutor. The live engine path hooks execution separately inside + // the payload validator; every other ConfigureEvm method delegates to BscEvmConfig. + type EVM = reth_firehose::FirehoseEvmConfig; async fn build_evm(self, ctx: &BuilderContext) -> eyre::Result { let evm_config = BscEvmConfig::bsc(ctx.chain_spec()); - Ok(evm_config) + Ok(reth_firehose::FirehoseEvmConfig::new(evm_config)) } } diff --git a/src/node/evm/post_execution.rs b/src/node/evm/post_execution.rs index 40b86873..bb8417d7 100644 --- a/src/node/evm/post_execution.rs +++ b/src/node/evm/post_execution.rs @@ -49,7 +49,10 @@ where BlockEnv = crate::evm::block_env::BscBlockEnv, >, Spec: EthereumHardforks + crate::hardforks::BscHardforks + EthChainSpec + Hardforks + Clone + 'static, - R: ReceiptBuilder, + R: ReceiptBuilder< + Transaction = TransactionSigned, + Receipt: TxReceipt, + >, ::Transaction: Unpin + From, ::Tx: FromTxWithEncoded<::Transaction>, BscTxEnv: IntoTxEnv<::Tx>, @@ -334,6 +337,29 @@ where for tx in self.system_txs.iter() { warn!("left system tx: {:?}", tx); } + // Diagnostic for fee-accumulation divergences (e.g. mainnet block 106696194): + // dump every executed transaction's gas so the diverging tx can be identified by + // diffing against the canonical receipts. Cumulative gas differences reconstruct + // per-tx gasUsed. + { + let mut prev = 0u64; + let gas_list: Vec = self + .receipts + .iter() + .enumerate() + .map(|(i, r)| { + let cum = alloy_consensus::TxReceipt::cumulative_gas_used(r); + let gas = cum.saturating_sub(prev); + prev = cum; + format!("{i}:{gas}") + }) + .collect(); + warn!( + target: "bsc::executor::diagnostic", + "per-tx gas at system-tx mismatch: [{}]", + gas_list.join(",") + ); + } self.executor_metrics.system_contract_errors_total.increment(1); return Err(BscBlockExecutionError::Validation( BscBlockValidationError::UnexpectedSystemTx @@ -430,7 +456,35 @@ where } let _precompile_trace_pop_guard = PrecompileTracePopGuard; - let result_and_state = self.evm.transact(tx_env.into_tx_env()).map_err(BlockExecutionError::other)?; + // Firehose: system transactions are traced as ordinary transactions at their actual + // execution point (end-of-block finalize), matching the geth reference where the Parlia + // engine drives OnTxStart/OnTxEnd around each applied system tx. The generic wrapper + // skipped these txs during body iteration (ChainTracingConfig::is_deferred_system_tx). + let fh_tx_index = self.receipts.len(); + let fh_traced = if let Some(signed) = signed_tx.as_ref() { + reth_firehose::with_active_tracer(|tracer| { + use reth_firehose::mapper::SignatureFields; + let (r, sig_s, v) = signed.signature_fields(); + let event = reth_firehose::mapper::signed_tx_to_tx_event( + signed, sender, fh_tx_index, r, sig_s, v, + ); + tracer.on_tx_start(event, None); + }) + .is_some() + } else { + false + }; + + let result_and_state = match self.evm.transact(tx_env.into_tx_env()) { + Ok(res) => res, + Err(err) => { + let err = BlockExecutionError::other(err); + if fh_traced { + reth_firehose::with_active_tracer(|tracer| tracer.on_tx_end(None, Some(&err))); + } + return Err(err); + } + }; let ResultAndState { result, state } = result_and_state; let mut temp_state = state.clone(); temp_state.remove(&SYSTEM_ADDRESS); @@ -446,6 +500,12 @@ where use alloy_consensus::TxType; signed_tx.as_ref().map(|tx| tx.tx_type()).unwrap_or(TxType::Legacy) }; + // Block-wide log index of this system tx's first log: logs of all prior receipts. + let fh_log_index_start: u32 = if fh_traced { + self.receipts.iter().map(|r| alloy_consensus::TxReceipt::logs(r).len() as u32).sum() + } else { + 0 + }; self.receipts.push(self.receipt_builder.build_receipt(ReceiptBuilderCtx { tx_type, evm: &self.evm, @@ -453,6 +513,23 @@ where state: &state, cumulative_gas_used: self.gas_used, })); + if fh_traced { + let receipt = self.receipts.last().expect("receipt just pushed"); + let receipt_data = reth_firehose::mapper::to_receipt_data( + receipt, + fh_tx_index as u32, + gas_used, + fh_log_index_start, + 0, + None, + ); + reth_firehose::with_active_tracer(|tracer| tracer.on_tx_end(Some(&receipt_data), None)); + // Keep block-wide log indices accurate for later call logs: system txs bypass the + // generic wrapper's post-tx log accounting. + reth_firehose::add_block_log_offset( + alloy_consensus::TxReceipt::logs(receipt).len() as u32, + ); + } self.evm.db_mut().commit(state); // Record system contract execution duration @@ -482,6 +559,17 @@ where // computation (sparse trie / `StateRootTask`) only observes reported changes, and a bare // `db.commit` would leave the block committing a root without them. { + // Firehose: this is a direct (non-EVM) state write, invisible to the inspector. + // Geth emits it via OnBalanceChange with BalanceDecreaseBSCDistributeReward, which + // collapses to REASON_REWARD_TRANSACTION_FEE on the wire. + reth_firehose::with_active_tracer(|tracer| { + tracer.on_balance_change( + SYSTEM_ADDRESS, + system_info.balance, + U256::ZERO, + firehose_tracer::pb::sf::ethereum::r#type::v2::balance_change::Reason::RewardTransactionFee, + ); + }); let mut system_account = RevmAccount::from(system_info); system_account.mark_touch(); system_account.info.balance = U256::ZERO; @@ -501,7 +589,18 @@ where .unwrap_or_default(); let mut validator_account = RevmAccount::from(validator_info); validator_account.mark_touch(); + let old_balance = validator_account.info.balance; validator_account.info.balance = validator_account.info.balance.saturating_add(U256::from(block_reward)); + // Firehose: counterpart of the SYSTEM_ADDRESS sweep above (geth: + // BalanceIncreaseBSCDistributeReward → REASON_REWARD_TRANSACTION_FEE). + reth_firehose::with_active_tracer(|tracer| { + tracer.on_balance_change( + validator, + old_balance, + validator_account.info.balance, + firehose_tracer::pb::sf::ethereum::r#type::v2::balance_change::Reason::RewardTransactionFee, + ); + }); let mut changes: EvmState = Default::default(); changes.insert(validator, validator_account); self.evm.db_mut().commit(changes.clone()); diff --git a/src/node/evm/pre_execution.rs b/src/node/evm/pre_execution.rs index ec1823b1..7f6e3a63 100644 --- a/src/node/evm/pre_execution.rs +++ b/src/node/evm/pre_execution.rs @@ -156,7 +156,10 @@ where BlockEnv = crate::evm::block_env::BscBlockEnv, >, Spec: EthereumHardforks + crate::hardforks::BscHardforks + EthChainSpec + Hardforks + Clone + 'static, - R: ReceiptBuilder, + R: ReceiptBuilder< + Transaction = TransactionSigned, + Receipt: TxReceipt, + >, ::Transaction: Unpin + From, ::Tx: FromTxWithEncoded<::Transaction>, BscTxEnv: IntoTxEnv<::Tx>, @@ -309,6 +312,11 @@ where ) -> Result { let tx_env = view_call_tx_env(to, data.clone(), self.evm.block().gas_limit(), self.spec.chain().id()); + + // Firehose: this is internal consensus bookkeeping (validator set / turn length reads), + // not part of the block's observable execution — geth never traces these. Suspend the + // inspector so the read leaves no trace events and cannot trip the tracer state machine. + let _fh_suspend = reth_firehose::suspend_tracing(); let result_and_state = self.evm.transact(tx_env.into_tx_env()).map_err(BlockExecutionError::other)?; view_call_output(to, &data, result_and_state.result) } diff --git a/src/node/network/mod.rs b/src/node/network/mod.rs index b86a3a7c..d622ed35 100644 --- a/src/node/network/mod.rs +++ b/src/node/network/mod.rs @@ -361,7 +361,17 @@ impl BscNetworkBuilder { // TODO: update network with the latest canonical head, but has a fork id issue, can fix it later. let mut network_builder = network_builder .boot_nodes(ctx.chain_spec().bootnodes().unwrap_or_default()) - .set_head(ctx.chain_spec().head()) + .set_head({ + // Firehose fork fix: the chain-spec `head()` helpers leave `hash` at the zero + // default. eth/69 status advertises that hash and bnb-reth's handshake rejects + // zero blockhashes, so a fresh node (still at genesis) could never peer. Fill in + // the genesis hash so the advertised head is valid. + let mut head = ctx.chain_spec().head(); + if head.hash.is_zero() { + head.hash = ctx.chain_spec().genesis_hash(); + } + head + }) .with_pow() .block_import(Box::new(BscBlockImport::new(handle))) .eth_rlpx_handshake(Arc::new(BscHandshake::default())) diff --git a/src/node/primitives.rs b/src/node/primitives.rs index 5a9b72e0..dab8b852 100644 --- a/src/node/primitives.rs +++ b/src/node/primitives.rs @@ -315,12 +315,17 @@ impl Block for BscBlock { } fn rlp_length(header: &Self::Header, body: &Self::Body) -> usize { + // Canonical block size: excludes blob sidecars, matching geth's `Block.Size()` / + // `eth_getBlock` size and the Firehose `size` field. Sidecars are gossiped/stored + // separately and are not part of the canonical block; only `encode()` (used for the + // BSC-specific network/storage form) carries them. Note the EIP-7934 `MAX_RLP_BLOCK_SIZE` + // check that also consumes `rlp_length` is Osaka-gated and inert on BSC. rlp::BlockHelper { header: Cow::Borrowed(header), transactions: Cow::Borrowed(&body.inner.transactions), ommers: Cow::Borrowed(&body.inner.ommers), withdrawals: body.inner.withdrawals.as_ref().map(Cow::Borrowed), - sidecars: body.sidecars.as_ref().map(Cow::Borrowed), + sidecars: None, } .length() } @@ -722,6 +727,54 @@ mod tests { ); } + #[test] + fn test_rlp_length_excludes_sidecars() { + // Regression: `rlp_length` is the canonical block size and must NOT count blob sidecars + // (geth's `size` / `eth_getBlock` size and the Firehose `size` field exclude them), even + // though `encode()` carries them for the BSC network/storage form. + use alloy_eips::eip4895::Withdrawals; + + let header = create_test_header(); + let sidecar = BscBlobTransactionSidecar { + inner: BlobTransactionSidecar { + blobs: vec![alloy_eips::eip4844::Blob::default()], + commitments: vec![alloy_eips::eip4844::Bytes48::default()], + proofs: vec![alloy_eips::eip4844::Bytes48::default()], + }, + block_number: 1, + block_hash: B256::repeat_byte(0x11), + tx_index: 0, + tx_hash: B256::repeat_byte(0x22), + // Legacy EIP-4844 proofs; `version` is rlp:"-" and does not affect the size under test. + version: 0, + }; + let body = BscBlockBody { + inner: BlockBody { + transactions: vec![], + ommers: vec![], + withdrawals: Some(Withdrawals::default()), + }, + sidecars: Some(vec![sidecar]), + }; + let body_no_sidecars = BscBlockBody { sidecars: None, ..body.clone() }; + + // Canonical size ignores sidecars entirely... + assert_eq!( + BscBlock::rlp_length(&header, &body), + BscBlock::rlp_length(&header, &body_no_sidecars), + "rlp_length must not depend on sidecars" + ); + + // ...and is strictly smaller than the full encoding, which includes the ~128 KiB blob. + let block = BscBlock { header: header.clone(), body }; + let mut buf = Vec::new(); + block.encode(&mut buf); + assert!( + BscBlock::rlp_length(&block.header, &block.body) < buf.len(), + "rlp_length (canonical) must be smaller than encode() length (with sidecars)" + ); + } + #[test] fn test_blob_sidecar_nested_rlp_layout() { // Regression test: BscBlobTransactionSidecar must encode BlobTxSidecar as a diff --git a/src/shared.rs b/src/shared.rs index abdf092b..e8b1d098 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -37,7 +37,7 @@ pub type BscEngineApiTx = UnboundedSender< crate::node::engine_api::payload::BscPayloadTypes, crate::BscPrimitives, BlockchainProvider>, - crate::node::evm::config::BscEvmConfig, + reth_firehose::FirehoseEvmConfig, >, >; diff --git a/src/system_contracts/mod.rs b/src/system_contracts/mod.rs index 420e2696..3a9d8054 100644 --- a/src/system_contracts/mod.rs +++ b/src/system_contracts/mod.rs @@ -763,7 +763,14 @@ where } else { Ok(HashMap::new()) } - } else if spec.chain().eq(&Chain::from_id(RIALTO_CHAIN_ID)) { + } else if spec.chain().eq(&Chain::from_id(RIALTO_CHAIN_ID)) && + spec.genesis_hash() == bsc_qanet().genesis_header.hash() + { + // This fix was done to allow running a reth-bsc devnet on the StreamingFast + // battlefield suite. + // Chain id alone is not enough: custom dev networks may reuse 714. geth keys + // upgrades on the genesis hash and applies none for unknown networks, so only + // the real Rialto genesis gets the QA-net contracts. if let Some(m) = BSC_QANET_CONTRACTS.get(hardfork) { Ok(m.clone()) } else { diff --git a/testing/bsc-ef-tests/Cargo.toml b/testing/bsc-ef-tests/Cargo.toml index aa3be7b2..6b80c88c 100644 --- a/testing/bsc-ef-tests/Cargo.toml +++ b/testing/bsc-ef-tests/Cargo.toml @@ -16,30 +16,30 @@ reth_bsc = { path = "../.." } rand = "0.9" # reth dependencies aligned with the root crate's reth tag to avoid duplicate crate versions -reth-chainspec = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-consensus = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-ethereum-forks = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-db = { git = "https://github.com/bnb-chain/reth.git", branch = "develop", features = [ +reth-chainspec = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-consensus = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-ethereum-forks = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-db = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1", features = [ "mdbx", "test-utils", "disable-lock", ] } -reth-db-api = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-db-common = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-ethereum-consensus = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-ethereum-primitives = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-evm = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-evm-ethereum = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } +reth-db-api = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-db-common = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-ethereum-consensus = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-ethereum-primitives = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-evm = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-evm-ethereum = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } reth-primitives-traits = { git = "https://github.com/bnb-chain/reth-core.git", branch = "v0.3.1-v2", default-features = false } -reth-provider = { git = "https://github.com/bnb-chain/reth.git", branch = "develop", features = [ +reth-provider = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1", features = [ "test-utils", ] } -reth-revm = { git = "https://github.com/bnb-chain/reth.git", branch = "develop", features = [ +reth-revm = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1", features = [ "std", ] } -reth-tracing = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-trie = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } -reth-trie-db = { git = "https://github.com/bnb-chain/reth.git", branch = "develop" } +reth-tracing = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-trie = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } +reth-trie-db = { git = "https://github.com/pinax-network/bnb-reth.git", tag = "bnb-bf76323c-fh3.1-1" } # revm revm = { version = "38.0.0", features = [