dgb(phase-b): wire --redistribute selector into the won-block payout path (follow-up to #307)#308
Closed
frstrtr wants to merge 1 commit into
Closed
dgb(phase-b): wire --redistribute selector into the won-block payout path (follow-up to #307)#308frstrtr wants to merge 1 commit into
frstrtr wants to merge 1 commit into
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.
Follow-up slice to #307 (Redistribute V2 policy port), per integrator direction: arg parsing + selector into the DGB won-block coinbase pubkey path. Stacked on #307 (consumes
src/impl/dgb/redistribute.hpp); retarget to master once #307 lands.What
--redistribute SPEC(opt-in), build a configureddgb::Redistributor, bindDGBWorkSource::set_fallback_payout_fn(new producer seam, parallel toset_mint_share_fn). Threaded throughrun_node().FallbackPayoutFnseam consumed at the ShareAccept mint branch only whenaddress_to_script(username)yields empty (empty/broken stratum creds). Unbound => byte-identical to before (default run unchanged).uint160::GetHex(), which reverses byte order and would stamp a reversed hash (caught by KAT during bring-up).c2pool-dgblinks +--selftestOK.Safety
src/impl/dgb/+src/c2pool/main_dgb.cpponly; no ltc/doge/btc/shared-base touch.Deferred (next slice)
pick()path (raw-byte conversion already in place; needs identity plumbing + live tracker-walk threading review). Operator payout identity forfeenot yet plumbed -> fail-safe null today.