dgb(Phase-B): SSOT pool efficiency / real-hashrate diagnostics + non-circular KAT - #389
Merged
Merged
Conversation
frstrtr
force-pushed
the
dgb/pool-efficiency-real-hashrate-ssot
branch
from
June 23, 2026 22:01
7f10335 to
c171a33
Compare
…circular KAT
Lift the pool EFFICIENCY / REAL-HASHRATE diagnostics arithmetic out of
node.cpp into a header-only SSOT (pool_efficiency.hpp):
- compute_stale_prop(orphan, doa, total) = (orphan+doa)/total, 0 on empty
- compute_real_pool_hashrate(pool_hs, stale_prop) =
pool_hs / (1 - stale_prop) when stale_prop < 0.999 && pool_hs > 0
pool_hs otherwise
Mirrors the p2pool-dgb-scrypt oracle main.py status loop
(real_att_s = get_pool_attempts_per_second(...) / (1 - stale_prop)),
operator-facing behavior pinned by the V36 master-compat invariant.
FENCED/additive: node.cpp NOT yet rewired (byte-identity delegation is the
follow-on). Pure arithmetic, consensus-neutral. Non-circular KAT (8/8) pins
hand-derived oracle values. Registered in test CMakeLists + both build.yml
--target allowlists (#143 NOT_BUILT guard).
frstrtr
force-pushed
the
dgb/pool-efficiency-real-hashrate-ssot
branch
from
June 23, 2026 23:26
c171a33 to
32e78b3
Compare
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
Next Phase-B pillar: lift the pool efficiency / real-hashrate diagnostics arithmetic out of
node.cppinto a header-only SSOT (src/impl/dgb/pool_efficiency.hpp):compute_stale_prop(orphan, doa, total)=(orphan+doa)/total,0.0on empty windowcompute_real_pool_hashrate(pool_hs, stale_prop)=pool_hs / (1 - stale_prop)whenstale_prop < 0.999 && pool_hs > 0, elsepool_hsWhy
These are open-coded inline in node.cpp:1712-1767 feeding the
Pool: <hashrate> ... Expected time to block:status line. A silent drift (flipped guard, wrong denominator, dropped div-by-~0 floor) would misreport effective hashrate / ETB with no compile error — operator-facing behavior the V36 master-compat invariant pins to the p2pool reference.Oracle: p2pool-dgb-scrypt
main.pystatus loop —real_att_s = get_pool_attempts_per_second(...) / (1 - stale_prop).Scope / safety
CMakeLists.txt+ both build.yml--targetallowlists (ci: build test_dgb_subsidy in both Linux test jobs (fix master-red NOT_BUILT) #143 NOT_BUILT guard).src/impl/dgb/only.NO self-merge — surfaced for tap.