!5251fix/node-status-accuracy → develop451da79c98

make status: no more false-healthy rows

AI-generatedEverything on this page was written by an AI agent from the diff: the summaries, the narration, the diagrams, the flags and the glossary. It can be wrong or incomplete, so check it against the code before you rely on it.

9commits
2files
1.2klines changed
803lines to read
+2BIFROST columns
23new script tests

Where the diff is

Read these1 files · 803 lines

build/scripts/node-status.sh+616 −187

Tests1 files · 386 lines

…/scripts/tests/test_node_status.py+386 −0
1python3 -m unittest2curl stub on PATH3fixture per URL4assert rows + URLs

4-minute explainer

What changed

Two pairs per row

Bifrost scanner vs daemon, then daemon vs public tip

scanner→ daemon→ TIP
negative BEHIND = behind, in both pairs

Missing is never healthy

Empty, null, non-integer or zero heights now read Error

"" = ""100.000% (old)is_heightError (new)

Bifrost scanner columns

/status/scanner fetched once: lag, Error, missing, unhealthy *

-13 lagErrormissing-2,512*
-1 sentinel tested on heights, not the diff

Probes run together

Background curls into a temp dir, one wait, then parse

fetch & ×30waitbody → parse
runtime = slowest probe, one snapshot

Remote endpoint fixes

Credentials, eth_syncing, beacon guess, AVAX reference, gating

UTXO creds only without a schemebeacon :3500 only if path-lessdisabled chains not probed

THOR row and churn

No reference reads Error; keygen-in-progress and overdue states

keygen in progressoverdue by N blocksETA: measured or nominal

Tests on canned responses

Real script, curl stubbed, 23 cases pass

test_node_status.py+386

Line by line · every changed logic line, narrated

14:24runtime
17code chapters
100%logic lines narrated (321/321)
11flagged spots
speed

Chapters

What to check

Ask an AI about this change

Chat assistantClaude, ChatGPT, … (reads a link)

Coding agentClaude Code, Cursor, … (reads the repo)

The context file is context.md. Use Copy with context for an AI that can't open links; it pastes the whole file in.

Glossary

/status/scanner
Bifrost HTTP endpoint (port 6040) listing, per chain, block_scanner_height, chain_height, scanner_height_diff and healthy. cmd/bifrost/health.go ↗
Bifrost
THORNode's observer sidecar: it scans each external chain's blocks and reports them to THORChain. Only validators run it. bifrost/ ↗
Block scanner
Bifrost's per-chain loop that reads blocks in order; a scanner lagging the tip delays observations and accrues slash points.
Churn
THORChain's periodic validator-set rotation: a keygen creates new vaults, then funds migrate in rounds from the retiring vaults. docs.thorchain.org ↗
Daemon
The chain's own RPC node (bitcoind, geth, …) that bifrost reads; in-cluster as host:port, or a full provider URL via BIFROST_CHAINS_*_RPC_HOST.
HALTCHURNING
Mimir key that stops churns once the chain reaches its value; this change treats any value at or below the height as halted.
JSON-RPC error body
An error answer (rate limit, bad key) served with HTTP 200; it has no .result field, so jq -r printed the string null. JSON-RPC 2.0 spec ↗
make status
Make target in node-launcher that runs node-status.sh inside the thornode pod and prints the node's sync table. node-status.sh ↗
Mimir
THORChain's on-chain key/value overrides for protocol constants, set by admin or node votes. docs/mimir.md ↗
TIP reference
A public endpoint used as the chain's true height, so the daemon's lag can be measured.