Skip to content

dgb(#82): wire won-block P2P-relay PRIMARY arm to live coin-daemon producer - #260

Merged
frstrtr merged 1 commit into
masterfrom
dgb/won-block-p2p-relay-arm
Jun 20, 2026
Merged

dgb(#82): wire won-block P2P-relay PRIMARY arm to live coin-daemon producer#260
frstrtr merged 1 commit into
masterfrom
dgb/won-block-p2p-relay-arm

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 20, 2026

Copy link
Copy Markdown
Owner

What

Adds NodeP2P::submit_block_p2p_raw(raw_bytes) — frames an already-serialized won block as a block P2P message and writes it to the connected coin daemon (no decode/re-encode round trip, unlike submit_block(BlockType&)).

In main_dgb run_node, hoists the coin_p2p producer declaration ahead of the m_on_block_found binding and binds the dual-path broadcaster P2pRelaySink to post submit_block_p2p_raw onto the io thread.

Why now

The live NodeP2P producer landed on master (e5c12cbe7). The PRIMARY P2P-relay arm of the #82 dual-path broadcaster was previously guarded (P2pRelaySink{}) for lack of a live producer to bind — it now has a real sink. RPC fallback leg unchanged (dual-path rule preserved).

Safety / scope

  • Surface-for-tap, NO behavior change: the reconstruct closure still returns nullopt (faithful gentx reassembly is Phase B embedded), so broadcast_won_block is never called with a real block this build.
  • Thread-safe: sink fires on the compute thread, posts the peer write onto the io thread (NodeP2P is single-thread-confined).
  • Fenced to src/impl/dgb/coin/p2p_node.hpp + src/c2pool/main_dgb.cpp. No shared-base / bitcoin_family / doge-aux touch.
  • Local build: c2pool-dgb links EXIT=0.

HOLD merge — operator tap.

…oducer

Add NodeP2P::submit_block_p2p_raw(raw_bytes) — frames an already-serialized
won block as a `block` P2P message and writes it to the connected coin
daemon (no decode/re-encode, unlike submit_block(BlockType&)).

In main_dgb run_node, hoist the coin_p2p producer declaration ahead of the
m_on_block_found binding and bind the dual-path broadcaster P2pRelaySink to
post submit_block_p2p_raw onto the io thread. Now that the live NodeP2P
producer landed on master (e5c12cb), the previously-guarded PRIMARY arm
has a real sink; the RPC fallback leg is unchanged.

Surface-for-tap: the reconstruct closure still returns nullopt (faithful
gentx reassembly is Phase B embedded), so broadcast_won_block is never
called with a real block this build — NO behavior change. Fenced to
src/impl/dgb + main_dgb.
@frstrtr
frstrtr merged commit 0b8b17d into master Jun 20, 2026
27 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