bch: delegate V36 share-version gate to core::version_gate SSOT - #160
Merged
Conversation
Point BCH per-coin V36 share-format activation sites at the merged core::version_gate::is_v36_active SSOT (core/version_gate.hpp), mirroring the BTC reference adoption. Pure mechanical site-rewrite: every gate keeps value 36 and byte-identical V36 share-encoding / PPLNS / donation behaviour -- no semantic change. Converted (26 sites): share.hpp x6 (if constexpr version >= 36), share_check.hpp x20 (constexpr ver / runtime p.share_version / share_ver / ShareT::version / MergedMiningShare::version >= 36). share_tracker.hpp has no >= 36 site (unlike BTC) so it is unchanged. Left bare (not V36 share-format gates, matching BTC): ShareT::version < 36, m_desired_version comparisons, BaseShare<36> template params, and the config_pool donation gate (pre-V36 transition compat, per-coin bucket-3). Segwit activation stays on per-coin is_segwit_activated() (BCH sentinel- disabled) and is untouched. V36 master-compat: preserved (gate value unchanged). p2pool-merged-v36 surface: none.
frstrtr
added a commit
that referenced
this pull request
Jun 19, 2026
node.hpp generate_share_transaction v36 flag and config_pool.hpp get_donation_script selection were still using literal (ver >= 36); #160 covered share.hpp/share_check.hpp/share_tracker.hpp but missed these two sites. Delegate both to core::version_gate::is_v36_active (V36_ACTIVATION_VERSION == 36, predicate-identical, zero divergence) and add explicit includes. Completes the SSOT delegation; no behaviour change.
frstrtr
added a commit
that referenced
this pull request
Jun 19, 2026
…BTC) The get_donation_script version gate was deliberately left bare in #160 as bucket-3 pre-V36 transition compat (per-coin, temporary, dropped after the crossing-soak) and to mirror BTC 1:1 (BTC did not route its donation gate through core::version_gate either). Routing it through the SSOT in 268eeec silently diverged BCH from BTC; revert. Whether the donation predicate should standardize cross-coin is a [decision-needed] for the operator/integrator, not a unilateral BCH change. node.hpp SSOT delegation (genuine #160 miss) is retained.
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.
Points BCH per-coin V36 share-format activation sites at the merged
core::version_gate::is_v36_activeSSOT (#148, core/version_gate.hpp), mirroring the BTC reference adoption. V37-standardization delegation.Pure mechanical — every gate keeps value 36 and byte-identical V36 share-encoding / PPLNS / donation behaviour. No semantic change.
Converted (26 sites):
share.hppx6,share_check.hppx20 (constexpr ver / runtime p.share_version / share_ver / ShareT::version / MergedMiningShare::version).share_tracker.hpphas no>= 36site (unlike BTC) so it is unchanged.Left bare (not V36 share-format gates, matching BTC):
ShareT::version < 36,m_desired_versioncomparisons,BaseShare<36>template params, and the config_pool donation gate (pre-V36 transition compat). Segwit stays on per-coinis_segwit_activated()(BCH sentinel-disabled), untouched.BCH-only; per-coin isolation clean. V36 master-compat preserved; p2pool-merged-v36 surface: none.