feat(crown): note that round-bounded panels refresh every ~2h#103
Merged
Conversation
added 5 commits
May 27, 2026 15:42
Three dashboard surfaces — Crown History grid, Crown rate chart, and
the Miner Leaderboard's crown_share column — read from the per-round
crown_holders / rate_history tables. Today the alw-utils
sync-validator-state daemon hides this by re-deriving crown rows every
12s and writing them incrementally; once that daemon retires (in
favor of the validator owning these writes directly), the same panels
will visibly stale between flushes and snap in at end of each
SCORING_WINDOW_BLOCKS round (~2h).
The behavior isn't a regression — it's the validator becoming the
single source of truth — but it changes user expectation, so we
surface it inline. New small CrownRoundFillNote component renders
"{subject} refreshes at end of each ~2h scoring round · last refresh
#L · next ~M blocks" using the current chain head to compute the
window boundaries.
Distinct from the top-bar current-crown widget, which keeps the live
~12s cadence via the new current_crown_holders table — that one
needs no note. See companion validator + schema + das-allways PRs.
StickyNetworkHeader carries a 6px dot + tiny "halted" label that's easy to miss. During a halt no miner earns crown and the full emission pool recycles — significant enough to warrant something unmissable. Mounts in AppLayout right under TopNav so it sits above every routed page, including miner detail. Renders nothing when halt.halted is false. Uses the existing useHaltState() hook (already polling in StickyNetworkHeader and elsewhere) so no new network traffic. Shows "as of block #N" detail when asOfBlock is set, so users can see freshness. Part of the same dashboard-truthiness rollout that adds the live current_crown_holders writer + round-fill notes; pairs with the validator-side halt fixes (validator now clears current_crown_holders during halt so the live header doesn't contradict the recycle).
The previous per-panel CrownRoundFillNote (added on Crown History grid, Crown rate chart, Miner Leaderboard) said the same thing three times in three places. Replaces it with a single status line on the right side of StickyNetworkHeader where "healthy"/"halted" already lives — one source of truth for system state. Behavior: - not halted, head known: "last refresh #L · next ~M blocks" - not halted, head unknown (halt query loading): "healthy" (existing fallback so the indicator never disappears mid-load) - halted: "paused" in error.main, bold Refresh math (last/next) is the same formula as the deleted note: floor(head / 600) and (last + 600 - head). One module-level constant mirrors allways/constants.py SCORING_WINDOW_BLOCKS so a future scoring window change updates here in one place. Removes CrownRoundFillNote.tsx entirely (no remaining callers). Removes the now-unused useHaltState import + headBlock plumbing from MinerLeaderboard. Full HaltBanner stays — top-right is for ongoing/quieter signal; the banner is for "everything is recycling, you need to notice this."
"SWAP CONTRACT HALTED — emissions are recycling, no miner is currently earning. Rate posts still accepted; scoring resumes on unhalt." reads as an alert about something broken. Halt is almost always a planned admin action (upgrade window, parameter change), so user-facing copy frames it as scheduled rather than emergency: "System is paused for maintenance. Swaps are not being initiated. Emissions are recycling. Scoring will resume when the system is unpaused. (as of block #N)" Same banner styling, same /halt data source, same gating.
Red signals critical-failure semantics; halt is a planned admin
action ("paused for maintenance"). Amber/warning palette communicates
"heads up, things are different" without the alarm bell.
Switches both the full-width HaltBanner background and the top-right
"paused" dot+text from error.main/error.contrastText to
warning.main/warning.contrastText. Same MUI palette path, same
contrast guarantees (warning.contrastText auto-resolves).
entrius
approved these changes
May 27, 2026
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
Three dashboard panels read from the per-round `crown_holders` / `rate_history` tables and will visibly stale-then-snap-in once we retire the alw-utils `sync-validator-state` daemon (which today silently re-derives the rows every 12s and writes them incrementally). This PR surfaces that behavior inline so users don't think the dashboard is broken between flushes.
Companion PRs (the rest of the live-crown rollout):
What's added
New `CrownRoundFillNote` component renders:
Used in:
What's NOT touched
Test plan