fix: use cached issue-discovery scores when DAS mirror fetch fails (#1065)#1171
Closed
alpurkan17 wants to merge 1 commit into
Closed
fix: use cached issue-discovery scores when DAS mirror fetch fails (#1065)#1171alpurkan17 wants to merge 1 commit into
alpurkan17 wants to merge 1 commit into
Conversation
7285021 to
73ce705
Compare
73ce705 to
591bb06
Compare
Contributor
Author
|
Competitor #1066 already merged. Closing. |
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.
Summary
When a validator cannot fetch issue-discovery data for one miner from the DAS GitHub mirror, that miner is skipped for the round and receives a zero issue-discovery score. The remaining miners are then normalized across the full pool, unfairly redistributing the failed miner's share.
This fix adds a
mirror_issue_fetch_failedflag onMinerEvaluation, set bymirror_scan.pywhenMirrorRequestErroris raised. Duringissue_discovery()inforward.py, the validator restores the previous round's cached issue-discovery scores for that miner *before* normalization runs, so a transient DAS fetch failure does not distort emission distribution.The
MinerEvaluationCache.store()method also preserves previous issue-discovery scores when the current eval has zero (since the cache is stored before issue discovery runs in step 1 of forward()). A newupdate_issue_discovery_scores()method refreshes the cache for successful miners after discovery completes.Validation
mirror_issue_fetch_failedis set onMinerEvaluationwhenMirrorRequestErroris caught inmirror_scan.pynormalize_issue_discovery_rewards()runs — emission distribution is correctstore()as a safety netupdate_issue_discovery_scores()refreshes cache entries for successful minersCloses #1065