Fix/g1 freshness gate - #199
Open
isabella618033 wants to merge 4 commits into
Open
Conversation
`build_submission_uid_weights` ranks Group 1 by `score_aggregator.uid_score_pairs(how="avg")`, a rolling mean over a miner's *recorded points* with no notion of rounds elapsed. When a UID stops being evaluated, no point is written, its mean is unchanged, and it keeps its 98% G1 seat until the points age out of retention. Observed on netuid 102: uid 158 took 31.5% of emission at round 8692978 on a 2.25 rank score earned four rounds earlier, and its avg sat at exactly 0.40625 across six consecutive rounds while it was variously scored 0, evaluated with the round's third-largest raw delta, and freeze_zero'd with no chain commit at all. None of it moved the number. Add a freshness gate to G1 selection: a UID may only hold a seat if its most recent `round_id`-tagged point is within `g1_max_stale_rounds` (default 1 — the current round or the one before it). A 0.0 written by `finalize_round_scores` counts as evidence, since the gate is about whether the validator looked at the miner this round, not how well it did. Demoted UIDs still fall through to the 2% G2 tier; if every A/B UID is stale the existing empty-G1 guard redirects the share to uid 0, so the validator stays at full emission. `latest_round_id` and `record_count` already existed on the aggregator and were unused outside tests. The payload now carries `g1_stale_excluded` so run.py can log exactly who lost a seat. Scope: this closes the stale-carry hole. It does NOT change the fact that `avg` divides by recorded points rather than rounds elapsed, so a miner evaluated every round can still hold a seat on an old spike — that needs a separate change to the estimator. Co-Authored-By: Claude Opus 5 <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.
No description provided.