Skip to content

scheduler: persist snapshot when bootstrapping a champion#500

Open
angosr wants to merge 3 commits into
mainfrom
fix/early-lost-snapshot-backfill
Open

scheduler: persist snapshot when bootstrapping a champion#500
angosr wants to merge 3 commits into
mainfrom
fix/early-lost-snapshot-backfill

Conversation

@angosr

@angosr angosr commented May 18, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

angosr added 3 commits May 18, 2026 15:43
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant