Skip to content

DGB: conform P2P accept-floor MINIMUM_PROTOCOL_VERSION 1700->1400 to oracle (last Phase-B divergence) - #599

Merged
frstrtr merged 1 commit into
masterfrom
dgb/proto-floor-1400-conform
Jun 28, 2026
Merged

DGB: conform P2P accept-floor MINIMUM_PROTOCOL_VERSION 1700->1400 to oracle (last Phase-B divergence)#599
frstrtr merged 1 commit into
masterfrom
dgb/proto-floor-1400-conform

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Conforms the DGB P2P cold accept-floor to the canonical p2pool-digibyte oracle value.

WHAT

  • MINIMUM_PROTOCOL_VERSION 1700 -> 1400 (oracle p2p.py:153 getattr fallback; networks/digibyte.py defines no MINIMUM_PROTOCOL_VERSION, so the prior 1700 + NEW_MIN sourcing bound no real anchor).
  • Documents ratchet TARGET as SHARE_MINIMUM_PROTOCOL_VERSION=3500 (oracle data.py:81). The runtime 95%-of-window 1400->3500 ratchet (oracle update_min_protocol_version, data.py:857) is deferred to its own follow-up PR + KAT (net-new consensus-path code).
  • Tests + g1 oracle const moved to 1400.

WHY SAFE

  • Strictly MORE permissive than 1700: accepts older-baseline peers during older->v36 window, newly rejects no one. Transition-safe.
  • Value identical at cold start under both option-a (oracle-faithful) and static-(b) readings of the approval.

SCOPE

  • Fenced to src/impl/dgb/ only. No shared/other-coin tree touched. Single-coin smoke gate applies.

VERIFICATION

  • Local KATs on .198: 22/22 DGB_share_test + 5/5 dgb_g1_oracle_byte_parity.
  • Closes the LAST open Phase-B oracle-conformance divergence (isolation, donation P2SH, PPLNS, wire/field-order, target-math, tuning-constants already PARITY).

Acts on the decisions@ approval of the proto-floor [decision-needed]. No self-merge — integrator surfaces for operator merge-tap once CI is green.

…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
frstrtr merged commit ca07ff9 into master Jun 28, 2026
32 checks passed
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>
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