Skip to content

feat(validator): add SYNC_MODE so a fresh validator can warp sync - #7

Merged
nol4lej merged 1 commit into
mainfrom
feat/validator-sync-mode
Sep 22, 2026
Merged

nol4lej merged 1 commit into
mainfrom
feat/validator-sync-mode

Conversation

@nol4lej

@nol4lej nol4lej commented Sep 22, 2026

Copy link
Copy Markdown
Member

Closes #6 - same idea, opt-in instead of hardcoded.

--sync warp lets a brand new validator prove finality and fetch the latest state instead of replaying every block. Two things keep it from being a safe default:

  • On a volume that already holds finalized state the node ignores it: Can't use warp sync mode with a partially synced database. Reverting to full sync mode.
  • When it does apply, the validator isn't an archive node, so the gap is backfilled headers only — no block bodies before the sync point, for good.

So it goes behind ${SYNC_MODE}, empty by default, same pattern as PUBLIC_ADDR and RESERVED_NODES. Bootstrapping a new validator sets SYNC_MODE=--sync warp; existing ones are untouched.

Validators only. rpc and indexer-rpc run --blocks-pruning archive, and an archive node exits at startup with Warp sync doesn't work for archive nodes and crash-loops under restart: unless-stopped.

Verified against ghcr.io/orbinum/node:testnet-latest (0.2.0): empty ${SYNC_MODE} leaves no stray args, --sync warp splits correctly, warp engages on a fresh volume, is ignored once finalized state exists, and is fatal on an archive node.

@nol4lej
nol4lej merged commit ed056a5 into main Sep 22, 2026
1 check passed
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