Repository navigation
Conversation
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.
|
Dappnode bot has built and pinned the built packages to an IPFS node, for commit: 76164f5 This is a development version and should only be installed for testing purposes.
Hash: (by dappnodebot/build-action) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-scriptsv0.1.3 (dappnode/staker-package-scripts#12).The dappmanager does not display
status-reportnodes 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
nodesdeclares thepathfinderservice as anodewith thestatus-reportprobe,maxHeadAgeSeconds: 300andreport: healthcheck. Each variant adds itsnetwork(starknetorstarknet-sepolia) andrequiresthe Ethereum execution client of its L1.pathfinder/node-status.shreadsstarknet_syncing, the latest block and the L1-accepted block from the RPC and prints one JSON line. It exits 0 while starting or syncing./tmp/node-status, so the healthcheck can report the snapshot download and extraction before Pathfinder serves its RPC. Withset -ea failure still stops the entrypoint as before. The changed entrypoint gives the same output and exit codes as the original in 9 stubbed scenarios.jq, addsnode_status_tools.shfrom the v0.1.3 release and the script as/usr/local/bin/node-status.What it reports
Checked against the Pathfinder source at v0.22.3.
starting"Downloading snapshot" or "Extracting snapshot", with a percentagerclone lssyncedstarknet_syncingis false and the latest block is at most 300 s oldsyncing"Downloading blocks", measured in blockscurrent_block_numtowardshighest_block_numsyncingwith no phasestarknet_syncingis false but the latest block is old or missingpathfinder_lastL1AcceptedBlockHashAndNumberFile size cannot measure the download: rclone pre-allocates the whole file at the start. Pathfinder has no peer count (it syncs from the gateway) and exposes no signal for an unreachable L1 node, so neither is reported. Blocks come about every 1.8 s, so 300 s leaves a wide margin.
Test instructions
sh test/node_status_test.sh(326 checks). Passes under dash,bash --posixand inside the built image.Not seen live:
synced, which needs a fully synced database.Found on the way, not changed here
mvfails because the image's working directory is the data directory, so the entrypoint exits and leaves the compressed snapshot (54 GB on Sepolia) in the data volume. Pathfinder starts on the next restart.prometheus-targets.jsonis a copy of Sepolia's, the mainnet manifest advertises port 9555 while the RPC listens on 6060, and the setup wizard accepts http L1 URLs that Pathfinder rejects at start.