Repository navigation
fix(beacon-chain): exit on a failed checkpoint sync - #82
Merged
Merged
Conversation
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.
Contributor
✅ TropiBot report: SYNC TEST REPORT - PASSEDThis 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
🔖 Version Tracking
⏱️ Timing
Total Duration: 4m 24s |
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.
What
Check the exit code of
nimbus_beacon_node trustedNodeSyncinbeacon-chain/entrypoint.sh. If checkpoint sync fails, log an error, remove the partial${DATA_DIR}/dband 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.nimcallsquit 1on every failure path, so the exit code is reliable. The partial database is removed because otherwise the next start sees a non-emptydbdirectory, skips checkpoint sync and syncs from genesis anyway. Withrestart: unless-stoppedthe container retries until checkpoint sync succeeds; clearing the checkpoint sync URL still allows a deliberate genesis sync.Testing
sh -non the entrypoint. Not run on a node; worth checking with an unreachable checkpoint sync URL.