Skip to content

btc(v36): segwit gate consumes PoolConfig SSOT (FLAG 2) + FLAG 4 comment refresh - #123

Merged
frstrtr merged 1 commit into
masterfrom
btc/v36-flag2-segwit-ssot
Jun 17, 2026
Merged

btc(v36): segwit gate consumes PoolConfig SSOT (FLAG 2) + FLAG 4 comment refresh#123
frstrtr merged 1 commit into
masterfrom
btc/v36-flag2-segwit-ssot

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 17, 2026

Copy link
Copy Markdown
Owner

FLAG 2 — segwit activation single-source-of-truth (BTC-only)

V36 pre-scan (#119 follow-up) surfaced a structural divergence: share_check.hpp gated all segwit serialization/merkle paths on the namespace-local btc::SEGWIT_ACTIVATION_VERSION (share_types.hpp = 17) rather than the declared SSOT PoolConfig::SEGWIT_ACTIVATION_VERSION (= 33, jtoomim bitcoin.py:35).

Change (per-coin isolated — touches only src/impl/btc/)

  • share_types.hpp: retire the local = 17 constant; route is_segwit_activated() at PoolConfig::SEGWIT_ACTIVATION_VERSION; add config_pool.hpp include (no cycle — config_pool has no share_types dep).
  • share_check.hpp: all 6 gate sites btc::SEGWIT_ACTIVATION_VERSION -> btc::PoolConfig::SEGWIT_ACTIVATION_VERSION.
  • config_pool.hpp (FLAG 4, comment-only): refresh the stale COMBINED_DONATION_SCRIPT comment ("BTC stays at v35") to reflect v36-active BTC shares; donation leg intentionally stays V35 P2PK (forrestv canonical), COMBINED P2SH remains LTC-only. No byte change.

Risk

Low live risk — only legacy v17..v32 fall in the gap; the live sharechain is v35/v36. Genuine structural fix: the gate now agrees with config across every path.

Status

  • Cross-check (LTC/DGB): BTC-only — LTC is 17->17 no-op (skipped per integrator), DGB rides LTC path (config consistent). One PR per coin; this is the BTC tree only.
  • NOT built — staged read-only under the capacity-return hold.
  • Do not merge — merge is operator-gated.

base fd8f99ca (master) · commit c40869df (signed)

share_check.hpp gated segwit serialization/merkle paths on the
namespace-local btc::SEGWIT_ACTIVATION_VERSION (share_types.hpp = 17)
instead of PoolConfig::SEGWIT_ACTIVATION_VERSION (= 33, jtoomim
bitcoin.py:35) — the declared single source of truth. Retire the
share_types-local constant, route is_segwit_activated() and all six
share_check.hpp gate sites at PoolConfig, and add the config_pool.hpp
include to share_types.hpp (no cycle: config_pool has no share_types dep).

Low live risk (only legacy v17/v32 fall in the 17..32 gap; the live
sharechain is v35/v36) but a genuine structural divergence — the gate
now agrees with config across all paths.

Also refresh the stale COMBINED_DONATION_SCRIPT comment (FLAG 4): BTC now
runs v36-active shares; its donation leg intentionally stays the V35 P2PK
(forrestv canonical BTC-mainnet donation) while the COMBINED P2SH remains
LTC-only. Comment-only; no byte change.

No build (capacity-return hold); staged read-only for operator-gated review.
@frstrtr
frstrtr merged commit 0e1cb72 into master Jun 17, 2026
17 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