dgb: delegate heartbeat_log diagnostics arithmetic to #389/#390 SSOTs (byte-id) - #403
Merged
Conversation
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.
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.
Follow-on rewiring slice noted after #389/#390: the three open-coded arithmetic sites in
NodeImpl::heartbeat_logare delegated onto the already-landed fenced SSOTs, closing the drift risk those headers were lifted to address.Change
stale_prop->dgb::compute_stale_prop()(pool_efficiency.hpp, dgb(Phase-B): SSOT pool efficiency / real-hashrate diagnostics + non-circular KAT #389)real_pool_hs->dgb::compute_real_pool_hashrate()(pool_efficiency.hpp, dgb(Phase-B): SSOT pool efficiency / real-hashrate diagnostics + non-circular KAT #389)etb_secs->dgb::compute_expected_time_to_block()(expected_time_to_block.hpp, dgb(Phase-B): SSOT expected-time-to-block diagnostic + non-circular KAT #390)Why byte-identical
Each call reproduces the exact inline expression: same guards, the div-by-~0 floor at
stale_prop >= 0.999, and the1e18average-attempts overflow sentinel. Operator-facing diagnostics only — consensus-neutral, no value semantics changed.Proof
c2pool-dgb-DCOIN_DGB=ON EXIT=0.Isolation
src/impl/dgb/only. No shared-base / other-coin tree touched.NO self-merge — integrator taps.