Skip to content

dash(E2d): fold DIP-0004 type-5 CCbTx extra_payload into embedded template#765

Merged
frstrtr merged 1 commit into
masterfrom
dash/e2d-cbtx-payload
Jul 20, 2026
Merged

dash(E2d): fold DIP-0004 type-5 CCbTx extra_payload into embedded template#765
frstrtr merged 1 commit into
masterfrom
dash/e2d-cbtx-payload

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 20, 2026

Copy link
Copy Markdown
Owner

E2d — block-validity: CCbTx extra_payload in the embedded GBT template

Depends on E2c (#749, merged; G3a block-production gate passed).

What

Folds the DIP-0004 type-5 CCbTx extra_payload into embedded_gbt.hpp:build_embedded_workdata so the daemonless template becomes consensus-valid. Minimal cut: version / height / merkleRootMNList / merkleRootQuorums (+ bestCL when known), built via new inline build_embedded_cbtx + encode_cbtx helpers.

Safety / parity

  • SAFE-ADDITIVE. New sml/qmgr/best_cl_*/last_observed_credit_pool params all default to nullptr/zero, so every existing caller is byte-for-byte unchanged and still gets an empty payload. Payload is only emitted when SML+quorum inputs are supplied.
  • Reward-neutral, opt-in (populated()/embedded-utxo path only).
  • Byte-parity for other coins — change is confined to src/impl/dash/coin/embedded_gbt.hpp (+33/-4).

Deferred (documented in-code, not this slice)

v3+ asset-lock / DIP-0027 credit-pool state machine — seeded from last_observed_credit_pool, still deferred.

CI ask

Full CI + the DASH G3a block-production gate requested on this diff. Oracle: frstrtr/p2pool-dash.

…plate

build_embedded_workdata emitted an empty coinbase extra_payload, so the
embedded (daemonless) template produced a consensus-INVALID Dash block.
Wire the already-present build_embedded_cbtx()/encode_cbtx() into the
template via optional SML/quorum seams (default nullptr => legacy callers
byte-unchanged, SAFE-ADDITIVE). Minimal cut: nVersion/nHeight/
merkleRootMNList/merkleRootQuorums (+bestCL when known); v3+ asset-lock/
DIP-0027 credit-pool state machine still deferred, seeded from last
observed creditPoolBalance.
@frstrtr
frstrtr merged commit 0e1e011 into master Jul 20, 2026
26 checks passed
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