-
Notifications
You must be signed in to change notification settings - Fork 251
Description
Describe the bug
When using our wallet or PSM dapp, the browser makes a dozen or so requests per second to an RPC server.
@arirubinstein noted a cosmos community operational norm of <= 2 requests / second per client on RPC servers.
To Reproduce
- Open the wallet and/or dapp-psm
- Connect your keplr wallet
- check the browser console and/or network inspector
- see many more than 2 requests per second to RPC node as we poll every ~400ms at N vstorage keys etc.
This is from memory. IOU a more direct observation, including log exerpt.
Expected behavior
- rate limiting to <= 2 requests per second to any 1 RPC server
I gather from @michaelfig that there are plans for @agoric/casting
to meanwhile support
- batching batch polling queries in Casting cosmjs follower #7155
- fail-over among multiple RPC nodes
#6647 will reduce HTTP requests by half.
Platform Environment
mainnet / prod; any browser / os
IOU one example of all these details
- what OS are you using? what version of Node.js?
- is there anything special/unusual about your platform?
- what version of the Agoric-SDK are you using? (run
git describe --tags --always
)
Additional context
A community member trying out dapp-psm asked why it was making so many requests so rapidly, noting several requests per second in their browser console. (I thought they opened an issue, so this might be a dup.)
@samsiegart and @turadg and I have noted this in a couple recent PRs (back-links to follow).
Screenshots
IOU log excerpt