You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dash(stratum): event-driven tip refresh on the dashd-fallback arm + issued-diff hashrate credit
Two consensus-neutral stratum fixes for the mining-hotel DASH node. Both touch
only the per-connection vardiff/pseudoshare path and the template-refresh/notify
path; get_share_bits/pool share_bits, the DGW retarget, the sharechain share
target, and block-acceptance are untouched.
FIX 1 -- fallback-arm event-driven tip refresh. On the dashd-fallback arm there
is no tip-change signal like the embedded arm's header-chain tip-changed
callback; the template cache only re-sources on a 30 s staleness TTL. DASH
blocks arrive ~every 150 s, so up to ~30 s of stale-tip mining can occur per
block (accepted pseudoshares that can no longer win the current block). Add a
lightweight run-path poller (gated on the fallback arm: coin-P2P null + armed
rpc + live stratum acceptor) that reads dashd getbestblockhash every 3 s; on a
tip change it drops the cached template + bumps work-generation + notify_all()
-- the SAME refresh pair the embedded arm fires. Reuses the existing NodeRPC
client (new trivial getbestblockhash method); RPC failures are swallowed so a
daemon hiccup never crashes the run-loop.
FIX 2 -- credit the hashrate EWMA + RateMonitor at the difficulty the job was
issued/mined at (job.issued_difficulty), not the live vardiff, so a vardiff
retarget between job-issue and submit does not skew the estimate. Falls back to
the live vardiff when issued_difficulty is unset. Estimate/stats only; the
acceptance gate is unchanged.
Extends test_dash_stratum_work_source with a KAT pinning the fallback-arm
tip-change refresh contract (template swaps to the new tip + work generation
bumps -- the clean_jobs/notify signal). The target is already in both build.yml
--target allowlists, so CI discovery is unchanged.
0 commit comments