dash(S8): get_work() consumer capstone — fuse NodeCoinState::select_work() + assemble_work_job_targets() - #695
Closed
frstrtr wants to merge 1 commit into
Conversation
…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
…roved #695) dash(S8): get_work() consumer capstone — fuse NodeCoinState::select_work() + assemble_work_job_targets()
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 get_work() consumer capstone — the first production caller of the embedded arm
Stacks on #694 (reception-wire leg 4). Base =
dash/s8-reception-wire-mnlist-legso the diff is this one commit; rebases clean to master once #693 → #694 land.What was missing
The embedded get_work chain was fully wired but had no production consumer. Both halves existed and were unit-tested in isolation:
NodeCoinState::select_work()(dash(S8): embedded_gbt live-wire selector + retained dashd fallback #672/dash(S8): node-held coin-state flips select_dash_work hot arm (stacks on #672) #673) — the template source: embeddedbuild_embedded_workdata()(oracle parity vsfrstrtr/p2pool-dashgetwork(), older-than-v35) when the node-held bundle is populated by the 4-leg reception wire (dash(S8): reception-wire legs 1+3 -- new_tx/block_connected -> CoinStateMaintainer (rebased on master) #693/dash(S8): reception-wire leg 4 -- mn_list_update -> on_mn_list_update (closes the 4-leg wire) #694), else the retained dashdgetblocktemplatefallback.assemble_work_job_targets()— the per-miner job-target arithmetic (work.py:368–426).Nothing fused them. Only the test suites ever called
select_work().This slice
dash::stratum::get_work()(src/impl/dash/stratum/get_work.hpp) — the single miner-facing entry, the first non-test caller of the embedded arm:NodeCoinState— no direct dashd poll on the hot path when the bundle is populated;dashd_fallbackstays REQUIRED, invoked only on a set-gap (unpopulated / invalidated bundle) — the always-reachable safety +[GBT-XCHECK]cross-check arm, never removed.Evidence
test_dash_get_work— 4/4 green (seeding mirrored exactly fromtest_dash_node_embedded_wire, no fabricated oracle values):DashdFallback(fallback invoked once) and targets still assembled;Embedded, fallback not invoked, byte-equal to a directbuild_embedded_workdata()over the node's own held state;on_invalidate()(reorg) demotes back to the fallback.Local:
dashobject lib builds rc=0;ctest -R ^DashGetWork→ 4/4 (out of 4). Registered in bothbuild.yml --targetallowlists.Safety posture
STRICTLY single-coin (
src/impl/dash/+ test only), SAFE-ADDITIVE — nobitcoin_family/src/core/ other-coin reach, per-coin isolation intact. dashd RPC fallback preserved. No self-merge — integrator verify (oracle + full CI) → operator tap.