dash(E2d): fold DIP-0004 type-5 CCbTx extra_payload into embedded template#765
Merged
Conversation
…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.
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.
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_workdataso the daemonless template becomes consensus-valid. Minimal cut: version / height / merkleRootMNList / merkleRootQuorums (+ bestCL when known), built via new inlinebuild_embedded_cbtx+encode_cbtxhelpers.Safety / parity
sml/qmgr/best_cl_*/last_observed_credit_poolparams all default tonullptr/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.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.