Chain-aware monitoring: height and lag, peers, reorgs, missed duties, and the SLOs that matter

Four layers, four questions: am I at the head with peers, did I do my duties, what freshness did users actually get, and is the network itself healthy. Answer the last one first in an incident.

Read the briefing
About 4 min to read 7 drills

What to remember

  1. Compare height to an independent reference. Your fleet's median hides the case where everyone is stuck — a missed fork upgrade.
  2. Peers are a leading indicator. A node losing peers falls behind minutes later. Watch them next to height.
  3. Alert per missed proposal, not on a percentage. They are too rare for a rate-based alert to fire in time, and each one is real money.
  4. Chain-level metrics answer 'is it us or the network'. Finality distance and participation, from an external source, beside your own numbers.
  5. Process uptime is not an SLO. Freshness served, success by method class, duty success rate — those are.

The big picture

Monitoring chain infrastructure fails in a specific way: every process is up, every dashboard is green, and the product has been serving stale data for an hour. The fix is to monitor the things the chain defines, height and lag against an independent reference, peers, duties, reorgs and finality, and to write SLOs about what users experience rather than about uptime.

The mental model

Four layers, each with its own question. The node: am I at the head, and do I have peers? The duty: did I do the work the chain expected of me, on time? The product: what freshness and success ratio did users actually get? The chain: is the network itself healthy, or am I looking at someone else's problem? In an incident, answer the chain question first, then work inward, and most incidents identify themselves.

In depth

Height, lag, and the reference problem

The core node signal is height relative to the network, in blocks and in seconds. Both matter: five blocks behind on a 12-second chain is a minute of staleness; five blocks on a sub-second chain is nothing. Crucially, the reference must be independent of your fleet: comparing each node to your fleet's median hides the case where the entire fleet is stuck, which is exactly what happens when you miss a fork upgrade or run a single client with a bug. Use a second client implementation, a public endpoint, or the consensus layer's view as the yardstick, and alert on both "this node is behind the fleet" and "the fleet is behind the world".

Freshness is also a user-facing number: publish the block height and hash behind any served data so consumers can reason about what they are seeing, and make head lag an SLI rather than an internal metric.

Peers, network, and duties

Peer count is a leading indicator: nodes that lose peers fall behind minutes later, so peers, inbound versus outbound, sit next to height on the dashboard. On gossip-heavy chains, UDP receive-buffer errors and packet drops predict trouble before height moves at all. Watch them as saturation signals, in the USE sense, for the network resource.

For validators, health is measured in duties: attestation effectiveness and inclusion distance (are your attestations being included promptly?), missed or reorged proposals (rare, revenue-bearing, and easy to miss silently), and sync-committee participation where applicable. A validator can be perfectly "up" by process metrics while missing every duty, which is why duty-level metrics come from the beacon chain's view of your keys, not from your own process. Proposals deserve their own alert: they happen rarely enough that a percentage-based alert will never fire in time.

Reorgs, finality, and SLOs that mean something

Chain-level metrics tell you whether the problem is yours: reorg depth and frequency, finality distance (how far behind the finalized checkpoint is), and network participation rate. When finality stalls or participation drops network-wide, the correct action is usually to stop changing things and communicate, rather than to debug your nodes. Making that distinction quickly, "is it us or the network?", is the first bisection in every chain incident, and it belongs on the dashboard as an explicit comparison.

SLOs: process uptime is not one. Meaningful targets are RPC success ratio and latency per method class (a trace call and a balance read cannot share a target), freshness served to clients (head lag), indexer lag, and, for validators, duty success rate and missed-proposal count. Alerting follows the usual discipline: page on user-visible symptoms and on things a human must fix now (a validator missing duties, the fleet behind the world, error-budget burn), ticket the rest, and give every page a runbook. On-call for chain infrastructure is awake at odd hours by definition, so alert quality is not a luxury.

Myths and facts

Myth: If the node process is up and the port answers, the node is healthy.

Fact: The dominant failure is up-but-behind; health requires height against an independent reference and peer count.

Myth: Comparing nodes against each other is a good staleness check.

