Skip to content

feat(bitcoin): report the sync status through the healthcheck - #65

Open
3alpha wants to merge 1 commit into
masterfrom
feat/node-status-report
Open

3alpha wants to merge 1 commit into
masterfrom
feat/node-status-report

Conversation

@3alpha

@3alpha 3alpha commented Nov 30, 2026

Copy link
Copy Markdown
Member

Context

The dappmanager dashboard is gaining a status card for every node package, not only Ethereum staking clients. For a node it has no built-in knowledge of, the package itself says whether the node is synced, how far along it is and what it is doing, through its Docker healthcheck. The dappmanager adds what is the same for every chain: stall detection, time left and waiting on a required node. The contract and the dappmanager side are in dappnode/DNP_DAPPMANAGER#2520; the shared shell helpers are released in staker-package-scripts v0.1.3 (dappnode/staker-package-scripts#12).

The dappmanager does not display status-report nodes yet: #2520 reads reports from Ethereum execution clients only. This package ships the declaration and the healthcheck ahead of that, which is safe: current dappmanagers ignore both.

Approach

  • Manifest: nodes declares the bitcoin.dnp.dappnode.eth service as a node on network bitcoin with the status-report probe, maxHeadAgeSeconds: 7200 and report: healthcheck.
  • Healthcheck: src/node-status.sh makes one batched JSON-RPC request (getblockchaininfo, getnetworkinfo, getindexinfo) to the local RPC and prints one JSON line. It exits 0 while starting or syncing, so a syncing node is not "unhealthy".
  • Credentials: BTC_RPCUSER and BTC_RPCPASSWORD are read from the container's environment and passed to curl as a config file on stdin, never as arguments, and never printed. The tests check this.
  • Image: installs curl and jq, adds node_status_tools.sh from the v0.1.3 release and the script as /usr/local/bin/node-status.

What it reports

Checked against the Bitcoin Core source at v32.1.

Report Signal
starting, with Bitcoin Core's own message as the phase ("Loading block index", "Verifying blocks") Nothing listens yet, or the RPC returns warm-up error -28
syncing "Downloading block headers" In initial block download with no blocks yet
syncing "Downloading blocks", with a percentage verificationprogress, capped at 99.9 while in initial block download
syncing "Catching up", measured in blocks Out of initial block download, but the tip is over 2 hours old or more than 6 headers are ahead
synced Out of initial block download, tip at most 2 hours old, at most 6 headers ahead
Background: "Building transaction index", "Validating UTXO snapshot" getindexinfo not synced, backgroundvalidation present
Issues Bitcoin Core's warnings, and network activity disabled
error The RPC rejects the credentials

Two hours is used because a gap that long between blocks happens only a few times a year.

Test instructions

  • sh test/node_status_test.sh (464 checks). Passes under dash, busybox, bash --posix and inside the built image.
  • shellcheck is clean.
  • Run against a live mainnet node (Bitcoin Core v32.1): the report went from "Loading banlist" to "Downloading block headers" to "Downloading blocks", and Docker showed the container healthy. On a regtest node: one mined block gave synced, disabling the network gave the issue, a wrong password gave error.

Not seen live: synced at the mainnet head and an index build. Both are covered by regtest and the stubbed tests.

Found on the way, not changed here

  • With BTC_TESTNET=1 the top-level rpcport and rpcbind in the generated config are ignored (they apply per network), so the RPC listens on 18332 on localhost only. The script would then report starting, and the declared network bitcoin would be wrong.
  • zmqpubrawtx, zmqpubhashtx and zmqpubhashblock share port 28333.

The healthcheck prints a status report that says whether the node is
synced and what it is doing, declared in the manifest `nodes` field
with the status-report probe.
@tropibot

tropibot Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Dappnode bot has built and pinned the built packages to an IPFS node, for commit: 938c73c

This is a development version and should only be installed for testing purposes.

  1. Package bitcoin.dnp.dappnode.eth

Install link

Hash: /ipfs/QmP9RrSvLRSfxVzcrPGvCvYhANurViDnN4FvPqUsWzNBeh

(by dappnodebot/build-action)

@tropibot

tropibot Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

✅ Package harness passed

Baseline and candidate passed the configured readiness checks

Package Verdict Reason Duration Cleanup
bitcoin.dnp.dappnode.eth ✅ Passed Candidate containers stable (candidate_containers_stable) 4m 21s ✅ Passed

Run overview

Context Value
Pull request dappnode/DAppNodePackage-bitcoin#65
Tested commit 938c73c88c42
Candidate artifact Install on DAppNode · /ipfs/QmP9RrSvLRSfxVzcrPGvCvYhANurViDnN4FvPqUsWzNBeh
Baseline request automatic
Worker dappnode-near-5
Run ID gh-pr-65-938c73c88c42-e7f6db54e00f193a
Execution 2026-11-30T15:32:25.117952648+00:00 → 2026-11-30T15:36:47.077637768+00:00 (✅ Completed)

Baseline vs candidate

Check Baseline Candidate
Version 0.1.10 0.1.11
Install ✅ Passed · 16s ✅ Passed · 1m 25s
Hard check ✅ Passed · 3 stable samples ✅ Passed · 3 stable samples
Containers 1 observed 1 observed
Stabilization 10s 10s
Log collection ✅ Passed · 1 container ✅ Passed · 1 container

Container comparison

  • Added: none
  • Removed: none
  • Baseline inventory: DAppNodePackage-bitcoin.dnp.dappnode.eth
  • Candidate inventory: DAppNodePackage-bitcoin.dnp.dappnode.eth
  • Baseline non-running states: none
  • Candidate non-running states: none
  • Deterministic regressions: ✅ none
Container inventory

Baseline

Container Service State Image Created
DAppNodePackage-bitcoin.dnp.dappnode.eth bitcoin.dnp.dappnode.eth ✅ Running bitcoin.dnp.dappnode.eth:0.1.10 1796052761

Candidate

Container Service State Image Created
DAppNodePackage-bitcoin.dnp.dappnode.eth bitcoin.dnp.dappnode.eth ✅ Running bitcoin.dnp.dappnode.eth:0.1.11 1796052857

Runtime analysis advisory

✅ Clean — Nexus analysis was inconclusive; heuristic fallback used: No configured candidate-only suspicious signature was found

Analyzer Status Summary
Composite ✅ Clean Nexus analysis was inconclusive; heuristic fallback used: No configured candidate-only suspicious signature was found
Heuristic ✅ Clean No configured candidate-only suspicious signature was found
Nexus ⚪ Inconclusive Nexus analysis was unavailable — Unavailable: analyzer transport failed: Nexus returned HTTP 524
Baseline evidence ✅ Clean No configured suspicious signature was found
Candidate evidence ✅ Clean No configured suspicious signature was found

✅ No new runtime findings were reported.

Analyzer diagnostics
  • analyzer transport failed: Nexus returned HTTP 524

Cleanup and diagnostics

Check Result
Cleanup ✅ Passed
Leftover packages none
Cleanup error none

✅ No run errors were recorded.


Deterministic checks decide the verdict. Runtime log analysis is advisory. TropiBot publishes bounded summaries and never posts raw logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant