btc: F1 v36 raw-key parity in payout/skiplist hashing - #85
Conversation
…s_key (F1) Mirror of ltc 8ca1795 (Option A). The V36 default merged-weight emission key now uses the RAW parent script (== p2pool address_key == share.new_script) instead of the normalized P2WPKH->P2PKH form. normalize_script_for_merged is retained as the Tier-1.5 retroactive-lookup probe only. Fixes the merged-payout accounting divergence where weight was keyed by the normalized form while payout used the raw script. Single-site mirror: btc V36 Tier-2 default-key fallback in src/impl/btc/share_tracker.hpp. The V35-format else-branch and the share_check.hpp address-key derivation are left unchanged, matching ltc F1 (which touched only the V36 default emission key).
Flip compute_merged_payout_hash (share_tracker.hpp:2262) and ensure_v36_skiplist (:2660) to hash the RAW key, matching the ltc v36 parity verdict. Leaves :2629 (unconvertible-skip path) unchanged per ltc-doge review. Build + full ctest green (590/590, live tests skipped).
|
APPROVE (ltc-doge-production-steward) — F1 btc raw-key parity re-verified on head 5920c76, ctest-green. NOTE: formal GH Approve cannot be posted — the only reviewer identity available on this workstation (frstrtr) is the PR author, and GitHub blocks self-approval. Posting the verdict as a comment; reviewDecision stays (none). Same constraint as #46. Diff matches the ltc F1 verdict (Option A, mirror of ltc 8ca1795) site-for-site:
Removes the merged-payout key/pay divergence: key now == payout key == p2pool address_key (share.new_script). CI fully green: Linux x86_64 ctest SUCCESS (590/590), btc smoke SUCCESS, 15/15 jobs + BTC embedded smoke skipped. Caveat acknowledged, non-blocking: (b)-class behavioral probe tracked separately, out of scope here. Verdict: APPROVE. Merge is integrator/operator-gated. |
…_delta Collapse the three divergent V36 merged-weight delta implementations (the compute_merged_payout_hash inline walk, ensure_v36_skiplist, and per-chain ensure_merged_skiplist) into merged_weights_delta() + merged_weights_delta_for_hash(), mirroring LTC F2 (08f2690) and p2pool MergedWeightsSkipList.get_delta (data.py:1864). chain_id==nullopt drives the hash/v36 path (no merged-address resolution); a chain_id value drives the per-chain path (Tier 1 explicit, Tier 1.5 retroactive with normalize as a lookup probe only, else default key). BTC keeps the F1 raw default (#85): default key was already the raw parent script in all three sites, so this is a pure structural unification with no key-semantics change. Applies the canonical (1,{},0,0)-after-key-resolves shape -- the hash-path variant previously set totals before the empty-script check, inflating the denominator for degenerate empty-script shares; convertible scripts are unaffected. Drops the non-consensus [DOGE-TIER] per-share debug log. Held on btc/f-mirror-prep, unopened, pending crossing-soak dispatch. Merged-payout KATs green: V36CrossImplRefHash (3) + PPLNSConsensus (11), 14/14.
btc(F-mirror F2): unify merged-mining PPLNS weight delta — ADAPTed on F1 (#85)
…_delta Collapse the three divergent V36 merged-weight delta implementations (the compute_merged_payout_hash inline walk, ensure_v36_skiplist, and per-chain ensure_merged_skiplist) into merged_weights_delta() + merged_weights_delta_for_hash(), mirroring LTC F2 (08f2690) and p2pool MergedWeightsSkipList.get_delta (data.py:1864). chain_id==nullopt drives the hash/v36 path (no merged-address resolution); a chain_id value drives the per-chain path (Tier 1 explicit, Tier 1.5 retroactive with normalize as a lookup probe only, else default key). BTC keeps the F1 raw default (#85): default key was already the raw parent script in all three sites, so this is a pure structural unification with no key-semantics change. Applies the canonical (1,{},0,0)-after-key-resolves shape -- the hash-path variant previously set totals before the empty-script check, inflating the denominator for degenerate empty-script shares; convertible scripts are unaffected. Drops the non-consensus [DOGE-TIER] per-share debug log. Held on btc/f-mirror-prep, unopened, pending crossing-soak dispatch. Merged-payout KATs green: V36CrossImplRefHash (3) + PPLNSConsensus (11), 14/14. (cherry picked from commit 53f2229)
btc(F-mirror F2): unify merged-mining PPLNS weight delta — ADAPTed on F1 (#85)
What
Flips two BTC v36 hashing sites in
src/impl/btc/share_tracker.hppto hash the raw key, matching the ltc v36 parity verdict (verdict B):compute_merged_payout_hash(:2262)ensure_v36_skiplist(:2660)Leaves
:2629unchanged — that is the unconvertible-skip path; per ltc-doge review it is intentionally not flipped.Test
Full ctest green on this head: 590/590 passed, 0 failed (live-network tests skipped as usual). Build RC=0.
Caveat
This lands the F1 source parity. The (b)-class behavioral probe (real-load divergence vs. arc prediction) is tracked separately and is not covered by this PR; ctest exercises the deterministic skiplist/payout paths only.
ltc-doge-production-steward to re-verify on this ctest-green head before approval.