dgb: standardize AutoRatchet mint gate to work-weighted accept gate (contract) - #289
Merged
Merged
Conversation
…te (contract) Mirrors the intent of ltc 865fdd7 onto the DGB lane. ltc-doge root-caused the v35->v36 crossing wedge (#97): the AutoRatchet mint gate activated on a 95%-by-flat-COUNT desired-version tally, but the consensus accept gate (share_check step 2 / p2pool check() data.py:1399) admits a V36 boundary share only at the WORK-WEIGHTED 60% rule (canonical get_desired_version_counts, data.py:2651, weights each share by target_to_average_attempts). Under heterogeneous hashrate the flat count outran the work-weighted accept gate, so the minter produced boundary shares every peer rejected -> frozen crossing. DGB carries NO AutoRatchet minter yet (no src/impl/dgb/auto_ratchet.hpp; the minter lands in Phase B). The DGB accept gate (share_check.hpp version-switch rule) is ALREADY work-weighted/canonical via get_desired_version_weights, and that accessor is KAT-pinned (#249). The ONLY artifact of the unsafe F10 flat-count choice on this lane is the design-contract recorded in comments, which would seed the exact wedge into the future port. This corrects those comments so DGB's AutoRatchet is born work-weighted: its activation tail guard MUST read get_desired_version_weights over the same [9/10*CL, CL] window at the same 60% threshold the accept gate enforces, superseding F10. v36-native shared structure (consensus version-signaling), standardized cross-coin for a clean v37 migration. Comment-only; zero behavior change (no minter exists to alter). Per-coin isolation preserved: touches src/impl/dgb/ only.
This was referenced Jun 21, 2026
Merged
frstrtr
added a commit
that referenced
this pull request
Jun 21, 2026
…#293) The DGB VOTING-state baseline share version was a [decision-needed] held on PR #292. Resolved against the canonical oracle frstrtr/p2pool-dgb-scrypt @22761e7 (2026-06-17): data.py:636 Share.VERSION=35, VOTING_VERSION=35, SUCCESSOR=None, share_versions={35:Share}; networks/digibyte.py:26 SEGWIT_ACTIVATION_VERSION=35. SUCCESSOR=None means 35 is the format the live node currently mints, so base_version=35 is unambiguous. The "older than LTC" divergence is the P2P PROTOCOL version (p2p.py VERSION=3501 vs LTC 3503), not the share version. New fenced header auto_ratchet_wire.hpp is the single production location of the baseline constant: make_dgb_ratchet() constructs AutoRatchet(target=36, base=35) and dgb_select_mint_versions() is the run-loop selector. The work-weighted tail guard already inside get_share_version keeps mint activation subordinate to the 60%-by-work accept gate (#249/#289) -- this seam adds no new policy. base_version stays an explicit constructor param so the v37 unified shape is clean. De-staled the [decision-needed] notes in auto_ratchet.hpp and share_test.cpp. +2 KATs pin the wired constant and bootstrap mint=35/vote=36; dgb_share_test 22/22 green. Surface-for-tap (consensus-bearing version-gate flip), HOLD. Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
frstrtr
added a commit
that referenced
this pull request
Jun 23, 2026
dgb: standardize AutoRatchet mint gate to work-weighted accept gate (contract)
frstrtr
added a commit
that referenced
this pull request
Jun 23, 2026
Port p2pool-v36 data.py AutoRatchet (mirrors src/impl/ltc/auto_ratchet.hpp) as the DGB mint side that pairs with the already work-weighted accept gate (#249/#289). Bucket-2 v36-native shared structure, standardized cross-coin toward the v37 unified form; VOTING tail guard is work-weighted so an activation can never outrun the 60%-by-work accept gate. DGB divergence from LTC: the VOTING-state minted version is a constructor parameter (base_version_), NOT the ltc hardcode target-1. Per operator re-scope, DGBs live pre-v36 baseline conforms to frstrtr/p2pool-dgb-scrypt and is OLDER than ltc v35; the exact value is a decision-needed for the run-loop wire-in. Module is surface-for-tap (unwired) until that lands. KAT (in dgb_share_test): pins thresholds 95/50/2x/60, proves base_version is parameterized (not hardcoded 35), bootstrap mints baseline while voting target, and JSON state persists across restart. 4/4 new, 20/20 suite green.
frstrtr
added a commit
that referenced
this pull request
Jun 23, 2026
…#293) The DGB VOTING-state baseline share version was a [decision-needed] held on PR #292. Resolved against the canonical oracle frstrtr/p2pool-dgb-scrypt @22761e7 (2026-06-17): data.py:636 Share.VERSION=35, VOTING_VERSION=35, SUCCESSOR=None, share_versions={35:Share}; networks/digibyte.py:26 SEGWIT_ACTIVATION_VERSION=35. SUCCESSOR=None means 35 is the format the live node currently mints, so base_version=35 is unambiguous. The "older than LTC" divergence is the P2P PROTOCOL version (p2p.py VERSION=3501 vs LTC 3503), not the share version. New fenced header auto_ratchet_wire.hpp is the single production location of the baseline constant: make_dgb_ratchet() constructs AutoRatchet(target=36, base=35) and dgb_select_mint_versions() is the run-loop selector. The work-weighted tail guard already inside get_share_version keeps mint activation subordinate to the 60%-by-work accept gate (#249/#289) -- this seam adds no new policy. base_version stays an explicit constructor param so the v37 unified shape is clean. De-staled the [decision-needed] notes in auto_ratchet.hpp and share_test.cpp. +2 KATs pin the wired constant and bootstrap mint=35/vote=36; dgb_share_test 22/22 green. Surface-for-tap (consensus-bearing version-gate flip), HOLD. Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
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.
What
Mirrors the intent of ltc
865fdd78(AutoRatchet mint↔accept coupling) onto the DGB lane, as a v36-native standardization (consensus version-signaling) for a clean v37 migration. Per-coin isolation: touchessrc/impl/dgb/only — not bundled with the LTC/BTC PRs.Why this is comment-only on DGB
DGB carries no AutoRatchet minter yet (no
src/impl/dgb/auto_ratchet.hpp; the minter lands in Phase B). So there is no executable flat-count tally to swap — the LTC wedge is structurally absent on this lane today. Two relevant facts on DGB:share_check.hppversion-switch rule, ~L1684) is already work-weighted/canonical viaget_desired_version_weights, KAT-pinned by dgb(test): pin get_desired_version_weights attempts-weighting conformance #249.share_tracker.hpp~L2129/L2646,share_check.hpp~L1657), which would seed the exact wedge into the future port.This corrects those comments so DGB's AutoRatchet is born work-weighted: its activation tail guard MUST read
get_desired_version_weightsover the same[9/10·CL, CL]window at the same 60% threshold the accept gate enforces, superseding F10.Bucket classification (3-bucket rule)
Bucket 2 — v36-native shared structure (consensus version-signaling): standardize cross-coin toward the v37 shape.
Risk
Comment-only. Zero behavior change (no minter exists to alter); confirmed no non-comment lines in the diff. No re-soak applies (nothing executable changed); the Phase-B minter port will carry its own crossing-soak gate.
HOLD merge — operator-tap-gated per consensus-version-signaling policy.