Repository navigation
Cache the SDK's storage node registry read - #110
Merged
Merged
Conversation
Ocnrb
commented
Oct 6, 2026
Member
- Every history read asked the chain for the storage node's URLs (getNode, 43-83% of the measured RPC calls); the SDK's own cache map now keeps them, and a node that stops answering or returns 5xx drops its entry so a moved node is read again
- Pins @streamr/sdk to 103.3.1: the cache lives in patches/@streamr+sdk+103.3.1.patch, applied on postinstall, so upgrading the SDK means redoing the patch
- Measured at start, getNode calls went from 96 to 7; idle and with a channel open, to 0
… node stops answering - Every resend read the node's URLs from the chain (getNode, 43-83% of the measured RPC calls); the SDK's own cache map now keeps them for its cache maxAge - A resend that gets no answer or a 5xx from the node drops its entry, so a moved node is read again; 4xx answers and aborts keep it - Applied with patch-package on postinstall, so @streamr/sdk is pinned to 103.3.1 while the patch exists; the patch stays LF so a Windows checkout applies it exactly as CI does Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.