Fact: It hides fleet-wide stalls, which are the most dangerous case; use an external reference.

Myth: Attestation effectiveness covers validator health.

Fact: Proposals are rare and separately valuable; they need their own alert, as does sync-committee participation.

Myth: A reorg means our node is broken.

Fact: Reorgs are a chain-level event; distinguish network-wide conditions from local faults before acting.

Myth: One latency SLO covers the RPC endpoint.

Fact: Method classes differ by orders of magnitude in cost; SLOs must be per class or they are meaningless.

How pros do it

  • Alert on head lag in blocks and seconds against an independent reference, per node and fleet-wide.
  • Put peers and network saturation (UDP drops, buffer errors) next to height as leading indicators.
  • Measure validators by duties from the chain's view: attestation effectiveness, inclusion distance, missed proposals (alerted individually).
  • Track chain-level health (reorg depth, finality distance, participation) so 'us versus the network' is answerable in seconds.
  • Write SLOs per method class plus freshness and indexer lag; page only on what a human must fix now, with runbooks.

Questions people ask

What should page at 3 a.m.?

Give a short list and defend its shortness: validators missing duties, the fleet behind the world, error-budget burn on the RPC SLOs, and indexer lag past its contract. Then say what does not page (CPU, disk, a single node behind the fleet) and that those become tickets.

How do I tell a network problem from a node problem?

Check finality distance and participation rate from an independent source, and whether your nodes match the external reference. Say the counter-intuitive part out loud: network-wide degradation is not fixed by restarting your nodes, so the response is restraint and communication.

How do I detect a missed fork upgrade quickly?

Two answers: before activation, a version inventory that alerts on any non-fork-ready release; after, head lag against an independent reference. Make the point that a fleet-median comparison shows everything as healthy in exactly this case.

Why is a missed proposal a big deal?

Proposals are rare and carry the block reward plus MEV; a percentage-based alert never fires for them, so alert on each occurrence with the slot and the reason.

What does an RPC freshness SLO look like?

Something like 99% of responses served from a node within two blocks of head, published so customers can rely on it. Say why it is customer-facing: freshness is what users feel, and an internal metric can be green while the product is stale.

Further reading

Drills · 7

Answer in your head, or out loud, before you reveal. Mark each one: "Again" brings it back, "Got it" counts on your desk.

1 Pick the strongest answer

Why is it not enough to catch a stale node by comparing each node's height against the median of your own fleet?

  1. A fleet-wide stall (a missed fork upgrade, a shared client bug, a network partition affecting your region) leaves every node equally behind, so the median moves with them and nothing alerts. Self-referential comparisons cannot detect correlated failure.
  2. The median is expensive to compute. Computation cost is irrelevant here.
  3. Nodes differ in hardware, so heights are never comparable. Heights are comparable; the problem is the reference, not the nodes.
  4. Medians hide outliers by design. It would catch a single outlier; it is the correlated case that defeats it.
In short

If the whole fleet stalls together, the median stalls with it and nothing alerts; compare against an outside reference.

Why

Use an independent reference: a different client implementation, an external endpoint, or the consensus layer's head. Then alert on two things, "this node is behind the fleet" and "the fleet is behind the world", because they have different causes and different responses.

The common mistake

Answering about statistics ('medians hide outliers'). The median catches a single straggler fine; it is the fleet-wide stall it cannot see.

Read the docs

2 Design round

Design monitoring and alerting for a company running validators, a public RPC endpoint, and an indexer across two chains. Cover the metrics per layer, the SLOs you would publish, what pages versus tickets, and how on-call stays sustainable.

  • Five engineers on a shared rotation, global customers.
  • Validators and RPC have different failure costs.
In short

A strong answer measures head lag against an independent reference and alerts on every missed proposal, not on a percentage.

