diff --git a/src/impl/ltc/auto_ratchet.hpp b/src/impl/ltc/auto_ratchet.hpp index 9adb8f98e..dc828cf98 100644 --- a/src/impl/ltc/auto_ratchet.hpp +++ b/src/impl/ltc/auto_ratchet.hpp @@ -279,7 +279,11 @@ class AutoRatchet // source of truth for the version-switch gate is now share_check step 2, // which calls ShareTracker::get_desired_version_weights and matches // p2pool check() (data.py:1396-1414) exactly. The VOTING tail guard above - // stays inline and count-based (finding #1). + // is ALSO work-weighted: it calls ShareTracker::get_desired_version_weights + // over the oldest 10% of the window and couples activation to that same + // check()-phase 60% accept gate (mint<->accept coupling). It is NOT + // count-based -- a flat-count tail guard would let a 95%-by-count activation + // outrun the 60%-by-work accept gate and wedge the crossing. private: std::string state_file_; diff --git a/src/impl/ltc/share_check.hpp b/src/impl/ltc/share_check.hpp index 86f436d69..9456de357 100644 --- a/src/impl/ltc/share_check.hpp +++ b/src/impl/ltc/share_check.hpp @@ -1748,8 +1748,9 @@ bool share_check(const ShareT& share, // The weight is target_to_average_attempts per share — get_desired_version_weights, // matching canonical get_desired_version_counts (data.py:2651) — NOT a flat count. // F10/(b): the prior non-canonical 95%-obsolescence punish is removed; the - // canonical 60% switch rule is now the ONLY version gate. AutoRatchet stays - // count-based and does not gate peer shares here. + // canonical 60% switch rule is now the ONLY version gate. AutoRatchet's + // VOTING tail guard is work-weighted (get_desired_version_weights) and does + // not gate peer shares here. { auto chain_length = static_cast(params.chain_length); if (!share.m_prev_hash.IsNull() && tracker.chain.contains(share.m_prev_hash)) diff --git a/src/impl/ltc/share_tracker.hpp b/src/impl/ltc/share_tracker.hpp index 985c08a1c..088786b48 100644 --- a/src/impl/ltc/share_tracker.hpp +++ b/src/impl/ltc/share_tracker.hpp @@ -2152,10 +2152,11 @@ class ShareTracker // Canonical p2pool get_desired_version_counts (data.py:2651) weights each // share by target_to_average_attempts(share.target) — NOT a flat count. // The check()-phase 60% switch rule (share_check step 2) is a consensus gate - // and MUST use these weights to stay byte-identical with p2pool. AutoRatchet - // and its tail guard deliberately keep the FLAT-COUNT variant above - // (count-based per F10 finding #1 — weighting them would shift activation - // timing across the soak). Weight = ShareIndex::work (share.hpp). + // and MUST use these weights to stay byte-identical with p2pool. The + // AutoRatchet VOTING tail guard ALSO uses these work-weights (auto_ratchet.hpp + // calls get_desired_version_weights), coupling activation to the check()-phase + // 60% accept gate so a minted boundary share can never be rejected. There is + // no flat-count tail-guard codepath. Weight = ShareIndex::work (share.hpp). std::map get_desired_version_weights(const uint256& share_hash, int32_t lookbehind) { std::map weights;