Skip to content

dgb: delegate heartbeat_log diagnostics arithmetic to #389/#390 SSOTs (byte-id) - #403

Merged
frstrtr merged 1 commit into
masterfrom
dgb/node-diag-delegate-ssot
Jun 24, 2026
Merged

dgb: delegate heartbeat_log diagnostics arithmetic to #389/#390 SSOTs (byte-id)#403
frstrtr merged 1 commit into
masterfrom
dgb/node-diag-delegate-ssot

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Follow-on rewiring slice noted after #389/#390: the three open-coded arithmetic sites in NodeImpl::heartbeat_log are delegated onto the already-landed fenced SSOTs, closing the drift risk those headers were lifted to address.

Change

Why byte-identical

Each call reproduces the exact inline expression: same guards, the div-by-~0 floor at stale_prop >= 0.999, and the 1e18 average-attempts overflow sentinel. Operator-facing diagnostics only — consensus-neutral, no value semantics changed.

Proof

Isolation

src/impl/dgb/ only. No shared-base / other-coin tree touched.

NO self-merge — integrator taps.

Rewire the three open-coded arithmetic sites in NodeImpl::heartbeat_log
onto the already-landed fenced SSOTs, eliminating the drift risk the
SSOT headers were lifted to close (#389 pool_efficiency, #390 etb):

  - stale_prop      -> dgb::compute_stale_prop()
  - real_pool_hs    -> dgb::compute_real_pool_hashrate()
  - etb_secs        -> dgb::compute_expected_time_to_block()

Byte-identical by construction: each call reproduces the exact inline
expression (same guards, same div-by-~0 floor at stale_prop>=0.999, same
1e18 average-attempts overflow sentinel). Operator-facing diagnostics
only; consensus-neutral, no value semantics changed. Math is already
pinned against the p2pool-dgb-scrypt oracle by the #389/#390 SSOT KATs.

Per-coin isolation: src/impl/dgb/ only.
@frstrtr
frstrtr merged commit 199ae0c into master Jun 24, 2026
32 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