Skip to content

ltc(v36): raw parent-script merged-weight key, matching p2pool address_key (F1) - #86

Merged
frstrtr merged 4 commits into
masterfrom
ltc-doge/v36-transition-parity
Jun 12, 2026
Merged

ltc(v36): raw parent-script merged-weight key, matching p2pool address_key (F1)#86
frstrtr merged 4 commits into
masterfrom
ltc-doge/v36-transition-parity

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Option A raw-key fix for the v35->v36 PPLNS transition on LTC. Keys merged-weight accounting by the raw parent script, matching p2pool address_key (F1), eliminating the gentx-txid divergence that pre-fix manifested as reject -> ban -> peer-flap.

Scope: src/impl/ltc/ only (auto_ratchet.hpp, share_check.hpp, share_tracker.hpp). Single-coin LTC tree; no shared-base or cross-coin changes. The btc mirror is separate (PR #85).

Validation — 3-phase live crossing soak on .157 (VM113), PASS:

  • post-stable 8/8 CONFIRMED ticks; ratchet drove HYBRID/ACTIVATED (t1-25) -> POST/CONFIRMED (t26-33) organically.
  • bad_cum=0 across all 33 ticks; shares=400 stale=0 orphan=0 peers=1 held steady, zero ban/flap over the 48-min window.
  • charlie (raw parent-script key) converged and held 35-36% through POST.
  • merged_parity=n/a is by-design (per-share gentx hash-equality lives in the offline F-stack harness, not the live sentinel); zero rejects across the crossing is the stronger live signal. Hash-level equality separately covered by the captured first-divergence artifact (txid 41d54aa8 vs ced195c0).

Reviewer verdict: APPROVE (LTC+DOGE production perspective, ltc-doge-production-steward).
Head SHA at PR open: 8ca1795

frstrtr added 4 commits June 12, 2026 03:23
Collapse the three divergent V36 merged-weight delta implementations --
the compute_merged_payout_hash inline walk, ensure_v36_skiplist, and the
per-chain ensure_merged_skiplist -- into a single merged_weights_delta()
template plus a merged_weights_delta_for_hash() wrapper, mirroring p2pool
MergedWeightsSkipList.get_delta (data.py:1864 @ 42ccca53).

chain_id == nullopt drives the hash/v36 path (no merged-address
resolution); a chain_id value drives the per-chain path (Tier 1 explicit
merged_addresses, Tier 1.5 retroactive miner->merged lookup with normalize
as a probe only, else the default key).

Behavioral convergence: the hash-path variant previously set total_weight/
donation before the convertibility check, inflating the denominator for
unconvertible scripts; it now follows the canonical (1,{},0,0) shape like
the other two -- totals are set only once a weight key resolves. Drops the
non-consensus [DOGE-TIER] per-share debug log.

Default key remains normalize_script_for_merged() here; F1 flips it to the
raw parent script (p2pool address_key = share.new_script).

Part of the V36 transition/PPLNS conformance stack (F2 -> F10 -> F11 -> F1).
…cal 95% punish (F10)

- share_check step 2: replace retroactive 95%-obsolescence check with the
  canonical p2pool check() 60% PPLNS-weighted switch rule (data.py:1396-1414),
  evaluated only at version boundaries vs the parent.
- ShareTracker::get_desired_version_weights: new uint288 PPLNS-weighted variant
  (weight = ShareIndex::work) for the consensus gate; flat-count
  get_desired_version_counts retained for AutoRatchet + tail guard (count-based,
  finding #1 — weighting them would shift activation timing).
- Drop should_punish_version (95% obsolescence) and its Phase-4 head-scoring
  input (share_tracker.hpp:1148); head-scoring now punishes only naughty heads.
- Remove dead validate_version_switch (0 callers).

Restores #81 zero-divergence parity vs p2pool-merged-v36: no reject/score-down
of shares canonical accepts. Linux x86_64 ctest 590/590.
…ort (F11)

Per-miner dests exclude BOTH donation scripts; COMBINED_DONATION_SCRIPT-keyed weight folds into the single donation-last output, DONATION_SCRIPT-keyed weight dropped. Matches p2pool data.py generate_transaction. 3 LTC writers.
…s_key (F1)

Default merged-weight emission key now uses the RAW parent script (== p2pool address_key = share.new_script) instead of the normalized P2PKH form. normalize_script_for_merged retained as the Tier-1.5 lookup probe only. Fixes the merged-payout accounting divergence (weight keyed 76a914<h160> while payout used raw 0014). Option A.
@frstrtr
frstrtr merged commit 219cb1e into master Jun 12, 2026
16 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