arena: cumulative authorship counter so the leaderboard follows the time range #9

Merged
grenade merged 1 commits from arena/authored-counter into main 2026-09-03 13:11:07 +00:00
Owner

quantus_blocks_authored is a rolling window by block count (3,600 blocks, about six hours at the target time) served as a gauge and queried as an instant, so the "Authorship leaderboard" panel could not respond to Grafana's time picker: it always showed the last 3,600 blocks.

  • Exporter: new quantus_blocks_authored_total{preimage, self}, cumulative since the exporter started. Not capped to top N, because a counter that appears and disappears loses increments; the label set is bounded by distinct miners seen, which is dozens. The windowed gauge and everything derived from it are unchanged.
  • Panel: sort_desc(topk(20, round(increase(quantus_blocks_authored_total[$__range])))), retitled to say it follows the dashboard range, with a description noting that counts exist from the exporter's restart onward and within retention, and that increase() extrapolates across scrape gaps.

Merging deploys the exporter to the node host (checksum-gated restart) and the dashboard to the metrics host; the counter starts at that restart, so the panel fills in from then.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CBgs2nSi4H2mdh8kD8vMX5

`quantus_blocks_authored` is a rolling window by block count (3,600 blocks, about six hours at the target time) served as a gauge and queried as an instant, so the "Authorship leaderboard" panel could not respond to Grafana's time picker: it always showed the last 3,600 blocks. - Exporter: new `quantus_blocks_authored_total{preimage, self}`, cumulative since the exporter started. Not capped to top N, because a counter that appears and disappears loses increments; the label set is bounded by distinct miners seen, which is dozens. The windowed gauge and everything derived from it are unchanged. - Panel: `sort_desc(topk(20, round(increase(quantus_blocks_authored_total[$__range]))))`, retitled to say it follows the dashboard range, with a description noting that counts exist from the exporter's restart onward and within retention, and that `increase()` extrapolates across scrape gaps. Merging deploys the exporter to the node host (checksum-gated restart) and the dashboard to the metrics host; the counter starts at that restart, so the panel fills in from then. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01CBgs2nSi4H2mdh8kD8vMX5
grenade added 1 commit 2026-09-03 13:11:00 +00:00
quantus_blocks_authored is a rolling window by block count (3600 blocks)
served as a gauge, so the leaderboard panel ignored Grafana's time picker.
Add quantus_blocks_authored_total, cumulative since exporter start and not
capped to top N (a counter that comes and goes loses increments; the label
set is bounded by distinct miners seen), and query the panel as
increase() over $__range. The windowed gauge stays for the fixed view.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CBgs2nSi4H2mdh8kD8vMX5
grenade merged commit be86c60252 into main 2026-09-03 13:11:07 +00:00
grenade deleted branch arena/authored-counter 2026-09-03 13:11:07 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lair/quantus#9