DGB: conform P2P accept-floor MINIMUM_PROTOCOL_VERSION 1700->1400 to oracle (last Phase-B divergence) - #599
Merged
Merged
Conversation
…ted 1700) MINIMUM_PROTOCOL_VERSION was 1700 sourced to a fabricated digibyte.py "NEW_MIN" field that the oracle (frstrtr/p2pool-dgb-scrypt) does not define. 1700 bound neither real oracle anchor. Conform to the oracle cold handshake floor: p2p.py:153 getattr(net,MINIMUM_PROTOCOL_VERSION,1400) => 1400, since networks/digibyte.py sets no MINIMUM_PROTOCOL_VERSION. Transition-safe: strictly more permissive than 1700, accepts older-baseline peers during the older->v36 window, newly rejects no one. Document the ratchet TARGET (SHARE_MINIMUM_PROTOCOL_VERSION=3500, oracle data.py:81); the runtime 95%%-of-window 1400->3500 ratchet (update_min_protocol_version, data.py:857) is the step-2 follow-up PR. Tests + g1 oracle-parity const moved to 1400. Per decisions@ approval of the proto-floor decision-needed.
frstrtr
added a commit
that referenced
this pull request
Jun 28, 2026
… to oracle (#602) Step-2 of the proto-floor conformance (step-1 #599 landed the cold floor 1400 + ratchet TARGET const 3500). Adds the pure SSOT free function dgb::ratchet_min_protocol_version (coin/desired_version_tally.hpp) mirroring p2pool-dgb-scrypt update_min_protocol_version (data.py:857-863): best-VERSION work-weight >= floor(total_weight * 95 / 100) => lift MINIMUM_PROTOCOL_VERSION 1400 -> 3500. Reads the same work-weighted desired-version map (get_desired_version_weights) over the same window [CHAIN_LENGTH*9//10, CHAIN_LENGTH//10] as the 60% switch gate (share_check step 2); this is its runtime sibling, lifting the inbound P2P handshake floor instead of rejecting a share. Integer math floor-divides exactly like the oracle (NOT cross-multiply -- the two differ at the boundary). KAT dgb_min_protocol_ratchet_test (9 cases, all hand-derived): guard, unanimous, exactly-95%, just-below, floor-div boundary (sum=101/best=95: ratchets under floor-div, would not under cross-mult), best-absent, empty-window oracle dict branch, work-weighted-not-flat-count, and consensus-magnitude (2^256-scale, no overflow). Registered in test CMakeLists + build.yml allowlist. Pure/additive: no production call-site rewired this slice (runtime wiring into the per-best-share loop is the follow-on, mirroring step-1 ship-core-then-wire). Consensus-bearing accept-floor value -> surface for operator merge-tap. 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.
Conforms the DGB P2P cold accept-floor to the canonical p2pool-digibyte oracle value.
WHAT
WHY SAFE
SCOPE
VERIFICATION
Acts on the decisions@ approval of the proto-floor [decision-needed]. No self-merge — integrator surfaces for operator merge-tap once CI is green.