Skip to content

bch: correct 2 stale broadcaster comments -- reconstruction has landed (#744)#789

Merged
frstrtr merged 1 commit into
masterfrom
bch/broadcaster-stale-comment-fix
Jul 21, 2026
Merged

bch: correct 2 stale broadcaster comments -- reconstruction has landed (#744)#789
frstrtr merged 1 commit into
masterfrom
bch/broadcaster-stale-comment-fix

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Part of #744 (fleet dual-path broadcaster gate audit) — the "2 stale misleading BCH comments" cleanup.

What

Both comments asserted reconstruct_won_block() still returns nullopt because gentx (coinbase) full-body reconstruction had not landed (citing a stale share_check.hpp:472 line). That is no longer true: reconstruct_won_block (src/impl/bch/node.hpp) calls generate_share_transaction — the same coinbase builder the verify path uses — then builds the 80-byte header and serializes the full wire block, returning a complete block on success. nullopt now means only incomplete parent txs (== as_block None) or a build failure.

Corrected:

  • src/impl/bch/node.hpp — the reconstruct_won_block doc note.
  • src/impl/bch/pool_standup.hpp — the sink-liveness note; the residual gate to "verified" is a run-path dual-path soak (leg C submitblock RPC against a live BCHN + the P2P relay arm), not missing reconstruction code.

Safety

Comment-only — zero code/behavior change, zero p2pool-merged-v36 surface.

Context

Re-audit finding: contrary to the 2026-07-19 note, both BCH arms ARE wired into the --pool run path (standup_pool_runbroadcast_won_block, P2P leg + submitblock leg, with a sink-liveness assert). The only real remaining gap is a run-path dual-path soak (shared with LTC/DOGE).

Draft — for review, not merge.

#744)

Both comments asserted reconstruct_won_block() still returns nullopt because
gentx (coinbase) full-body reconstruction had not landed (citing a stale
share_check.hpp:472 line). That is no longer true: reconstruct_won_block (node.hpp)
calls generate_share_transaction -- the same coinbase builder the verify path
uses -- then builds the 80-byte header and serializes the full wire block,
returning a complete block on success. nullopt now means only incomplete parent
txs (== as_block None) or a build failure, never a not-yet-implemented path.

Correct both comments to describe reality: the dual-path broadcaster sink is
live and emits a complete block on a won share; the residual gate to 'verified'
is a run-path dual-path SOAK (leg C submitblock RPC against a live BCHN plus the
P2P relay arm), not missing reconstruction code.

Comment-only -- zero code/behavior change, zero p2pool-merged-v36 surface.
@frstrtr
frstrtr marked this pull request as ready for review July 21, 2026 07:50
@frstrtr
frstrtr merged commit 119346d into master Jul 21, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant