Skip to content

btc(F-mirror F2): unify merged-mining PPLNS weight delta — ADAPTed on F1 (#85) - #320

Merged
frstrtr merged 1 commit into
masterfrom
btc/f2-mirror-adapt
Jun 22, 2026
Merged

btc(F-mirror F2): unify merged-mining PPLNS weight delta — ADAPTed on F1 (#85)#320
frstrtr merged 1 commit into
masterfrom
btc/f2-mirror-adapt

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Operator decision (via integrator): option (a) ADAPT F2 to preserve the F1 raw-key work already landed in #85 (btc/v36-parity-f1-rawkey, merge f532429). This is NOT a blind mirror of the LTC F2 patch.

What it does

  • Collapses the three divergent V36 merged-weight delta implementations (compute_merged_payout_hash inline walk, ensure_v36_skiplist, 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; a chain_id value drives the per-chain path (Tier 1 explicit, Tier 1.5 retroactive normalize as lookup probe only, else default key).

Composes on F1, no key-semantics change

  • BTC keeps the F1 raw default (btc: F1 v36 raw-key parity in payout/skiplist hashing #85): the default key was already the raw parent script in all three sites, so this is a pure structural unification. Applies the canonical (1,{},0,0)-after-key-resolves shape; drops the non-consensus [DOGE-TIER] per-share debug log.

Fence: BTC tree only — src/impl/btc/share_tracker.hpp (+105/-153). No bitcoin_family/ or src/core/ touched.

Cherry-picked clean onto current master (3326b94) atop F1; no conflict with #85.

Tests: merged-payout KATs 14/14 green — V36CrossImplRefHash (3) + PPLNSConsensus (11). GPG-signed.

…_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)
@frstrtr
frstrtr merged commit 4e45d60 into master Jun 22, 2026
20 checks passed
frstrtr added a commit that referenced this pull request Jun 23, 2026
btc(F-mirror F2): unify merged-mining PPLNS weight delta — ADAPTed on F1 (#85)
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