Skip to content

Add a fleet hashrate chart to the admin mining view. - #1245

Merged
evoskuil merged 1 commit into
libbitcoin:masterfrom
eynhaender:feature/admin-fleet-chart-2
Nov 28, 2026
Merged

evoskuil merged 1 commit into
libbitcoin:masterfrom
eynhaender:feature/admin-fleet-chart-2

Conversation

@eynhaender

Copy link
Copy Markdown
Member

Adds a fleet hashrate chart above the channel list of the admin Mining view.

  • The chart stacks the hash rate history of the channels to the fleet total, over the union of their minute samples (a channel without a sample at a minute counts zero). A Stacked/Lines switch draws the channels as lines instead, with the fleet total dashed.
  • The eight channels of highest hash rate are drawn in the chart colors and keep their color while connected. The remaining channels are summed into a single "other" band, so the chart stays readable for any number of channels.
  • The channel list is the legend: each channel name is drawn in its chart color (channels in other are muted). A pin button gives a channel a color, taken from the unpinned colored channel of lowest hash rate; pinned channels are not displaced. An eye button hides a channel from the chart and the total. Rows for the fleet and for other, with their current rates, can be hidden the same way.
  • Hovering a band highlights its row and hovering a row highlights its band (or the other band). The tooltip lists each channel's rate and the fleet total at the hovered minute.
  • Pins and hidden channels are dropped as their channels close.

The slot assignment and the series are pure functions in lib/mining/fleet.ts, with tests. The axis helpers of the channel chart move to lib/mining/axis.ts so both charts share them. The new sources are added to the msvc project. The embedded pages are not regenerated.

Tested against a testnet5 node with five S9 miners (four stratum v1, one stratum v2 through the SRI translator) in the default, light and midnight themes.

The chart stacks the hash rate history of the channels to the fleet, on
the union of their minute samples, or draws them as lines. The eight
channels of highest hash rate are drawn in the chart colors and keep
their color while connected; the rest are summed as other.

The channel list is the legend: each name is drawn in its chart color
(other channels muted). A channel can be pinned to take a color (from
the unpinned colored channel of lowest hash rate) and hidden from the
chart. Rows for the fleet and for other, with their current rates, can
be hidden as well. Hovering a band or a row highlights the channel (or
other) in both. Pins and hidden channels are dropped as their channels
close.

The axis helpers of the channel chart move to lib/mining/axis.ts.
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 93.413%. remained the same — eynhaender:feature/admin-fleet-chart-2 into libbitcoin:master

@evoskuil
evoskuil merged commit c864b94 into libbitcoin:master Nov 28, 2026
23 checks passed
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.

3 participants