wire --redistribute selector into won-block payout#319
Merged
Conversation
…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.
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.
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.