A strong answer covers
  • Node layer: head lag in blocks and seconds vs independent reference (per node and fleet-wide), peers, network saturation, disk/hardware health.
  • Duty layer: attestation effectiveness and inclusion distance, per-occurrence missed-proposal alerts, sync committee participation.
  • Product layer: RPC success ratio and latency per method class, freshness served, indexer lag against a published contract.
  • Chain layer: reorg depth/frequency, finality distance, participation, as the 'us vs network' discriminator.
  • SLOs published per method class plus freshness and indexer lag; error budgets driving priorities.
  • Paging policy: only user-visible or money-losing conditions page, each with a runbook; everything else tickets; alert review cadence.
  • Sustainability: page volume budget per rotation, deduplication and grouping, follow-the-sun or scheduled quiet hours where possible, and postmortems on noisy alerts.
What a strong answer does
  • design quality: All four layers with the reference problem solved, per-class SLOs, per-occurrence proposal alerts, and an explicit us-versus-network discriminator.
  • alerting judgment: Explicit page/ticket split with rationale, runbooks, and a stated page-volume budget with a review process.
  • sustainability: Quantifies acceptable pages per rotation, describes how noise is removed, and acknowledges 24/7 chain reality.
  • communication: Layered by question answered, with SLO contracts and what would falsify the design.
Why

Strong answers layer the metrics by the question they answer, solve the independent-reference problem, alert per occurrence on rare valuable events, and treat on-call volume as a budgeted quantity.

The common mistake

A metric list built from node_exporter and process uptime, with one latency SLO for all RPC methods and no way to tell 'us' from 'the network'.

Read the docs

3 Pick the strongest answer

Your validator dashboard shows the client process healthy, CPU normal, peers at 60, and attestation effectiveness at 98%. What is still missing that could be costing real money?

  1. The client's log volume. Not a duty metric.
  2. Nothing; 98% effectiveness is healthy. Attestations can be healthy while every proposal is missed.
  3. Proposal outcomes: proposals are rare and revenue-bearing, so a missed or reorged proposal will not move a 98% attestation number and needs its own per-occurrence alert. Percentage-based duty metrics cannot surface rare events.
  4. Disk usage trending. Important operationally, but it is not the missing revenue signal.
In short

Missed proposals: they are rare and worth real money, so each one needs its own alert.

Why

Duty-level monitoring must separate the frequent-and-cheap (attestations, inclusion distance) from the rare-and-expensive (proposals, sync committee). Alert on each missed proposal, and track expected versus actual proposals over time so silent failure is impossible.

Read the docs

4 Read the output

It is 04:12 and two pages have just fired. What is happening, and what do you do?

# 04:12 UTC
our_nodes_head_lag_blocks{node=~".*"}        max 3, median 1
our_nodes_peer_count                          58-71 (normal)
chain_finality_distance_epochs                2 -> 9 (climbing)
chain_participation_rate                      0.97 -> 0.71
external_reference_head_lag_vs_our_fleet      0
rpc_error_ratio                               0.2% (normal)
indexer_finalized_view_lag_seconds            180 -> 2,400 (climbing)
pages fired                                   indexer_lag, finality_distance
  1. Our indexer is broken; restart it and re-sync. Its finalized view is waiting on finality that the network is not producing.
  2. The network itself is degraded: participation has dropped and finality is stalling while our nodes are at head with healthy peers. The right response is to stop changing our infrastructure, communicate to consumers that the finalized view is delayed by network conditions, and monitor; the indexer's finalized-view lag is a consequence, not a fault. Local signals are healthy; chain-level signals are degraded, which reverses the usual response.
  3. Restart the consensus clients to force finality. Finality is a network property; restarting our clients cannot influence it.
  4. Our nodes have lost consensus; fail over to a provider. Our nodes match the external reference exactly; failover changes nothing.
In short

The network itself is losing finality while our nodes are healthy, so stop changing things and tell consumers the finalized view is delayed.

Why

This is the "is it us or the network?" bisection, and it is why chain-level metrics belong on your dashboard. When participation and finality degrade network-wide, the correct engineering action is usually restraint plus honest communication, and the fast view continues to serve while the finalized view waits.

Read the docs

5 Scenario: what do you do next?

A customer reports that your API returned a balance that is two minutes stale. Your dashboards are green: all nodes up, error ratio 0.1%, p99 latency normal. Nothing has been deployed for three days.

