Skip to content

feat(besu): report the sync phase through the healthcheck - #72

Merged
3alpha merged 2 commits into
mainfrom
feat/node-status-report
Nov 30, 2026
Merged

3alpha merged 2 commits into
mainfrom
feat/node-status-report

Conversation

@3alpha

@3alpha 3alpha commented Nov 30, 2026

Copy link
Copy Markdown
Member

Context

The dappmanager dashboard shows each node's sync status. It decides by itself whether the node is synced (latest block recent), waiting for the consensus client or stalled, and it computes the time left. What only the client knows is which sync phase it is in and how far along. That used to be parsed inside the dappmanager from client-specific fields and metrics, which broke whenever upstream changed them. It now lives in the package, next to the client version it describes, so a fix ships with the upstream bump.

The dappmanager side is in dappnode/DNP_DAPPMANAGER#2520 and the shared shell helpers in dappnode/staker-package-scripts#12.

Approach

  • Manifest: a nodes field declares the besu service as an execution node with its JSON-RPC and Engine API ports and report: healthcheck. Each variant manifest adds only its network.
  • Healthcheck: besu/node-status.sh runs as the service's Docker healthcheck and prints one JSON line with the phase, progress, latest block and peers. It exits 0 while starting or syncing, so a syncing node is not "unhealthy".
  • Image: installs jq, adds node_status_tools.sh from staker-package-scripts and the script as /usr/local/bin/node-status.
  • Shared scripts: STAKER_SCRIPTS_VERSION moves to v0.1.3, the release that will carry the helpers.

What it reports

Checked against the Besu source at 26.11.0, where eth_syncing returns an object for the whole snap sync.

Report Signal
starting The JSON-RPC does not answer
synced eth_syncing is false
Nothing to sync towards yet Sync not started, no pivot block chosen: Besu waits for a forkchoice update from the consensus client
"Downloading block headers" The chain download runs but currentBlock has not moved past startingBlock
"Downloading blocks", measured in blocks currentBlock towards the pivot block gauge, or highestBlock
"Downloading state", "Healing state", "Healing the flat database" The besu_synchronizer_sync_duration_count timers, in order

The world-state download has no percentage: Besu only prints it in its logs.

Merge order

This cannot build until dappnode/staker-package-scripts#12 is merged and released as v0.1.3: the Dockerfile downloads node_status_tools.sh from that release, and the new CI workflow checks out that repo's default branch for the same file.

Test instructions

  • sh test/node_status_test.sh (54 checks). Passes under dash, bash --posix, busybox ash and inside the built image (Ubuntu 24.04, jq 1.7).
  • shellcheck is clean.
  • Run against hyperledger/besu:26.11.0 on Hoodi with no consensus client attached: the script reported "nothing to sync towards yet" in about 0.16 s, and starting before the RPC came up.

Not seen on a live node: the state download, healing and chain download phases. They follow the upstream source.

The healthcheck prints a status report with the client's sync phase
and progress, declared in the manifest `nodes` field, so the
dappmanager no longer needs client-specific parsing.
@tropibot

tropibot Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

✅ TropiBot report: SYNC TEST REPORT - PASSED

This CI runs on a real DAppNode using the same RPC calls a user would make to configure a staker setup: execution client, consensus client, web3signer, MEV-boost, and relays.

📦 Package Under Test

📦 Clients Used

Component DNP Name
Execution hoodi-besu.dnp.dappnode.eth
Consensus teku-hoodi.dnp.dappnode.eth
Web3Signer web3signer-hoodi.dnp.dappnode.eth
MEV Boost mev-boost-hoodi.dnp.dappnode.eth
Network hoodi

🔖 Version Tracking

Client Before After
Execution besu/v26.11.0/linux-x86_64/openjdk-java-25 besu/v26.11.0/linux-x86_64/openjdk-java-25
Consensus n/a teku/v26.10.3/linux-x86_64/-eclipseadoptium-openjdk64bitservervm-java-25

⏱️ Timing

Operation Duration Status
SetStakerConfig 1m 7s ✅
PackageInstall 31.9s ✅
WaitForSync 1m 36s ✅
Cleanup 11.8s ✅

Total Duration: 3m 44s


📋 View full CI logs

@3alpha
3alpha merged commit 90dea05 into main Nov 30, 2026
5 of 6 checks passed
@3alpha
3alpha deleted the feat/node-status-report branch November 30, 2026 21:13
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.

2 participants