scheduler: persist snapshot when bootstrapping a champion#500
Open
angosr wants to merge 3 commits into
Open
Conversation
compute_split_payees walks score_snapshots newest-first deduped by winner_hotkey to derive the 5-way reward split. weight_writer.write is called by _decide on full verdict only, so a champion that ascended via _cold_start (invalidation of the prior champion → next eligible miner promoted directly, no contest) left no row in score_snapshots and was silently dropped from the split, with the share quietly routing to whichever older hotkey the algorithm walked back into next. Adds WeightWriter.record_champion_held, a snapshot-only write that the bootstrap path uses to record "this champion holds the seat as of block N". One row per champion ascension is enough — the TTL is 365 days and compute_split_payees dedupes by hotkey, so subsequent early-loss verdicts during the same tenure don't need to re-write.
Drop the try/except wrapping record_champion_held in _cold_start so a DDB write failure propagates instead of silently logging a warning and leaving the champion missing from compute_split_payees history. Tighten record_champion_held docstring to its single caller (cold-start bootstrap); the prior wording implied an early-loss short-circuit use case that does not exist.
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.