replace vardiff hardcoded threshold ladder with parametric noise floor#2148
Open
gimballock wants to merge 1 commit into
Open
replace vardiff hardcoded threshold ladder with parametric noise floor#2148gimballock wants to merge 1 commit into
gimballock wants to merge 1 commit into
Conversation
Compute the should-update threshold live from `delta_time` and `shares_per_minute` as a 99% predictive Poisson bound on the share count, plus a 5pp safety margin. Replaces the hardcoded 100/60/50/45/30/15 rungs which were calibrated to a different statistical regime than the default share rate produces, so most rungs sat *inside* the Poisson noise band and fired on sampling noise rather than real hashrate changes. Drops the unconditional >=100% rung specifically: at small `delta_time` (16-30s window) the noise band can span beyond +-100%, so this rung also fired on noise. The `>1000%` Phase 1 ramp clamp is unaffected and still handles miners starting far from truth. Tests: - Replace the multi-step `with_less_spm_than_expected` check (calibrated to old rungs) with a single sustained-underperformance scenario. - Drop `no_shares_less_than_30s_decrease` — case is intentionally unreachable at typical share rates. - Bump `simulation_duration` in `no_shares_30_to_60s_decrease` (31 -> 55) and `hashrate_clamps_to_minimum` (16 -> 60) so they sit outside the new noise floor. - Add `no_fire_within_noise` and `fires_outside_noise` covering the core property of the change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Compute the should-update threshold live from
delta_timeandshares_per_minuteas a 99% predictive Poisson bound on the share count, plus a 5pp safety margin. Replaces the hardcoded 100/60/50/45/30/15 rungs which were calibrated to a different statistical regime than the default share rate produces, so most rungs sat inside the Poisson noise band and fired on sampling noise rather than real hashrate changes.Drops the unconditional >=100% rung specifically: at small
delta_time(16-30s window) the noise band can span beyond +-100%, so this rung also fired on noise. The>1000%Phase 1 ramp clamp is unaffected and still handles miners starting far from truth.Tests:
with_less_spm_than_expectedcheck (calibrated to old rungs) with a single sustained-underperformance scenario.no_shares_less_than_30s_decrease— case is intentionally unreachable at typical share rates.simulation_durationinno_shares_30_to_60s_decrease(31 -> 55) andhashrate_clamps_to_minimum(16 -> 60) so they sit outside the new noise floor.no_fire_within_noiseandfires_outside_noisecovering the core property of the change.