ltc(v36): raw parent-script merged-weight key, matching p2pool address_key (F1) - #86
Merged
Merged
Conversation
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.
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.
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:
Reviewer verdict: APPROVE (LTC+DOGE production perspective, ltc-doge-production-steward).
Head SHA at PR open: 8ca1795