Skip to content

dash: fix bad-cb-payee — empty getwork payee falls through to raw script (G3b) - #565

Merged
frstrtr merged 1 commit into
masterfrom
dash/g3b-cb-payee-empty-payee
Jun 27, 2026
Merged

dash: fix bad-cb-payee — empty getwork payee falls through to raw script (G3b)#565
frstrtr merged 1 commit into
masterfrom
dash/g3b-cb-payee-empty-payee

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 27, 2026

Copy link
Copy Markdown
Owner

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 its push_payment lambda through the helper (behavior-identical except the empty-payee case).

Tests

test_dash_cb_payee — 7 cases (the empty-payee→!6a bug 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-dash compile+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.

… 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
frstrtr force-pushed the dash/g3b-cb-payee-empty-payee branch from 805004c to 97b3c24 Compare June 27, 2026 10:10
@frstrtr
frstrtr merged commit f24fd54 into master Jun 27, 2026
22 checks passed
@frstrtr
frstrtr deleted the dash/g3b-cb-payee-empty-payee branch June 27, 2026 15:12
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