Skip to content

feat(erigon): report the sync phase through the healthcheck - #101

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

Report Signal
starting The JSON-RPC does not answer
synced eth_syncing is false
"Preparing the snapshot download" highestBlock 0 with no stages, or every stage at 0 before the download begins
"Downloading snapshots", with a percentage Empty stages: currentBlock / highestBlock
"Indexing snapshots" The same ratio at 99%, or the otter_sync stage gauge above 0 with execution at 0
"Executing blocks", measured in blocks Stages listed: currentBlock towards highestBlock
Issue --http.api in EXTRA_OPTS leaves out eth, net or web3, which the dashboard needs

After the snapshot download eth_syncing keeps reporting old block numbers for a while as blocks already execute. During that window the script reads the sync{stage=…} gauges to tell indexing from executing. startingBlock is not used: it resets on every restart.

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 (134 checks). Passes under dash and inside the built image.
  • shellcheck is clean.
  • Run against Erigon v3.8.2 on Hoodi with no consensus client attached for about 7 minutes: the script reported "Preparing the snapshot download", then "Downloading snapshots" at 4% while Erigon's own log said 4.24%. It took about 0.6 s, and starting took 0.14 s with networking off.

Not seen on a live node: the indexing, handoff and execution 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-erigon.dnp.dappnode.eth
Consensus prysm-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 erigon/3.8.1-cf6f1413/linux-amd64/go1.27.3 erigon/3.8.2-8a3f3b2c/linux-amd64/go1.27.4
Consensus Prysm/v7.3.1-96d418c (linux amd64) Prysm/v7.3.1-96d418c (linux amd64)

⏱️ Timing

Operation Duration Status
SetStakerConfig 1m 42s ✅
PackageInstall 32.4s ✅
WaitForSync 30.3s ✅
Cleanup 6.3s ✅

Total Duration: 2m 54s


📋 View full CI logs

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