Skip to content

PSM dapp, wallet poll RPC nodes rapidly #6870

@dckc

Description

@dckc

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

  1. Open the wallet and/or dapp-psm
  2. Connect your keplr wallet
  3. check the browser console and/or network inspector
  4. 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

#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

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions