dash(S8): embedded_gbt live-wire selector + retained dashd fallback#672
Merged
Conversation
Add dash::coin::select_dash_work (work_source.hpp): the get_work branch point that prefers the locally-assembled embedded template (build_embedded_workdata) and falls back to dashd getblocktemplate when the embedded coin-state bundle is not viable. The dashd RPC arm is retained as fallback + [GBT-XCHECK] cross-check, never removed. Wire it into main_dash run_mine_block as the live consumer; NodeImpl does not yet hold embedded coin-state (MN list + mempool + header tip), so emb.has_state=false routes to the dashd fallback today (flagged next sub-slice). test_dash_work_source: 4/4 routing + retained-fallback KAT (harness-free; embedded oracle-parity already pinned by test_dash_embedded_gbt). Registered in both build.yml target allowlists.
frstrtr
added a commit
that referenced
this pull request
Jul 11, 2026
dash(S8): node-held coin-state flips select_dash_work hot arm (stacks on #672)
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
Adds
dash::coin::select_dash_work(src/impl/dash/coin/work_source.hpp) — the get_work branch point that prefers the locally-assembled embedded template (build_embedded_workdata) and falls back to dashd getblocktemplate when the embedded coin-state bundle is not viable. Wired intomain_dashrun_mine_blockas the live consumer.Why
build_embedded_workdatahas been source-complete (8/8 intest_dash_embedded_gbt, oracle: frstrtr/p2pool-dash getwork pre-v35) but had no live consumer. This is the embedded_gbt capstone: the running node now routes through the selector.Fallback retained (verify point 3)
The dashd RPC arm is never removed — it is both the fallback and the
[GBT-XCHECK]cross-check.viable()==falsealways routes there.Honest current state / flagged next sub-slice
NodeImpldoes not yet hold the embedded coin-state (MN list + mempool + header tip) thatbuild_embedded_workdataconsumes, soemb.has_state=falseand the selector routes to the dashd fallback today. Populating that in-process state is the next sub-slice; once it lands,emb.has_state=trueactivates the embedded arm with zero change to the call site. Flagging per your note — this stays a single-coinsrc/impl/dash/diff, no shared-tree touch.Tests
test_dash_work_source— 4/4 routing + retained-fallback KAT (harness-free; embedded oracle-parity already pinned bytest_dash_embedded_gbt).build.yml--target allowlists.c2pool-dash(wiredmain_dash) compiles clean.SAFE-ADDITIVE, single-coin DASH lane.