Skip to content

Cache the SDK's storage node registry read - #110

Merged
Ocnrb merged 1 commit into
mainfrom
fix/sdk-node-cache
Oct 6, 2026
Merged

Ocnrb merged 1 commit into
mainfrom
fix/sdk-node-cache

Conversation

@Ocnrb

@Ocnrb Ocnrb commented Oct 6, 2026

Copy link
Copy Markdown
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>
@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
p2p-public-chat Ready Ready Preview Oct 6, 2026 11:59am UTC
pombo Ready Ready Preview Oct 6, 2026 11:59am UTC

@Ocnrb
Ocnrb merged commit a1271a7 into main Oct 6, 2026
3 checks passed

This branch was successfully deployed

2 active deployments
Preview – p2p-public-chat — a2a27fb4 Deployed Oct 6, 2026 by vercel[bot]
Preview – pombo — a2a27fb4 Deployed Oct 6, 2026 by vercel[bot]
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.

1 participant