[FR] cardano-testnet: add a status command
Los mantenedores suelen responder en 1 día
@palas ya está trabajando en esto.
Desde el 14/9/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Part of #6687 (subtask 2 of 2). Depends on the manifest sub-issue.
Problem
There is no way to ask a running testnet "are you alive?". A dead node is silent (nothing
monitors the child processes after startup), and a chain stall (#5762) is only visible by
reading logs. Consumers write their own polling loops.
Proposal
cardano-testnet status [--output-dir DIR] [--json] [--timeout SECONDS]
Same --output-dir flag and ./testnet default as the cardano command. Read-only, always
terminates (per-node timeout, default 5s). It reads manifest.json, then asks every node
for its chain tip over its socket (getLocalChainTip — the same lightweight query the
chain watchdog polls with), and reports:
Per node: ok (fresh tip) / stalled (answers, no fresh tip) / unreachable (no answer,
process alive or unknown) / down (no answer, process known dead). The PID check is only a
hint; the socket answer decides.
A tip is "fresh" when younger than max(60s, 2 x forecast horizon) — the same threshold the
chain watchdog already uses for "chain dead" (60s at default settings; status applies it to
the tip's age in one snapshot). One shared number, no new magic value. A node answering
"no blocks yet" (tip at genesis) counts as stalled.
Network state and exit code (answers "what if one node is unhealthy?"):
| state | rule | exit |
|---|---|---|
| RUNNING | every node ok | 0 |
| DEGRADED | chain producing (>= 1 node ok), some node not | 0 |
| STALLED | nodes answer, no fresh tip anywhere | 3 |
| STOPPED | no node answers | 4 |
| NO-TESTNET | no manifest.json in the directory (+ hint) | 5 |
Exit 0 = "the chain is producing blocks" (the rule from #6687), so
cardano-testnet status && run-tests works, even when a relay died. Exit 1 stays what it
already means everywhere: the command itself failed. Strict "all healthy" checks use the
JSON field status == "running".
--json prints one stable object (schemaVersion'd like the manifest, schema in the repo):
overall status, best tip (slot/block/hash/age), and the per-node list with tips and ages.
Polling status until exit 0 is the intended "wait until ready" loop (NO-TESTNET covers
the not-started-yet window; the manifest only appears once the network is ready).
- Lenguaje dominante
- Haskell
- Estrellas
- 3.2k
- Forks
- 760
- Merge medio
- 2 d 7 h
- PR fusionados (30 d)
- 21
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de IntersectMBO/cardano-node
-
Stale
Dificultad 1/5 1-3 horas Aptitud para principiantes 75/100
IntersectMBO/cardano-node#6597 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Stale
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
IntersectMBO/cardano-node#6578 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
IntersectMBO/cardano-node#6522 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 30/100
IntersectMBO/cardano-node#6729 ·
Los mantenedores suelen responder en 1 día
-
increase in memory usageAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
IntersectMBO/cardano-node#6718 ·
Los mantenedores suelen responder en 1 día
Todos los issues de IntersectMBO/cardano-node
Issues similares
-
component: hls-refactor-plugin status: needs triage type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100
haskell/haskell-language-server#5111 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
alunduil/network-arbitrary#193 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
alunduil/siren-json.hs#245 ·
Los mantenedores suelen responder en 1 día
-
infrastructure
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
alunduil/collection-json.hs#393 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día