Skip to content

Preserve snapshot chunk retry budget - #2437

Open
a-shannon wants to merge 1 commit into
ergoplatform:masterfrom
a-shannon:fix/snapshot-chunk-retry-budget
Open

Preserve snapshot chunk retry budget#2437
a-shannon wants to merge 1 commit into
ergoplatform:masterfrom
a-shannon:fix/snapshot-chunk-retry-budget

Conversation

@a-shannon

@a-shannon a-shannon commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve the accumulated delivery-check count when a timed-out UTXO snapshot chunk is requested from a replacement peer.
  • Allow the configured maxDeliveryChecks budget to terminate repeated chunk retries.
  • Add an actor-level regression test using a real chunk from a snapshot manifest, covering both the retry and terminal transitions.

Root cause

checkDelivery incremented the stored attempt count, but requestUtxoSetChunk recreated the DeliveryTracker entry without passing that count. The default value of zero replaced the previous state on every retry, so the configured maximum could never be reached for snapshot chunks.

Impact

When UTXO snapshot bootstrap is enabled, an unavailable or non-delivering chunk could be requested repeatedly instead of exhausting the configured retry budget. This could prolong or stall that bootstrap mode while producing repeated peer penalties, timers, logs, and network traffic.

This change does not affect consensus rules, transaction validity, serialization, or default configuration.

Scope

The change enforces the existing retry budget. It does not alter snapshot-plan recovery after the budget is exhausted.

This is distinct from #2434, which corrects the request type used for snapshot manifest retries, and #2424, which restores wallet scanning after snapshot bootstrap. #2424 touches the same synchronizer and specification, so whichever change lands second may need a small rebase.

Validation

  • Regression witness on unpatched master: focused test 0/1 (99 expected, 0 observed).
  • Patched focused regression: 1/1.
  • Affected closure: 34/34 across the synchronizer, both delivery-tracker suites, snapshot processor, and modifier-request suite.

@a-shannon
a-shannon force-pushed the fix/snapshot-chunk-retry-budget branch from 1793468 to b9fde27 Compare September 4, 2026 14:55
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.

2 participants