Skip to content

feat(reth): report the sync phase through the healthcheck - #103

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 reth service as an execution node with its JSON-RPC and Engine API ports and report: healthcheck. Each variant manifest adds only its network.
  • Healthcheck: reth/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 Reth source at v2.10.1.

Report Signal
starting with "Downloading snapshot", "Extracting snapshot" or "Verifying snapshot" and a percentage The marker the entrypoint writes while reth download runs
starting The JSON-RPC does not answer and no download is running
synced eth_syncing is false
A pipeline stage with an overall percentage The stages checkpoints, weighted by each stage's share of the sync time, against the highest checkpoint
"Downloading block headers" Every stage at the head but header requests in flight (reth_downloaders_headers_in_flight_requests)
Nothing to sync towards yet Every stage at the head and no header download

Unknown stage names are ignored. Era and PruneSenderRecovery are skipped when they are not part of the pipeline, since a fresh database gives them a genesis checkpoint.

Entrypoint change

On mainnet the entrypoint downloads a snapshot before Reth starts, so for a long time there is no RPC and no metrics. reth download now runs in the background behind a FIFO: its output still goes to the logs, and each progress line updates /tmp/node-status/snapshot-download with the download's PID, phase and percentage. The marker is removed when the download ends or fails and at every container start, and the script trusts it only while the RPC is down and that PID is still a download. If the FIFO cannot be created, the download runs exactly as before. reth download errors now go to stdout together with its normal output.

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 (109 checks). Passes under dash, busybox ash and dash inside the pinned image (Ubuntu 24.04, jq 1.7).
  • shellcheck is clean.

Not run against a live node: the Reth binary of the pinned image crashes with "Illegal instruction" on the development machine, whose CPU has no AVX. Two things therefore need checking on a real node:

  • the reth download progress line format, which was read from the source (download/progress.rs), not observed. If it differs, the card shows "Downloading snapshot" without a percentage;
  • the snapshot download itself, since the entrypoint now runs it through a FIFO.

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-reth.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 reth/v2.10.1-58ebce1/x86_64-unknown-linux-gnu reth/v2.10.1-58ebce1/x86_64-unknown-linux-gnu
Consensus n/a teku/v26.10.3/linux-x86_64/-eclipseadoptium-openjdk64bitservervm-java-25

⏱️ Timing

Operation Duration Status
SetStakerConfig 1m 11s ✅
PackageInstall 54.1s ✅
WaitForSync 30.0s ✅
Cleanup 10.5s ✅

Total Duration: 3m 1s


📋 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