Skip to content

feat(juno): report the sync status through the healthcheck - #40

Open
3alpha wants to merge 1 commit into
mainfrom
feat/node-status-report
Open

3alpha wants to merge 1 commit into
mainfrom
feat/node-status-report

Conversation

@3alpha

@3alpha 3alpha commented Nov 30, 2026

Copy link
Copy Markdown
Member

Context

The dappmanager dashboard is gaining a status card for every node package, not only Ethereum staking clients. For a node it has no built-in knowledge of, the package itself says whether the node is synced, how far along it is and what it is doing, through its Docker healthcheck. The dappmanager adds what is the same for every chain: stall detection, time left and waiting on a required node. The contract and the dappmanager side are in dappnode/DNP_DAPPMANAGER#2520; the shared shell helpers are released in staker-package-scripts v0.1.3 (dappnode/staker-package-scripts#12).

The dappmanager does not display status-report nodes yet: #2520 reads reports from Ethereum execution clients only. This package ships the declaration and the healthcheck ahead of that, which is safe: current dappmanagers ignore both.

Approach

  • Manifest: nodes declares the juno service as a node with the status-report probe, maxHeadAgeSeconds: 300 and report: healthcheck. Each variant adds its network (starknet or starknet-sepolia) and requires the Ethereum execution client of its L1.
  • Healthcheck: juno/node-status.sh reads starknet_syncing and the latest block from the RPC and a few gauges from the metrics endpoint, and prints one JSON line. It exits 0 while starting or syncing.
  • Entrypoint: the snapshot download and extraction now run in the background behind a wait, and leave a marker under /tmp/node-status, so the healthcheck can report them before Juno serves its RPC. What the steps do and how they fail is unchanged; if the FIFO cannot be created the download runs exactly as before.
  • Image: installs curl and jq, adds node_status_tools.sh from the v0.1.3 release and the script as /usr/local/bin/node-status.

What it reports

Checked against the Juno source at v0.16.2.

Report Signal
starting "Downloading snapshot", with a percentage File size against the length wget prints
starting "Extracting snapshot", with a percentage How far tar has read the archive
starting "Migrating database" The metrics port listens but the RPC port does not yet
synced starknet_syncing is false or within 6 blocks of the head, and the latest block is at most 300 s old
syncing "Downloading blocks", measured in blocks current_block_num towards highest_block_num
syncing "Catching up" Juno thinks it is at the head but the head is stale
Detail "Verified on Ethereum" l1_l2_finalised_height
Issue Juno's own call to its Ethereum node failed (l1_latest_height is 0)

starknet_syncing alone is not enough: Juno returns false before it knows the chain head. Blocks come every 1 to 2 s, so 300 s leaves a wide margin.

Test instructions

  • sh test/node_status_test.sh (151 checks). Passes under dash, busybox and inside the built image.
  • shellcheck is clean on everything added.
  • Run against Juno v0.16.2 on Sepolia: a sync from genesis reported "Downloading blocks" with the right numbers and Docker showed the container healthy. The real snapshot download showed its percentage, and a 1.5 GB archive extraction went from 17% to 86%. Killing wget made the entrypoint exit with the same code as before this change.

Not seen live: synced, which needs a fully synced node.

Found on the way, not changed here

  • The snapshot is always saved as mainnet.tar in the container's root, not in the volume, and a partial extraction makes the next start skip the download.
  • The latest snapshots are built with Juno v0.17.1 while the package pins v0.16.2; whether the older version can open them was not checked.
  • printenv in the entrypoint logs the L1 URL, which can contain an API key.
  • The README's disk sizes are out of date.

The healthcheck prints a status report that says whether the node is
synced and what it is doing, declared in the manifest `nodes` field
with the status-report probe.
@tropibot

tropibot Bot commented Nov 30, 2026

Copy link
Copy Markdown

Dappnode bot has built and pinned the built packages to an IPFS node, for commit: a45d5a9

This is a development version and should only be installed for testing purposes.

  1. Package juno-sepolia.dnp.dappnode.eth

Install link

Hash: /ipfs/QmUxmzhEAePp25kmeEAQjaK8JZGpwcpuaLstywijFTHtZR

(by dappnodebot/build-action)

@tropibot

tropibot Bot commented Nov 30, 2026

Copy link
Copy Markdown

🛠️ Package harness hit an infrastructure error

MCP tool 'dappnode_fetch_install_preview' timed out

Package Verdict Reason Duration Cleanup
juno-sepolia.dnp.dappnode.eth 🛠️ Infrastructure error Mcp unavailable (mcp_unavailable) 2m 16s ✅ Passed

Run overview

Context Value
Pull request dappnode/DAppNodePackage-juno-generic#40
Tested commit a45d5a994d5e
Candidate artifact Install on DAppNode · /ipfs/QmUxmzhEAePp25kmeEAQjaK8JZGpwcpuaLstywijFTHtZR
Baseline request automatic
Worker dappnode-near-5
Run ID gh-pr-40-a45d5a994d5e-5883c812c8f923d8
Execution 2026-11-30T15:30:08.199175890+00:00 → 2026-11-30T15:32:24.695223497+00:00 (✅ Completed)

Baseline vs candidate

Check Baseline Candidate
Version 0.1.6 not reported
Install ✅ Passed · 1m 12s ❌ Failed · 0s
Hard check ✅ Passed · 3 stable samples ❌ Failed · 0 stable samples
Containers 1 observed 0 observed
Stabilization 10s 0s
Log collection ✅ Passed · 1 container ❌ Failed · 0 containers

Hard-check reasons

  • Baseline: none
  • Candidate: candidate_containers_unstable

Container comparison

  • Added: none
  • Removed: none
  • Baseline inventory: none
  • Candidate inventory: none
  • Baseline non-running states: none
  • Candidate non-running states: none
  • Deterministic regressions: ✅ none
Container inventory

Baseline

Container Service State Image Created
DAppNodePackage-juno.juno-sepolia.dnp.dappnode.eth juno ✅ Running juno.juno-sepolia.dnp.dappnode.eth:0.1.6 1796052688

Candidate

No container snapshot was available.

Runtime analysis advisory

⚪ Inconclusive — Log analysis was unavailable

Analyzer Status Summary
Heuristic ⚪ Inconclusive Log analysis was unavailable
Baseline evidence ⚪ Inconclusive Analysis unavailable
Candidate evidence ⚪ Inconclusive Analysis unavailable

✅ No new runtime findings were reported.

Analyzer diagnostics
  • run ended before comparative log analysis

Cleanup and diagnostics

Check Result
Cleanup ✅ Passed
Leftover packages none
Cleanup error none
Phase Code Message
Candidate preview mcp_unavailable MCP tool 'dappnode_fetch_install_preview' timed out

Deterministic checks decide the verdict. Runtime log analysis is advisory. TropiBot publishes bounded summaries and never posts raw 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.

1 participant