fix(ergo-sync): snapshot-bootstrap manifest liveness + latched chunk target - #220
Conversation
…target Two Mode-2 UTXO-snapshot bootstrap fixes (CodeRabbit review on #213): - on_peer_disconnect: if the departing peer owns the outstanding GetManifest, drop the request immediately (evict + recompute) instead of waiting out MANIFEST_REQUEST_TIMEOUT (30s). A dead peer never replies, so the timeout only stalls rotation to another voter. Non-owner disconnects still leave the pending request intact. - should_query: suppress GetSnapshotsInfo fan-out once discovery has produced a selection — Selected *or beyond* (ManifestRequested / ManifestVerified), not only Selected. Past selection the download phase owns the flow; querying a newly-seen peer would reopen a decision already made. - voters_for_selected_manifest: target the latched manifest (verified > pending > selected) via new latched_target(), so a post-verification vote change can't repoint chunk requests away from the manifest whose bytes we already verified. 4 new unit tests; ergo-sync suite 199 -> 203 (55 snapshot_bootstrap). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kw7uCwqmiGna8fpg6TvxGi
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Follow-up to #213 (CodeRabbit findings #9, #10) — behavioral fixes deliberately kept out of the mechanical split.
Changes (
snapshot_bootstrap/manifest.rs)#10 —
on_peer_disconnectimmediate pending-request cleanup. If the departing peer owns the outstandingGetManifest, drop it now (evict + recompute) instead of waiting outMANIFEST_REQUEST_TIMEOUT(30s). A dead peer never replies, so the timeout only stalls rotation. Non-owner disconnects leave the pending request intact.#9 — discovery gating + latched chunk target.
should_querynow suppressesGetSnapshotsInfoonSelectedor beyond (ManifestRequested/ManifestVerified), not onlySelected— past selection the download phase owns the flow.voters_for_selected_manifesttargets the latched manifest (verified > pending > selected) via newlatched_target(), so a post-verification vote change can't repoint chunk requests away from the verified manifest.Validation
ergo-syncsuite 199 → 203 (55 insnapshot_bootstrap).cargo clippy -p ergo-sync --all-targets --all-features -D warningsclean,cargo fmt --checkclean.🤖 Generated with Claude Code