Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excessive RPC clients created on connect & page load #103

Closed
dgabriele opened this issue Jul 1, 2023 · 2 comments
Closed

Excessive RPC clients created on connect & page load #103

dgabriele opened this issue Jul 1, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@dgabriele
Copy link

dgabriele commented Jul 1, 2023

Describe the bug

Whenever you connect a wallet (e.g. via Keplr), Graz is clearly creating an unnecessary number of RPC clients internally, probably via CosmWasmClient.connect. If you look at network activity in the browser, you'll notice at least 4 concurrent requests to the RPC provider, targeting its "status" endpoint, which is what the CosmWasmClient.connect method automatically does each time it is called. This is not good. Depending on the RPC provider, this can trigger an HTTP 429 rate limit error. Instead, you guys really ought to manage a singleton client and make use of the batch RPC client available in cosmjs.

...

To Reproduce

Steps to reproduce the behavior:

  1. Open dev console in browser.
  2. Navigate to your demo app.
  3. Open "Network Activity" tab
  4. Connect wallet via Keplr.
  5. Notice the exessive XHR requests sent to the RPC's "status" method.

Expected behavior

There should be only one request to the "status" method globally.

A clear and concise description of what you expected to happen.

...

Screenshots

image

@dgabriele dgabriele added the bug Something isn't working label Jul 1, 2023
@codingki
Copy link
Member

codingki commented Jul 3, 2023

@dgabriele Yes we are aware of this, it will be solved in 0.1.x version. Read more #102

@dgabriele
Copy link
Author

Thanks! Sorry if I came across a bit curt. Been having a frustrating couple weeks. Head's exploding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants