Repository navigation
🤖 [claude] Firehose series on upstream develop 049d306 (fork-recovery memory fix) - #3
Merged
Merged
Conversation
Consumes reth crates from streamingfast/bnb-reth (firehose/0.x-bsc), initializes the Firehose tracer, wraps BscEvmConfig in FirehoseEvmConfig and installs the Firehose ExEx. Also fixes the zero head hash advertised in the eth/69 status that prevented fresh nodes from peering, and adds the StreamingFast release CI (fireeth-bundled image) in place of the upstream tag-triggered workflows. (cherry picked from commit 99b8178)
Fees (incl. blob fees) are emitted to SYSTEM_ADDRESS instead of the beneficiary, deferred system transactions are traced as ordinary txs at their finalize-time execution point, the distribute_incoming sweep and direct system-contract code installs emit their balance/code changes. (cherry picked from commit a17baef)
The validator-set and turn-length reads run on the inspector-carrying EVM between transactions; their hooks panicked the tracer state machine on mainnet sync. Geth never traces these reads. (cherry picked from commit 020df22)
Companion to the bnb-reth add_block_log_offset fix: without it, call logs emitted after a log-bearing system tx lagged receipt log indices and panicked the tracer's ordinal assignment. (cherry picked from commit ddde242)
Pre-release tags use the release profile (thin LTO) instead of maxperf, and branch pushes no longer build images — tags, PRs and manual dispatch only. (cherry picked from commit 58b9650)
Skips tracer init so the node runs the plain untraced execution path; the firehose ExEx idles in no-op mode. A/B lever for isolating tracing-induced behavior. (cherry picked from commit 7a32699)
The CacheDB type-name heuristic is fragile; a misfire on a full-block path double-credits the validator in committed state. Gate funding off whenever the inspector is the FirehoseInspector. (cherry picked from commit f1765b6)
Lost in cherry-pick conflict resolution during the v0.1.1 rebase. (cherry picked from commit b81a8e2)
(cherry picked from commit 0181b56)
Diagnostic for fee-accumulation divergences: at the UnexpectedSystemTx error the node holds its own receipts, so logging cumulative-gas deltas identifies which transaction's gas diverges from canonical. (cherry picked from commit f6dd095)
Two BSC Firehose parity fixes vs the geth reference: - transact_system_call bypassed the inspector, so the per-block EIP-2935 history-storage update executed and committed state but never appeared in the trace. Route it through the inspected variant when tracing so it is emitted as a system_call, matching geth. - BSC headers carry a 0 base fee; the tracer computed dynamic-fee gas_price as min(tip + base_fee, cap), collapsing to the tip, while geth reports the fee cap (tx.GasPrice()). Enable the fork's new treat_zero_base_fee_as_absent so a Some(0) base fee is emitted as nil, yielding the fee cap and omitting the header field. Bumps the bnb-reth fork to 4de725a6. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> (cherry picked from commit b19b044)
BscBlock::rlp_length counted blob sidecars, so the Firehose `size` (and eth_getBlock size) over-reported blob blocks by ~128 KiB/blob vs geth, which measures the canonical block. Make rlp_length sidecar-free; encode() still carries sidecars for the BSC network/storage form. The EIP-7934 size check that also uses rlp_length is Osaka-gated and inert on BSC. Bumps the bnb-reth fork to 5f9e1ec1 (Firehose size uses rlp_length). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> (cherry picked from commit bac9619)
(cherry picked from commit c434b81)
Dev genesis files activate Shanghai/Cancun/Prague at time 0, so reth's fork-aware genesis builder added withdrawals/blob/requests header fields that geth-bsc omits, mismatching the genesis hash and breaking the P2P status handshake against a geth-bsc peer (battlefield's dockerized miner). Strip the post-merge fields and re-seal. (cherry picked from commit a3ec010)
Chain id 714 alone also matches custom dev networks (battlefield uses it), which then diverge from geth: geth keys upgrades on genesis hash and applies none for unknown networks. Applying the QA-net bytecode on a dev chain changed 0x2002's code at the Maxwell transition and shifted block gas used. (cherry picked from commit e0c88cc)
(cherry picked from commit 331fcb6)
Cargo.lock rev bump follows once streamingfast/bnb-reth#1 merges. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> (cherry picked from commit 38d676f)
(cherry picked from commit 2e3ad5d)
(cherry picked from commit d2c1865)
This branch carries StreamingFast's Firehose series unchanged (23 commits on top of bnb-chain/reth-bsc v0.1.1) and repoints its two streamingfast/* git dependencies at pinax-network mirrors of the identical commits, so releases can be built here without any streamingfast repository being reachable: - reth-* crates (incl. reth-firehose): pinax-network/reth tag bnb-v0.1.1-fh3.1 (= streamingfast/reth release/bnb-0.x @ d0e869a06) - alloy-evm [patch.crates-io]: pinax-network/evm branch sf/v0.34.0 (= streamingfast/evm @ 49b4c64c3, alloy-rs/evm v0.34.0 + inspector system-call patch) Cargo.lock keeps the same commit hashes; only the source URLs change, so `--locked` still resolves exactly the bytes StreamingFast shipped. pinax-network/reth is private, so Dockerfile.sf and ci.yml fetch git dependencies with the git CLI and take a read token (org secret PAT_INTERNAL_REPOSITORIES) through a BuildKit secret mount / insteadOf rewrite. The credential never lands in an image layer. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YHvxpuVpZfzefJgwgqjAzn
…rs are reachable pinax-network/reth is private and the fork's CI token cannot read it (403), so this restores the exact streamingfast/reth and streamingfast/evm pins from v0.1.1-fh3.1. Cargo.toml and Cargo.lock are now byte-identical to that tag. The credential rewrite in Dockerfile.sf and ci.yml is scoped to https://github.com/pinax-network/ so public dependencies are never fetched with a token attached; with no pinax-network pin it is a no-op. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YHvxpuVpZfzefJgwgqjAzn
…the Firehose deps Upstream 049d306 pins bnb-chain/reth by branch `develop` (resolved to bf76323c in its Cargo.lock). The Firehose hooks for that exact commit live on pinax-network/bnb-reth branch `firehose/develop` (bf76323c + StreamingFast's 17 hook commits; public, so no token is needed to fetch). Repoint all 44 + 15 reth crate pins there, add `reth-firehose` / `firehose-tracer` as the glue requires, and carry the alloy-evm inspector patch that the reth layer also applies. Cargo.lock is intentionally left as upstream's here; the lockfile workflow regenerates it with `cargo fetch` on push. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YHvxpuVpZfzefJgwgqjAzn
…306-fh3.1-1 - lockfile.yml regenerates Cargo.lock with `cargo fetch` on release/** pushes that touch a manifest, so a rebase onto a new upstream commit needs no local Rust toolchain; the bot commit does not retrigger workflows. - Tags `dev-<sha>-fh<proto>-<n>` (builds on an upstream branch commit) keep the maxperf profile but are published as prereleases and never move `latest`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YHvxpuVpZfzefJgwgqjAzn
Generated by .github/workflows/lockfile.yml (cargo fetch) after the Firehose series was rebased.
…car struct Upstream develop added `version: u8` to BscBlobTransactionSidecar (EIP-7594 cell-proof marker, rlp:"-", 0 = legacy proofs). StreamingFast's test_rlp_length_excludes_sidecars builds the struct literally and no longer compiled; the library itself was unaffected. The field is excluded from the RLP so the size assertion is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YHvxpuVpZfzefJgwgqjAzn
… commit, fix docs - Cargo.toml / bsc-ef-tests / Cargo.lock: pin pinax-network/bnb-reth by tag `bnb-bf76323c-fh3.1-1` (= firehose/develop @ 1fccff49, the commit the lock already resolved) instead of the moving branch, so the manifest states what the changelog promises and `cargo fetch` cannot drift the reth layer. - lockfile.yml: after pushing the regenerated Cargo.lock, dispatch ci.yml and sf-release.yml on the branch. GITHUB_TOKEN pushes never trigger push workflows, so without this the only commit on which `--locked` can pass was never built. ci.yml gains a workflow_dispatch trigger for that. - sf-release.yml: the secrets comment described a private reth fork that nothing pins; align it with the header. - CHANGELOG: the v0.1.1-fh3.1-1 entry no longer claims identical sources; it documents the clippy rewrite under Fixed. The dev entry names the tag. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YHvxpuVpZfzefJgwgqjAzn
The previous commit only rewrote entries carrying a commit hash; the 27 dependency references without one still named branch=firehose/develop, which cargo treats as a different source. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YHvxpuVpZfzefJgwgqjAzn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First Firehose build cut from an upstream commit rather than an upstream tag. Base branch
upstream/049d306is pristine bnb-chain/reth-bscdevelop@049d3065("fix: refine new-payload/fcu flow to avoid memory accumulation", bnb-chain#501 — the fix thebsc-arch*archive nodes already run aseosn-reth-bsc 1.0.0-3; upstreamv0.1.2+ 15). This branch replays the StreamingFast Firehose series (as ofv0.1.1-fh3.1, 23 commits) on top of it, plus the release pipeline from #2.Two layers, both public, no secrets:
pinax-network/bnb-reth(fork of bnb-chain/reth) branchfirehose/develop=bf76323c— the exact commit049d3065's lockfile resolvesbranch = "develop"to — + StreamingFast's 17 Firehose hook commits frombnb-v0.1.1-fh3.1+ a botCargo.lockcommit. Zero code conflicts.reth-*pins → that branch;reth-firehose/firehose-tracer = "5"added;[patch.crates-io] alloy-evm→streamingfast/evmsf/v0.34.0(same patch the reth layer applies).Cargo.lockregenerated by the newlockfile.yml(cargo fetch, commits withGITHUB_TOKEN, cannot loop).Conflicts resolved (2 code, rest pins):
src/node/evm/executor.rs— Pasteur contract upgrade path: keep upstream's block (reports the code change to the state hook; the bsc-qanet root fix) and emit Firehoseon_code_changebefore the mutation, as SF did.src/node/evm/pre_execution.rs— internal consensuseth_calls: keep upstream'sview_call_tx_env()helper, add SF'sreth_firehose::suspend_tracing()guard.Release semantics: tags
dev-<sha>-fh<proto>-<n>build withmaxperflike tag releases but are published as prereleases and never move thelatestimage tag. Planned tag after merge:dev-049d306-fh3.1-1.The
v0.1.1-fh3.1-1clippy fix from #2 is not needed here (upstream already rewrote that code).Test plan
ci.yml;sf-release.ymlDocker build inreleaseprofile without push) — first real compile of the glue against the new reth commitdev-049d306-fh3.1-1→ asset +ghcr.io/pinax-network/reth-bsc:dev-049d306-fh3.1-1(prerelease)local-buildeosn-sf-bsc4-teston that asset; canary onbsc-sfdm40; FIRE output compared against a liveeosn-sf-bsc4node🤖 Created by Claude Code Fable 5.1 (effort: medium)
🤖 Generated with Claude Code
https://claude.ai/code/session_01YHvxpuVpZfzefJgwgqjAzn