fix: fixes InvalidSignature errors that could happen during streaming#2621
Merged
gdorsi merged 2 commits intofix/remove-storage-peersfrom Jul 8, 2025
Merged
fix: fixes InvalidSignature errors that could happen during streaming#2621gdorsi merged 2 commits intofix/remove-storage-peersfrom
gdorsi merged 2 commits intofix/remove-storage-peersfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
gdorsi
commented
Jul 8, 2025
| sessionEntry.newTransactions.push(tx.tx); | ||
| } | ||
|
|
||
| sessionEntry.lastSignature = signature; |
Collaborator
Author
There was a problem hiding this comment.
This is a small refactoring to make the code cleaner
e50fea8 to
375825c
Compare
375825c to
739fff6
Compare
aeplay
approved these changes
Jul 8, 2025
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.
Description
Found that when stale content is reiceved on storage we still update the lastSignature, leading to overriding the valid lastSignature with one that is referred to an old transaction.
Manual testing instructions
Reproduced the InvalidSignature bug using
tests/stress-testapp, restarting the sync server while having a page with 10k tasks open.In practice, we may still send non-required content when both the client and the sync-server are loading a coValue in streaming.
This can cause one of the two nodes to send some content blocks, which leads to updating the lastSignature with one of the chunk signatures.
In production this bug can be reproduced in a similar way.
Tests
Checklist