dgb: stand up embedded coin-daemon P2P producer in run-loop (Phase B) - #256
Merged
Conversation
Construct dgb::coin::p2p::NodeP2P<dgb::Config> against the coin_iface ingest seam landed in #250 and dial the local digibyted. On --run with --coin-daemon HOST:PORT (+ --coin-magic / --coin-genesis), the producer speaks the DigiByte Core wire protocol (Scrypt-only consumer), completes the version/verack handshake, drives an initial getheaders from the genesis locator, and fires coin_iface.new_headers / new_tx on each live relay. The wire_*_ingest connectors route those onto HeaderChain::validate_and_append and Mempool::add_tx, so a live feed now flows end-to-end the moment the handshake completes. Coin-daemon wire MAGIC is kept distinct from the sharechain PREFIX isolation primitive; both endpoint and magic are supplied by main() so the binary targets mainnet or a dev regtest daemon without hard-coding. No behavior change when --coin-daemon is absent (coin_p2p stays null).
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.
Phase B — embedded coin-daemon P2P producer standup (binds the #250 consumer seam)
Constructs
dgb::coin::p2p::NodeP2P<dgb::Config>inrun_nodeand dials the local digibyted. With--coin-daemon HOST:PORT(+--coin-magic/--coin-genesis) the producer speaks the DigiByte Core wire protocol (Scrypt-only consumer), completes version/verack, drives an initial getheaders from the genesis locator, and firescoin_iface.new_headers/new_txon each live relay. Thewire_*_ingestconnectors from #250 route those ontoHeaderChain::validate_and_appendandMempool::add_tx— live feed flows end-to-end the moment the handshake completes. No behavior change when--coin-daemonis absent (coin_p2p stays null).Fence
src/c2pool/main_dgb.cppONLY — the DGB-specific binary entry. Does NOT touch shared run_node, bitcoin_family/, or src/core/. Outsidesrc/impl/dgb/(it is the dgb binary main), so flagged for operator tap per integrator — live consensus-relevant ingest is not auto-merge.Live regtest chain-advance evidence (against reachable digibyted /DigiByte:8.26.2/, proto 70019)
HOLD merge — operator tap.