Skip to content

feat(geth): report the sync phase through the healthcheck - #105

Open
3alpha wants to merge 2 commits into
mainfrom
feat/node-status-report
Open

3alpha wants to merge 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 geth service as an execution node with its JSON-RPC and Engine API ports and report: healthcheck. Each variant manifest adds only its network.
  • Healthcheck: geth/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 go-ethereum source at v1.17.10 and at v1.17.2, which the Lukso variant pins.

Report Signal
starting The JSON-RPC does not answer
synced eth_syncing is false
"Downloading block headers", nothing to sync towards yet currentBlock and highestBlock are both 0
"Healing state" healingTrienodes or healingBytecode above 0
"Downloading state", with a percentage eth_protocols_snap_sync_progress metric, while the latest block is genesis
"Downloading blocks", with a percentage eth_downloader_chain_progress metric, or currentBlock / highestBlock
"Catching up state", "Generating state trie" The snap/2 fields, which only apply after the Amsterdam fork
Background: "Indexing transactions", "Indexing state history" txIndexRemainingBlocks, stateIndexRemaining, when no phase applies

Both progress metrics exist at 0 from start-up, so 0 is treated as "not measured yet". v1.17.2 has neither metric; the script falls back to an unmeasured phase there.

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 (235 checks). Passes under dash, in alpine:3 and inside ethereum/client-go:v1.17.10 (busybox ash).
  • shellcheck is clean.
  • Run against ethereum/client-go:v1.17.10 on Hoodi with no consensus client attached: the script reported "Downloading block headers" with nothing to sync towards in about 0.14 s, and starting with the RPC closed.

Not seen on a live node: the state download, healing and indexing phases. They follow the upstream source. The snap/2 handling is tested with fixtures only.

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-geth.dnp.dappnode.eth
Consensus lodestar-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 Geth/v1.17.10-stable-1df30b18/linux-amd64/go1.27.3 Geth/v1.17.10-stable-1df30b18/linux-amd64/go1.27.3
Consensus Lodestar/v2.0.0/edba9f7 Lodestar/v2.0.0/edba9f7

⏱️ Timing

Operation Duration Status
SetStakerConfig 1m 45s ✅
PackageInstall 9.1s ✅
WaitForSync 6.0s ✅
Cleanup 9.8s ✅

Total Duration: 2m 13s


📋 View full CI 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.

2 participants