feat(scores): add hybrid v2 score rollout - #145
Draft
Albermonte wants to merge 4 commits into
Draft
Conversation
Add marker-gated activity synchronization and independent v1/v2 score persistence. Expose score-version selection across the API and dashboard with freshness states, recovery logging, migrations, tests, and rollout documentation.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
validators-api-test | 9d44e04 | Commit Preview URL Branch Preview URL |
Jul 31 2026, 03:28 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
validators-api-main | 9d44e04 | Commit Preview URL Branch Preview URL |
Jul 31 2026, 03:27 PM |
Treat finalized activity gaps as offline when zero-slot probability falls below 0.1%. Keep score v1 behavior unchanged.
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
off,shadow, andactiverollout modescurrent,stale, andno_scorestates without discarding trustworthy prior scoresWhy
Partial activity history could make a score look complete when it was not, while short recent outages were heavily diluted by the long-term window. This keeps v1 available for rollback and comparison while v2 adds a recent-performance component and explicit data-freshness handling.
Missing election rows are ambiguous: a high-stake validator disappearing for several finalized epochs is strong offline evidence, but the same gap is normal for a low-stake validator. V2 therefore requires both at least 1% estimated network stake and less than 0.1% aggregate random non-election probability before marking a complete gap
inferred_offline.Representative score changes
Calculated with the actual
computeScoreandcomputeScoreV2implementations using a representative 550-epoch long-term window, 28-epoch recent window, two epochs per day, and 720 blocks per epoch. Low stake is modeled as 1% network dominance and high stake as 10%. Values are rounded synthetic examples, not production forecasts.Missing-election guardrails
not_elected_randomnessnot_elected_randomnessinferred_offlineRollout and safety
off: compute and serve v1shadow: compute both versions and continue serving v1 by defaultactive: compute both versions and serve v2 by defaultscore-version=1|2Verification
pnpm test run— 193 tests passedpnpm typecheck— passed with Node 24pnpm lint— passedpnpm validate:json-files— passedpnpm build— passed with Node 24git diff --check— passedsync:scores— complete at epoch 1254 with 100% recent and long-term coverage; 53 v1 and 36 v2 scoresTargeted local verification confirms a validator observed with one slot (0.195% stake estimate) keeps 231 missing epochs as
not_elected_randomness, while a validator near 6.4% stake retains its 20 high-confidenceinferred_offlineepochs.