dash: fix bad-cb-payee — empty getwork payee falls through to raw script (G3b) - #565
Merged
Conversation
… script
dashd surfaces the platform credit-pool OP_RETURN burn inside the GBT
masternode[] array as {"payee":"","script":"6a","amount":N}. The
getwork parser took the payee-is-a-string branch unconditionally, set an
empty payee, and that empty address later failed base58 decode so the
burn output was dropped — yielding a coinbase missing a required output
and a bad-cb-payee rejection on submitblock.
Centralize the per-entry normalization into rpc_data.hpp::normalize_payment
and require a NON-EMPTY payee before treating it as a base58 address;
otherwise fall through to the raw "!"+script form. Adds test_dash_cb_payee
(7 cases) pinning the normalization; wired into CMakeLists + build.yml.
frstrtr
force-pushed
the
dash/g3b-cb-payee-empty-payee
branch
from
June 27, 2026 10:10
805004c to
97b3c24
Compare
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
G3b regression fix. On REAL testnet3 (fork-active) dashd surfaces the platform credit-pool OP_RETURN burn inside the GBT
masternode[]array as{"payee":"","script":"6a","amount":N}— payee PRESENT but EMPTY. The getwork parser took the payee-is-a-string branch unconditionally, set payee="", and that empty address failed base58 decode downstream → the burn output was silently dropped → assembled coinbase missing a required output → dashd rejects submitblock with bad-cb-payee.Fix
Centralize per-entry normalization into
rpc_data.hpp::normalize_payment; require a NON-EMPTY payee before treating it as a base58 address, else fall through to the raw!+script form so the burn output is preserved byte-for-byte.getwork()routes itspush_paymentlambda through the helper (behavior-identical except the empty-payee case).Tests
test_dash_cb_payee— 7 cases (the empty-payee→!6abug case, base58 kept, absent-payee→script, non-empty wins, empty+no-script, uint64 amount, non-object). 7/7 green Linux x86_64;dash_rpc/c2pool-dashcompile+link clean. Wired into CMakeLists + build.yml (both job lists).Scope
DASH-only, dash-fenced. Consensus-bearing (coinbase output assembly) → held for integrator verify + operator tap. Oracle-conform vs frstrtr/p2pool-dash. dashd-RPC fallback path unchanged. No self-merge.