fix(pushsync): prevent silent chunk loss on shallow receipts#5390
Open
gacevicljubisa wants to merge 7 commits intomasterfrom
Open
fix(pushsync): prevent silent chunk loss on shallow receipts#5390gacevicljubisa wants to merge 7 commits intomasterfrom
gacevicljubisa wants to merge 7 commits intomasterfrom
Conversation
Updated comments to correct formatting and clarity.
acud
reviewed
Mar 10, 2026
| // error budget and wait for any other inflight parallel pushes | ||
| // (e.g. multiplex forwards) before giving up. Only return | ||
| // ErrShallowReceipt once the entire budget is spent. | ||
| shallowReceiptResult = result.receipt |
Contributor
There was a problem hiding this comment.
you've removed the skiplist addition line that was on the left side of the diff (L493). any particular reason?
Member
Author
There was a problem hiding this comment.
actually it is not removed, it is on the common failure path at pushsync.go:524
| if ps.fullNode { | ||
| // If a peer already has the chunk (even at wrong depth), don't | ||
| // store locally — the chunk is closer to its neighbourhood than us. | ||
| if shallowReceiptResult != nil { |
Contributor
There was a problem hiding this comment.
this prevents the pss code from executing. i'm not sure if its 100% correct. maybe for the sake of eventual correctness you could put this below the pss unwrap block (before the returning of the error)
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.
Checklist
Description
Chunks could silently disappear from the network after a successful upload due to three bugs in the pushsync/pusher pipeline.
Root causes & fixes
1. Storer stored chunks it was about to evict (root cause)
ErrWantSelf) but the chunk was outside its AOR, it stored the chunk and sent a receipt anywayunreserve(), leaving the network with no copyErrOutOfDepthStoringwhenErrWantSelffires butproximity(chunk, self) < radius; the origin treats it as a hard failure and retries with the next peer2. Shallow receipt abandoned inflight parallel pushes
pushToClosestreturned immediately, discarding results from other parallel multiplex pushes that could have been validErrShallowReceiptonly after the full budget is exhausted3. False
ChunkSyncedafter retry exhaustionChunkSyncedeven though no node in the correct neighbourhood had stored themChunkCouldNotSyncinsteadOpen API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
Screenshots (if appropriate):