Step 1. Where do you look first?

  1. The customer's client library and caching. Possible, but check your own freshness first; you can prove or exclude it in a minute.
  2. Restart all nodes to be safe. Blind action that destroys the evidence of which node was behind.
  3. Increase the cache TTL to smooth results. Would make staleness worse, not better.
  4. Head lag per node against an independent reference, and which node served that customer's request: green dashboards that lack a chain-aware lag metric are exactly the blind spot this symptom implies. Stale-but-successful responses are the signature of a lagging node the balancer still trusts.

Step 2. Two of eight nodes are 9 blocks behind with peer counts of 4 and 6 versus 60+ elsewhere; the balancer's health check is a TCP connect. Mitigation?

  1. Eject the two lagging nodes now, then fix the health check to be chain-aware (head vs independent reference, peer floor, latency) so ejection is automatic; investigate why those two lost peers. Stops serving stale answers immediately and closes the detection gap that allowed it.
  2. Restart the two nodes and put them straight back in rotation. They may still be behind after restart; rotation should be gated on sync state, not on a restart.
  3. Add a warning to the API docs that data may be stale. Documents the bug instead of fixing it.
  4. Reduce the fleet to the six healthy nodes permanently. Loses capacity and leaves the health-check flaw in place.

Step 3. Systemic follow-up?

  1. Chain-aware health and automatic ejection, head-lag SLI published as a freshness contract, alerts on both node-behind-fleet and fleet-behind-world, peer-count alerts as a leading indicator, and the block height/hash returned with responses. Detection, automatic mitigation, a user-facing contract, and a leading indicator, together.
  2. Alert on peer count only. A useful leading indicator, but the primary signal must be lag itself.
  3. Add a runbook entry for 'check for lagging nodes'. Human process where an automated check belongs.
In short

Check each node's head lag against an outside reference and find which node served that request.

Why

Green dashboards plus stale data means the dashboards measure the wrong things. The response is chain-aware health with automatic ejection, freshness as a published SLI, and peers as the early warning.

Read the docs

6 Quick recall

What should a node's head-lag alert compare against if it is to catch the whole fleet stalling at once?

In short

An independent reference outside your own fleet.

Accepted

an independent reference · an external reference · an outside source

Why

An independent reference (a different client, a public endpoint, or the consensus layer's head); comparing against your own fleet's median hides correlated stalls such as a missed fork upgrade.

7 Find what's broken

Three of these four rules will either miss real incidents or wake people for nothing. Which?

groups:
  - name: chain
    rules:
      - { alert: NodeDown, expr: 'up{job="eth-node"} == 0', for: 1m, labels: { severity: page } }
      - { alert: HighCPU, expr: 'rate(process_cpu_seconds_total[5m]) > 0.8', for: 5m, labels: { severity: page } }
      - { alert: NodeBehindFleet, expr: '(max(eth_head_block) - eth_head_block) > 50', for: 15m, labels: { severity: ticket } }
      - { alert: RpcLatency, expr: 'histogram_quantile(0.99, sum(rate(rpc_duration_bucket[5m])) by (le)) > 2', for: 10m, labels: { severity: page } }
In short

Line 5 pages on CPU, a cause not a symptom; line 6 compares lag to the fleet itself; line 7 uses one latency target for every method.

What's broken
  • Line 5: Paging on CPU utilization is a cause alert, not a symptom: it wakes people for busy nodes that are serving fine and misses stalls that use no CPU.
  • Line 6: Lag is measured against the fleet's own maximum, so a fleet-wide stall (missed fork upgrade) alerts on nothing; and 50 blocks for 15 minutes is far too slow for a chain serving 'latest' reads.
  • Line 7: One p99 latency target across all RPC methods mixes balance reads with traces, so it either fires constantly or is set so high it never fires.
Why

up == 0 for a minute is a reasonable page. The three flagged rules embody the classic mistakes for this domain: paging on a cause, using a self-referential lag comparison, and one latency target for wildly different work. Missing entirely: duty alerts for validators and an indexer-lag alert.

Read the docs

Next lesson Indexers and data pipelines: reorg handling, backfills, idempotency, and lag as an SLI
Drill · Chain-aware monitoring
0:00

Loading…