Skip to content

fix(scan): show real block cadence in the block time stat#105

Merged
github-actions[bot] merged 1 commit into
fix/scan-drop-redundant-sticky-statsfrom
fix/scan-block-time-real-cadence
Jun 25, 2026
Merged

fix(scan): show real block cadence in the block time stat#105
github-actions[bot] merged 1 commit into
fix/scan-drop-redundant-sticky-statsfrom
fix/scan-block-time-real-cadence

Conversation

@satyakwok

Copy link
Copy Markdown
Member

The Block Time stat on the home page showed a misleading value. It read the chain-performance endpoint's bucket average, which is windowed by the selected range (1m/5m/1h/24h) and gets inflated by past stalls. On testnet it showed ~1.8s on the 1h bucket while the chain was actually producing ~0.5s blocks (verified from block timestamps: 8 blocks over 4s).

The code already had computeBlockTime() to derive the cadence from recent block timestamps, but it was only a fallback. This makes it the primary source, so the stat reflects the real recent cadence (now shows ~556ms on testnet). Falls back to the perf value, then the target, only when there are not enough blocks to measure.

The 'target 1s' subline is unchanged.

Stacked on #104 (both touch HomeContent). Retarget to main after #104 merges.

Testing: typecheck and build pass. Verified live: testnet block time now shows ~556ms instead of 1.8s.

The block time stat read the chain-performance bucket average, which is
windowed by the selected range and inflated by past stalls: it showed ~1.8s
on the 1h bucket while testnet was producing ~0.5s blocks. Compute it from
the latest blocks instead, falling back to the perf value only when there
are not enough blocks to measure.
@github-actions github-actions Bot merged commit 376431d into fix/scan-drop-redundant-sticky-stats Jun 25, 2026
4 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