Skip to content

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

Merged
3alpha merged 3 commits into
mainfrom
feat/node-status-report
Dec 4, 2026
Merged

3alpha merged 3 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.11.0-b9abbcc/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 6s ✅
PackageInstall 51.1s ✅
WaitForSync 42.0s ✅
Cleanup 9.9s ✅

Total Duration: 3m 4s

🔴 Container Error Logs

⚠️ Showing up to 3 error lines per container.

DAppNodePackage-tracker.web3signer-hoodi.dnp.dappnode.eth:

ERROR: 2026/12/03 22:56:35 Error fetching justified epoch: client is not active
ERROR: 2026/12/03 22:57:35 Error fetching justified epoch: client is not active
ERROR: 2026/12/03 22:58:35 Error checking liveness for validators: client is not synced

DAppNodePackage-reth.hoodi-reth.dnp.dappnode.eth:

{"error":{"name":"No DNP with ip 172.33.0.23","message":"No DNP with ip 172.33.0.23"}}[INFO - entrypoint] Running Reth client for network: hoodi

DAppNodePackage-validator.teku-hoodi.dnp.dappnode.eth:

2026-12-03 22:57:31.684 ERROR - Failed to retrieve genesis data. Retrying after delay
java.util.concurrent.CompletionException: java.io.UncheckedIOException: Error communicating with Beacon Node API: Failed to connect to beacon-chain.teku-hoodi.dappnode/172.33.0.39:3500
at java.base/java.util.concurrent.CompletableFuture.wrapInCompletionException(Unknown Source)

DAppNodePackage-beacon-chain.teku-hoodi.dnp.dappnode.eth:

2026-12-03 22:58:33.005 ERROR - Execution Client request failed. Make sure the Execution Client is online and can respond to requests.
2026-12-03 22:58:33.006 ERROR - Failed to update fork choice. tech.pegasys.teku.ethereum.executionclient.response.InvalidRemoteResponseException: Invalid remote response from the execution client: Failed to connect to execution.hoodi.staker.dappnode/172.24.0.3:8551
2026-12-03 22:58:39.594 INFO  - Execution Client is responding to requests again after a previous failure

DAppNodePackage-brain.web3signer-hoodi.dnp.dappnode.eth:

[ERROR] Unable to look up validators on the beacon chain
BeaconchainApiError: Error getting (POST) state validators from beaconchain. Request to /eth/v1/beacon/states/head/validators failed with status code ECONNREFUSED: connect ECONNREFUSED 172.33.0.39:3500.
BeaconchainApiError: Error getting (POST) state validators from beaconchain. Request to /eth/v1/beacon/states/head/validators failed with status code ECONNREFUSED: connect ECONNREFUSED 172.33.0.39:3500.

DAppNodePackage-flyway.web3signer-hoodi.dnp.dappnode.eth:

container is exited (last exit code: 0)

📋 View full CI logs

@3alpha
3alpha merged commit 3e587b6 into main Dec 4, 2026
5 checks passed
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