Skip to content

broadcaster: say "last mined block", and show the chain tip beside it - #96

Merged
rsantacroce merged 1 commit into
mainfrom
feat/broadcaster-chain-tip
Oct 2, 2026
Merged

rsantacroce merged 1 commit into
mainfrom
feat/broadcaster-chain-tip

Conversation

@rsantacroce

Copy link
Copy Markdown
Collaborator

Why

#95 added Last block: #970,851 to the snapshots. That was the newest block the pool mined, but it read as the chain's height. With the network at 970,861, an operator took it to mean the pool's node had fallen ten blocks behind or reorged. The node was in fact at the tip, matching the explorer and its peers.

What

  • The line is renamed to Last mined block. It is still the newest pending or confirmed block from /api/blocks.
  • A new Chain tip line gives the network's latest block, mined by anyone, as the pool's node sees it. It comes from /api/status's node.tip_height and tip_observed_at, and is left out while the dashboard has no node status yet.

Both lines appear in the live message, the periodic update and /pool_status. Rendered from pool.beta.avonpool.xyz's live API:

🟢 avonpool_beta — status

Hashrate now: 2.05 PH/s (5m)
Hashrate: 2.01 PH/s (1h) · 1.99 PH/s (24h)
Active workers (24h): 1
Shares (24h): 34,767 accepted · 77 rejected (0.22%)
Best share (24h): 66.89M
Last share: 3s ago
Chain tip: #970,861 · 21m ago
Last mined block: #970,851 · 3h 5m ago
Blocks (all time): 60

Tests

npm test in broadcaster/: 34 pass. One test is new: the chain tip line appears with node status and is left out without it. The /pool_status test now checks both lines in order, and the existing assertions use the new label.

🤖 Generated with Claude Code

"Last block: #970,851" was the newest block the POOL mined, but it read
as the chain's height. With the network at 970,861 it looked like the
pool's node had fallen ten blocks behind, or reorged.

The line is now "Last mined block", and a "Chain tip" line above it gives
the network's latest block as the pool's node sees it, by anyone, from
/api/status's node.tip_height and tip_observed_at:

  Chain tip: #970,861 · 21m ago
  Last mined block: #970,851 · 3h 5m ago

The tip line is left out while the dashboard has no node status yet. Both
lines appear in the live message, the periodic update and /pool_status.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@rsantacroce
rsantacroce merged commit d58bbe8 into main Oct 2, 2026
9 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.

1 participant