Skip to content

fix(accountsdb): don't hang when no peer serves an incremental snapshot - #1767

Open
0xzrf wants to merge 1 commit into
Syndica:mainfrom
0xzrf:snapshot_download_fix
Open

fix(accountsdb): don't hang when no peer serves an incremental snapshot#1767
0xzrf wants to merge 1 commit into
Syndica:mainfrom
0xzrf:snapshot_download_fix

Conversation

@0xzrf

@0xzrf 0xzrf commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Fixes #1763

Problem

Bootstrapping against a cluster whose peers serve no incremental snapshots (e.g. a local solana-test-validator) hangs forever after the full snapshot downloads. In downloadSnapshotWithRetry, a peer with no incremental is skipped before dl_attempts is incremented, and the validator sets no timeout — the retry loop never exits, so the RPC server never starts.

Changes

  • Count peers skipped because they have nothing downloadable in the current mode.
  • If every valid peer is skipped for 5 consecutive rounds (~25s), return error.UnableToDownloadSnapshot so the existing fallback in downloadSnapshotsFromGossip boots from the full snapshot only.
  • Rounds with no valid peers at all still retry as before.

Notes

Verified against solana-test-validator (Agave 4.1.2): previously the loop spun forever; now it gives up after ~25s and startup continues. An epoch-0 cluster then hits an unrelated error.InvalidInsert in EpochTracker.initFromManifest — will file separately.

@github-project-automation github-project-automation Bot moved this to 🏗 In progress in Sig Jul 26, 2026
@dnut dnut added the external label Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

Sig RPC stops after downloading snapshot from agave solana-test-validator

2 participants