Skip to content

dash(S8): embedded_gbt live-wire selector + retained dashd fallback#672

Merged
frstrtr merged 1 commit into
masterfrom
dash/s8-embedded-gbt-worksource
Jul 11, 2026
Merged

dash(S8): embedded_gbt live-wire selector + retained dashd fallback#672
frstrtr merged 1 commit into
masterfrom
dash/s8-embedded-gbt-worksource

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 11, 2026

Copy link
Copy Markdown
Owner

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 into main_dash run_mine_block as the live consumer.

Why

build_embedded_workdata has been source-complete (8/8 in test_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()==false always routes there.

Honest current state / flagged next sub-slice

NodeImpl does not yet hold the embedded coin-state (MN list + mempool + header tip) that build_embedded_workdata consumes, so emb.has_state=false and the selector routes to the dashd fallback today. Populating that in-process state is the next sub-slice; once it lands, emb.has_state=true activates the embedded arm with zero change to the call site. Flagging per your note — this stays a single-coin src/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 by test_dash_embedded_gbt).
  • Registered in both build.yml --target allowlists.
  • Local: KAT 4/4 green; c2pool-dash (wired main_dash) compiles clean.

SAFE-ADDITIVE, single-coin DASH lane.

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 frstrtr merged commit 60f6a3b into master Jul 11, 2026
26 checks passed
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)
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