dash(S8): reception-wire legs 1+3 -- new_tx/block_connected -> CoinStateMaintainer (rebased on master) - #693
Merged
Conversation
…ained slice) The reception-wire leg-1 header (wire_mempool_ingest) and the test_dash_node_reception_wire CMake registration were authored in the worktree but never committed to master -- this PR carries the FULL reception wire (legs 1+2), so a fresh checkout builds the KAT target and its mempool_ingest include. No file here is on master; purely additive, dash-only.
…> CoinStateMaintainer::on_block_connected Legs 1 (mempool) + 2 (tip) subscribed the mempool-relay and header/think TIP- ADVANCE events to the node-held embedded coin-state bundle. Nothing yet wired the BLOCK-CONNECT event, so in a live node the DMN set the embedded coinbase pays could only be seeded by a full mnlistdiff snapshot (on_mn_list_update) and never auto-maintained forward between snapshots. This leg closes that gap: - interfaces::Node gains an additive BlockConnected payload + Event<BlockConnected> block_connected. A bare full_block carries the block body but NOT the height on_block_connected -> MnStateMachine::apply_block needs (DIP3 special-tx chain position); block_connected pairs (block, height), exactly as leg 2 added TipAdvance for params best_block_hash could not carry. Purely additive, dash interface only (single-coin). - block_connect_ingest.hpp::wire_block_connect_ingest subscribes on_block_connected to block_connected, mirroring wire_mempool_ingest / wire_tip_ingest contract (by-ref capture, explicit-teardown disposable; dashd GBT arm retained as the fallback when the post-apply set can no longer back a payee). - test_dash_node_reception_wire gains leg-3 KATs off the real Event (no direct poke): a connected block that spends the sole MN collateral empties the DMN set and demotes the armed bundle to the dashd fallback; a no-special-tx block preserves readiness; dispose() stops ingest. Also carries the leg-1 recovery (mempool_ingest.hpp + test registration) that was authored in-worktree but never reached master via #686 -- without it the shared reception-wire KAT does not build. Additive, src/impl/dash/ only, dashd GBT fallback retained.
frstrtr
added a commit
that referenced
this pull request
Jul 13, 2026
…work() template source + assemble_work_job_targets() The embedded get_work chain was fully wired but had NO production consumer: NodeCoinState::select_work() (embedded template when the 4-leg reception wire (#693/#694) has populated the node bundle, else the retained dashd getblocktemplate fallback) and assemble_work_job_targets() (per-miner job-target arithmetic) each existed and were unit-tested, but nothing fused them into a single miner-facing entry. Only the test suites ever called select_work(). Add dash::stratum::get_work() (src/impl/dash/stratum/get_work.hpp): the first non-test caller of the embedded arm. It sources the base block template off the node-held NodeCoinState -- NO direct dashd poll on the hot path when the bundle is populated -- and assembles the job targets over whichever template arm ran. dashd_fallback stays REQUIRED and is invoked ONLY on a set-gap (unpopulated / invalidated bundle): the always-reachable safety + [GBT-XCHECK] cross-check arm, never removed. test_dash_get_work (4/4) pins the fused contract, seeding mirrored exactly from test_dash_node_embedded_wire (no fabricated oracle values): * set-gap routes DashdFallback (invoked once) and still assembles targets; * populated routes Embedded WITHOUT invoking the fallback, byte-equal to a direct build_embedded_workdata() over the node's own held state; * job targets are identical across both template sources; * on_invalidate (reorg) demotes back to the fallback. Registered in both build.yml --target allowlists. STRICTLY single-coin (src/impl/dash/ + test only), SAFE-ADDITIVE.
frstrtr
added a commit
that referenced
this pull request
Jul 14, 2026
…work() template source + assemble_work_job_targets() The embedded get_work chain was fully wired but had NO production consumer: NodeCoinState::select_work() (embedded template when the 4-leg reception wire (#693/#694) has populated the node bundle, else the retained dashd getblocktemplate fallback) and assemble_work_job_targets() (per-miner job-target arithmetic) each existed and were unit-tested, but nothing fused them into a single miner-facing entry. Only the test suites ever called select_work(). Add dash::stratum::get_work() (src/impl/dash/stratum/get_work.hpp): the first non-test caller of the embedded arm. It sources the base block template off the node-held NodeCoinState -- NO direct dashd poll on the hot path when the bundle is populated -- and assembles the job targets over whichever template arm ran. dashd_fallback stays REQUIRED and is invoked ONLY on a set-gap (unpopulated / invalidated bundle): the always-reachable safety + [GBT-XCHECK] cross-check arm, never removed. test_dash_get_work (4/4) pins the fused contract, seeding mirrored exactly from test_dash_node_embedded_wire (no fabricated oracle values): * set-gap routes DashdFallback (invoked once) and still assembles targets; * populated routes Embedded WITHOUT invoking the fallback, byte-equal to a direct build_embedded_workdata() over the node's own held state; * job targets are identical across both template sources; * on_invalidate (reorg) demotes back to the fallback. Registered in both build.yml --target allowlists. STRICTLY single-coin (src/impl/dash/ + test only), SAFE-ADDITIVE.
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.
S8 reception-wire, self-contained slice. Wires the live interfaces::Node event bus into the node-held CoinStateMaintainer so the embedded-template arm can flip on real reception (leg 2, new_tip, already on master @4854d02a).
Legs in this slice:
REBASE NOTE: branch was cut from an older master; rebased clean onto d37e776 so ONLY dash reception files come forward -- no regression of #690 (dgb_arith256 portable), dashboard doc, or bch/abla. Diff is dash-only + test/CMakeLists + both build.yml --target allowlists.
SAFE-ADDITIVE: new headers + additive interface events; dashd RPC fallback preserved (select_work demotes when bundle empty). Single-coin (src/impl/dash/ only). GPG-signed (f76a948, a1db112).
Leg 4 (mnlistdiff -> on_mn_list_update) needs an mnlistdiff event added to interfaces::Node -- follow-on slice.
Requesting integrator diff + full-rollup CI verify (oracle-clean, no false-green) -> operator tap. No self-merge.