Skip to content

fix(beacon-chain): exit on a failed checkpoint sync - #82

Merged
3alpha merged 1 commit into
mainfrom
fix/fail-on-checkpoint-sync-error
Nov 27, 2026
Merged

3alpha merged 1 commit into
mainfrom
fix/fail-on-checkpoint-sync-error

Conversation

@3alpha

@3alpha 3alpha commented Nov 27, 2026

Copy link
Copy Markdown
Member

What

Check the exit code of nimbus_beacon_node trustedNodeSync in beacon-chain/entrypoint.sh. If checkpoint sync fails, log an error, remove the partial ${DATA_DIR}/db and exit 1.

Why

The exit code was ignored, so a failed checkpoint sync (unreachable URL, timeout, bad state) silently fell through to starting the node, which then synced from genesis. Upstream trusted_node_sync.nim calls quit 1 on every failure path, so the exit code is reliable. The partial database is removed because otherwise the next start sees a non-empty db directory, skips checkpoint sync and syncs from genesis anyway. With restart: unless-stopped the container retries until checkpoint sync succeeds; clearing the checkpoint sync URL still allows a deliberate genesis sync.

Testing

sh -n on the entrypoint. Not run on a node; worth checking with an unreachable checkpoint sync URL.

trustedNodeSync exits non-zero on failure, but its exit code was
ignored, so a failed checkpoint sync silently fell back to syncing
from genesis. On failure, remove the partial database and exit so
the container restarts and retries; otherwise the next start would
find the database and skip checkpoint sync.
@3alpha
3alpha merged commit 7a2692e into main Nov 27, 2026
4 checks passed
@tropibot

tropibot Bot commented Nov 27, 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-geth.dnp.dappnode.eth
Consensus nimbus-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 Geth/v1.17.10-stable-1df30b18/linux-amd64/go1.27.3 Geth/v1.17.10-stable-1df30b18/linux-amd64/go1.27.3
Consensus n/a Nimbus/v26.10.2-0abc0d-stateofus

⏱️ Timing

Operation Duration Status
SetStakerConfig 1m 28s ✅
PackageInstall 49.7s ✅
WaitForSync 1m 30s ✅
Cleanup 18.2s ✅

Total Duration: 4m 24s


📋 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.

1 participant