Files
observer/crates/blackbeard-api
rob thijssen 4f9902819d
All checks were successful
deploy / build (push) Successful in 7m48s
deploy / deploy-web (push) Successful in 5s
deploy / deploy-api (push) Successful in 17s
fix: a miner's history chart spans its window, not a hard-coded hour
`bucketing` mapped each window to a fixed duration — `600 blocks -> 1 hour`,
`3,600 -> 6 hours` — which is only true at a 6 s target. It was the last place
still assuming a window's block count implies a duration, which is the
assumption the rename retired.

On Planck the gap is visible: its rate fell ninefold when its miners left for
mainnet, so a 600-block window spans about five hours, and the chart underneath
was drawing one. A miner's rank was computed over one period and its history
plotted over another, with nothing on the page saying so.

The range is the window's measured span now, with buckets sized to hit
`MINER_SERIES_POINTS`, so a chart stays the same width in points however fast
the chain is running. Where no span is measured yet — only before the window has
filled — it falls back to the block count at the chain's target rate, which is
the same guess the old table encoded.

Bounded at both ends, because a measurement can be extreme in both directions: a
floor so a burst cannot collapse the chart to minutes, a ceiling so
`100800-blocks` on a slow chain cannot ask the database for a year of buckets.

Closes #14

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jp6a8EDar9ueEhAxzep4V5
2026-09-10 17:59:49 +03:00
..