scripts/arc-check.sh is the operator-facing diagnostic for a consensus node. Four cases make it report a problem as "ok", or abort the report before the useful sections run. All reproduced against a mock of the CL/EL RPC shapes in crates/malachite-app/src/rpc/{types,handlers}.rs.
1. --el node without the admin namespace: prints Connected: 0 peers, then the whole report aborts
admin_peers on an EL node with the admin namespace disabled returns HTTP 200 with a JSON-RPC error body. The script does .result | length (jq gives 0 for null), prints Connected: 0 peers, then .result[] fails with jq: error: Cannot iterate over null and, under set -euo pipefail, the script exits 5 before the Proposal History section. A transport failure to the optional --el endpoint likewise calls die, killing the mandatory sections after it.
2. Heights whose /proposal-monitor lookup fails are silently counted as successful
Line 218 || continue skips 404/400/timeouts, but total_checked still includes them, so with 49 of 50 heights unavailable the script still prints All 50 proposals decided successfully: yes.
3. Non-validator nodes get a red fault
A node that is not in the validator set (a follower / full node — the normal mainnet operator case) is told Proposed 0/50 blocks — never selected as proposer in red. That is expected behaviour, not a fault; the Identity section already says In Validator Set: no.
4. Progress bar off-by-one at 0 % / 100 %
$(printf '#%.0s' $(seq 1 "$filled")) with filled=0: GNU seq 1 0 prints nothing so printf still emits one #; BSD/macOS seq 1 0 prints 1 0 so it emits two. Symmetric for empty at 100 %. Verified on macOS: printf '[%s]' "$(printf '#%.0s' $(seq 1 0))" → [##].
Proposed fix
--el section warns and continues (WARN: admin_peers unavailable: <message> (is the admin namespace enabled?)) instead of dying; only iterates .result when it is an array.
- Track
unavailable_count; verdicts only count heights actually fetched and say so (Proposal data unavailable for N/M heights (not counted)).
- Nodes not in the validator set get
not in validator set (expected for non-validator nodes) instead of the red verdict; the red verdict stays for in-set validators with 0 proposals.
- Pad the bar with
printf '%*s' N '' | tr ' ' '#' (no seq), guard total == 0.
- Add
scripts/test_arc_check.sh: self-contained bash test with an inline python mock of both RPCs; 8 of its 13 checks fail on the current script and all pass with the fix.
I have the fix ready and can open a PR referencing this issue.
scripts/arc-check.shis the operator-facing diagnostic for a consensus node. Four cases make it report a problem as "ok", or abort the report before the useful sections run. All reproduced against a mock of the CL/EL RPC shapes incrates/malachite-app/src/rpc/{types,handlers}.rs.1.
--elnode without theadminnamespace: printsConnected: 0 peers, then the whole report abortsadmin_peerson an EL node with the admin namespace disabled returns HTTP 200 with a JSON-RPC error body. The script does.result | length(jq gives0fornull), printsConnected: 0 peers, then.result[]fails withjq: error: Cannot iterate over nulland, underset -euo pipefail, the script exits 5 before the Proposal History section. A transport failure to the optional--elendpoint likewise callsdie, killing the mandatory sections after it.2. Heights whose
/proposal-monitorlookup fails are silently counted as successfulLine 218
|| continueskips 404/400/timeouts, buttotal_checkedstill includes them, so with 49 of 50 heights unavailable the script still printsAll 50 proposals decided successfully: yes.3. Non-validator nodes get a red fault
A node that is not in the validator set (a follower / full node — the normal mainnet operator case) is told
Proposed 0/50 blocks — never selected as proposerin red. That is expected behaviour, not a fault; the Identity section already saysIn Validator Set: no.4. Progress bar off-by-one at 0 % / 100 %
$(printf '#%.0s' $(seq 1 "$filled"))withfilled=0: GNUseq 1 0prints nothing soprintfstill emits one#; BSD/macOSseq 1 0prints1 0so it emits two. Symmetric foremptyat 100 %. Verified on macOS:printf '[%s]' "$(printf '#%.0s' $(seq 1 0))"→[##].Proposed fix
--elsection warns and continues (WARN: admin_peers unavailable: <message> (is the admin namespace enabled?)) instead of dying; only iterates.resultwhen it is an array.unavailable_count; verdicts only count heights actually fetched and say so (Proposal data unavailable for N/M heights (not counted)).not in validator set (expected for non-validator nodes)instead of the red verdict; the red verdict stays for in-set validators with 0 proposals.printf '%*s' N '' | tr ' ' '#'(noseq), guardtotal == 0.scripts/test_arc_check.sh: self-contained bash test with an inline python mock of both RPCs; 8 of its 13 checks fail on the current script and all pass with the fix.I have the fix ready and can open a PR referencing this issue.