Skip to content

core(version-gate): wire BTC accept seam to verify_version_transition SSOT (step 2, stacked on #597) - #600

Merged
frstrtr merged 2 commits into
masterfrom
btc/version-gate-seam-wire-step2
Jul 1, 2026
Merged

core(version-gate): wire BTC accept seam to verify_version_transition SSOT (step 2, stacked on #597)#600
frstrtr merged 2 commits into
masterfrom
btc/version-gate-seam-wire-step2

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 28, 2026

Copy link
Copy Markdown
Owner

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.hpp with a call to the core SSOT core::version_gate::verify_version_transition added 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.

frstrtr added 2 commits July 1, 2026 17:08
…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
frstrtr force-pushed the btc/version-gate-seam-wire-step2 branch from d551919 to 1a8edae Compare July 1, 2026 17:09
@frstrtr
frstrtr merged commit c72b493 into master Jul 1, 2026
22 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