Skip to content

dgb: Stage 4c — wire get_current_work_template coinbasevalue through #207 SSOT - #211

Merged
frstrtr merged 1 commit into
masterfrom
dgb/stage-4c-template-coinbasevalue
Jun 19, 2026
Merged

dgb: Stage 4c — wire get_current_work_template coinbasevalue through #207 SSOT#211
frstrtr merged 1 commit into
masterfrom
dgb/stage-4c-template-coinbasevalue

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Stage 4c (per integrator FYI on #209). get_current_work_template() no longer returns an empty object: it now emits the next-block height and its coinbasevalue, the latter derived through the #207 embedded SSOT (coinbase_value -> resolve_coinbase_value -> subsidy_func) keyed on next_block_height() (#209, == tip.height + 1; == base_height for an empty chain).

Scope (deliberately minimal, fenced to DGB)

  • Embedded path now: no external-daemon GBT value plumbed into the work source yet and mempool-fee aggregation unwired, so total_fees = 0. A present GBT coinbasevalue stays authoritative and fees add on top of subsidy in later slices without changing this SSOT call.
  • Deferred (following Stage 4c/4d slices): remaining GBT template fields (previousblockhash, bits, version, curtime, mintime, transactions[]) and the build_connection_coinbase gentx assembly (needs ShareTracker ref_hash + PPLNS payout map).

Test

+WorkTemplateEmitsHeightAndCoinbaseValueViaSsot pins height + coinbasevalue to the p2pool-dgb-scrypt oracle subsidy at the phase3 era boundary (400000 -> 2434410000); the prior stub-default assertion is relaxed. dgb_work_source_test 14/14 local, build EXIT=0. No new test target -> no build.yml change.

HOLD merge — integrator merges with operator push approval.

…Stage 4c)

get_current_work_template() now emits the next-block height and its
coinbasevalue instead of an empty object. The coinbasevalue is derived
through the #207 embedded SSOT (coinbase_value -> resolve_coinbase_value
-> subsidy_func) keyed on next_block_height() (#209, == tip.height + 1;
== base_height for an empty chain). Embedded path: no external-daemon GBT
value is plumbed in yet and mempool-fee aggregation is unwired, so
total_fees = 0; a present GBT coinbasevalue stays authoritative and fees
add on top of subsidy in later slices without changing this SSOT call.

The remaining GBT template fields (previousblockhash, bits, version,
curtime, mintime, transactions[]) and the build_connection_coinbase gentx
assembly land in following Stage 4c/4d slices.

Test: +WorkTemplateEmitsHeightAndCoinbaseValueViaSsot pins height +
coinbasevalue to the p2pool-dgb-scrypt oracle subsidy at the phase3 era
boundary; existing stub-default assertion relaxed. dgb_work_source_test
14/14.
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