core(version-gate): wire BTC accept seam to verify_version_transition SSOT (step 2, stacked on #597) - #600
Merged
Merged
Conversation
…T (additive) Add the canonical v36-native share-version-transition RULE to core::version_gate as a templated function verify_version_transition. This standardizes the boundary admit/reject decision SHAPE that is currently inlined per-coin (BTC share_check.hpp ~1756-1815; DASH share_check.hpp ~656). The function applies the decision to an ALREADY-EXTRACTED (parent_version, share_version) pair plus a PRECOMPUTED PPLNS-WEIGHTED desired-version tally for the [CHAIN_LENGTH*9/10, CHAIN_LENGTH] window and a have_history flag. Per-coin version extraction and window-weight plumbing stay in each coin caller (legitimate per-coin divergence). Rule (p2pool data.py check()): same-version always valid; +1 upgrade needs >= 60% weighted support AND CHAIN_LENGTH history; -1 (AutoRatchet deactivation) valid; any other jump throws when history exists; with insufficient history only a +1 upgrade is rejected. Byte-for-byte equivalent to the BTC inline gate. Additive and behavior-preserving: NO callers in this PR. Includes a core_test KAT (version_gate_test.cpp, uint288 weights) covering same-version, +1 with/without 60% support, +1 without history, -1 downgrade, multi-jump with/without history, and the exact-60% boundary.
… SSOT (step 2) Replace the inline 60%-weighted version-transition boundary in src/impl/btc/share_check.hpp with a call to the core SSOT added in #597. Behavior-preserving / byte-for-byte: all six transition shapes (same-version, +1, -1, multi-jump x history/no-history) and every error string ("switch without enough hash power upgraded", "invalid version jump from..to..", "switch without enough history") are unchanged. The PPLNS-weighted desired-version window is still fetched lazily only on the +1-with-history boundary; other shapes pass an empty map the SSOT never reads. Floor defaults to V36_ACTIVATION_VERSION (BTC has no obsolescence branch). Stacked on #597 (needs core::version_gate::verify_version_transition to compile); held behind it, expects rebase onto master once #597 lands.
frstrtr
force-pushed
the
btc/version-gate-seam-wire-step2
branch
from
July 1, 2026 17:09
d551919 to
1a8edae
Compare
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.
Step 2 of the integrator-approved 3-step Axis-3 standardization (step 1 = #597).
Replaces the inline 60%-weighted version-transition boundary in
src/impl/btc/share_check.hppwith a call to the core SSOTcore::version_gate::verify_version_transitionadded in #597.Byte-for-byte / behavior-preserving — verified across all six transition shapes (same-version, +1, -1, multi-jump x history/no-history); every accept/reject outcome and every error string is unchanged. The PPLNS-weighted desired-version window is still fetched lazily only on the +1-with-history boundary; other shapes pass an empty map the SSOT never reads. Floor defaults to
V36_ACTIVATION_VERSION(BTC has no obsolescence branch).HELD behind #597. Stacked on #597 head 59b0825 because the call site needs the SSOT to compile — cannot be based off master until #597 lands. Do NOT merge before #597; expects rebase onto fresh master once #597 lands. No self-merge. Gate = four coin smokes + btc ASan green.
Sequencing: step 3 (DASH obsolescence branch onto the defaulted floor param) stays staged/unstarted until this seam is proven.