Skip to content

wire --redistribute selector into won-block payout#319

Merged
frstrtr merged 1 commit into
masterfrom
dgb/redistribute-arg-wire
Jun 22, 2026
Merged

wire --redistribute selector into won-block payout#319
frstrtr merged 1 commit into
masterfrom
dgb/redistribute-arg-wire

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Re-land of auto-closed #308 (stacked-squash casualty: #307 merged to master as 3326b94, which deleted base branch dgb/phase-b-pool-share and auto-closed #308).

Rebased dgb/redistribute-arg-wire --onto origin/master, dropping the now-merged #307 commit. Single commit a142697 replayed cleanly, zero conflicts.

Wires the --redistribute selector (Redistribute V2 node-local policy from #307) into the won-block coinbase payout path in main_dgb run-loop. Fenced to DGB lane (src/c2pool/main_dgb.cpp DGB entry point, src/impl/dgb/stratum/, src/impl/dgb/test/). redistribute_test green.

Operator pre-approved (merge-after-307); land on CI-green, no second tap needed.

…path

Follow-up to #307 (Redistribute V2 policy port). Threads an opt-in
--redistribute SPEC arg into the DGB run-loop and binds a node-local
fallback payout selector so a share minted from a submission whose
stratum username carries no valid payout address gets its stamped
pubkey chosen by the operator policy instead of being left empty.

- main_dgb: parse --redistribute, build a configured Redistributor,
  bind DGBWorkSource::set_fallback_payout_fn (new producer seam,
  parallel to set_mint_share_fn). Threaded through run_node().
- work_source: FallbackPayoutFn seam consumed at the ShareAccept mint
  branch only when address_to_script(username) yields empty; unbound =
  byte-identical to before (default run unchanged). Fail-safe: an empty
  fallback is left empty; an unconfigured (null-hash) identity yields no
  script -- never a burn output to the all-zero hash.
- donate identity resolves to the canonical V36 combined-donation P2SH;
  scriptPubKey built from the RAW 20-byte hash160 (NOT uint160::GetHex,
  which reverses byte order and would stamp a reversed hash).
- redistribute_test: +3 KAT (arg-spec -> hybrid weights, donate ->
  byte-identical combined-donation P2SH, fee-without-operator fail-safe
  null). 8/8 green; c2pool-dgb links.

Node-local, consensus-safe (sharechain validation/codec/PPLNS
untouched); bucket-2 cross-coin standardization. Payout-adjacent ->
surface-for-tap. pplns/boost/fee script derivation: follow-up slice.
@frstrtr frstrtr merged commit 5bb951f into master Jun 22, 2026
31 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