Repository navigation
Description
When the node alert says a node has had no new block for 10 minutes, I want it to tell me whether the chain stopped or only this node fell behind, and by how many blocks, so I don't treat one lagging node as a network halt.
What happens
tn-node-alert reads only its own node, through user.health on localhost. When the RPC does not answer, it keeps the last height it read and reports that height as the node's current one. Nothing in the message says whether the rest of the chain is moving.
On 24 Nov 2026 a mainnet sentry committed block 3227967 at 04:32:41 UTC and no block after it until 04:53:39 UTC. It was back at the tip at 04:54:51 UTC. Its alert said:
- 04:40:52 UTC:
<node label>: no new block for 10 min, still at height 3227911. The node RPC is not answering. - 04:55:21 UTC:
<node label>: blocks are moving again, height 3228146, after 24 min without a new block.
In the same time the leader and the other sentry committed every block from 3227911 to 3228146. The messages read like a chain halt, the first one names a height 56 blocks below where the node stopped, and the second gives 24 minutes for a node that was behind for 22.
- The alert reads only its local node:
NODE_RPC=${NODE_RPC:-http://127.0.0.1:8484/rpc/v1} - It keeps its last height when the RPC does not answer:
node/deployments/alerts/node-health-alert.sh
Lines 91 to 100 in 19d2493
# Height: a node that does not answer keeps its last height, so it counts as # stalled too. height=$(curl -s -m 10 -X POST "$NODE_RPC" -H 'content-type: application/json' \ -d '{"jsonrpc":"2.0","id":1,"method":"user.health","params":{}}' 2>/dev/null | grep -o '"block_height"[[:space:]]*:[[:space:]]*[0-9]*' | head -1 | grep -o '[0-9]*$') || true answering=yes if [ -z "$height" ]; then answering=no height=$last_height fi - The two messages: and
node/deployments/alerts/node-health-alert.sh
Line 115 in 19d2493
if send "${NODE_LABEL}: no new block for ${stalled} min, still at height ${height}.${why}"; then node/deployments/alerts/node-health-alert.sh
Line 125 in 19d2493
if send "${NODE_LABEL}: blocks are moving again, height ${height}, after ${recovery} min without a new block."; then - What the alert covers:
node/deployments/alerts/README.md
Lines 11 to 17 in 19d2493
## tn-node-alert: the node stops or crashes `tn-node-alert` sends a message when: - the node's block height has not changed for 10 minutes (`STALL_MINUTES`), including when its RPC stops answering. The message repeats every hour (`REPEAT_MINUTES`) while the stall lasts, and one more message says when blocks move again. - Docker restarted the kwild container on its own, which means it crashed. A manual restart or a recreate does not count. - the kwild container is not running.
Scope
- The alert reads a second height source, such as another node's
user.healthor the gateway, set intelegram.env. It then says either that the chain has had no new block since height H, or that this node is N blocks behind a chain at height H. - When the node's RPC does not answer, the message says the height is the last one read and gives the UTC time of that read.
- The README shows both messages and the new setting.
Acceptance criteria
- With the local node held and the reference moving, the alert says the node is behind, by how many blocks, and the height and UTC time of its last read.
- With the reference stopped too, the alert says the chain has had no new block since its height.
- Without a reference set, the alert runs the same checks as today, and the stall message says the height belongs to this node (for example
<label>: this node has had no new block for 10 min, last read height H at HH:MM UTC), so it does not read as a chain halt.
Activity
MicBun commentedon Nov 25, 2026
Closing this as covered by the alert change below:
The shared chat now hears only about the network: one message when the gateway, or every listed node, has shown no new block for the stall time, and one when blocks move again, with the real duration. A single node falling behind no longer posts there; its messages go to that host's journal. A per-node "behind by N blocks" message is not planned.