btc: BIP 35 mempool pull on connect -> POPULATED G3b templates - #566
Merged
Conversation
…r produces POPULATED blocks The new_tx -> mempool.add_tx subscription in main_btc only sees txs announced via inv AFTER connect. Txs already resident in the bitcoind mempool at connect time (e.g. a seeded regtest mempool) were never requested, so won blocks were coinbase-only (nTx=1) — the G3b POPULATED residual. Expose Node::enable_mempool_request() (forwards to NodeP2P, applied at start_p2p time and to any later reconnect) and call it from main_btc after start_p2p. Mirrors the established main_dgb pattern. Peer must advertise NODE_BLOOM (regtest: -peerbloomfilters=1) or NodeP2P skips the request (logged) to avoid a disconnect; normal inv relay is unchanged. BTC-fenced; no cross-coin contract change.
frstrtr
added a commit
that referenced
this pull request
Jun 27, 2026
btc: g3b POPULATED re-drive harness (turnkey #566 BIP35 proof)
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.
What
Embedded BTC TemplateBuilder produced coinbase-only (nTx=1) won blocks — the G3b POPULATED residual. The
new_tx -> mempool.add_txsubscription inmain_btconly sees txs announced viainvafter connect; txs already resident in the bitcoind mempool at connect time (e.g. a seeded regtest mempool) were never requested.Fix
btc::coin::Node::enable_mempool_request()— forwards toNodeP2P(applied atstart_p2pand on any later reconnect).main_btcafterstart_p2p, so the BIP 35mempoolrequest fires on connect and the existingnew_txsubscription ingests the pulled txs.main_dgb.cpppattern. BTC-fenced; no cross-coin contract change.Prereq for live proof
Peer must advertise NODE_BLOOM or NodeP2P skips the request (logged) to avoid a disconnect. Regtest re-drive must launch bitcoind with
-peerbloomfilters=1. Normal inv relay is unchanged.Verification
cmake --build build --target c2pool-btcclean.Held for operator tap — I do not self-merge.