You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have just noticed that all Tendermint/Comet clients make an additional call to /status when they are being created by connect method. This is very unfortunate, especially when the client is being created and destroyed very often.
Is it really necessary to make this call? Because from the comment, it looks like the author of this code was not even sure what he was doing. Just because of some failing CI job, all applications around the world using cosmjs library make double calls to RPC nodes.
It looks like this code was added there three years ago whenTendermint34Client class was first implemented. Nobody has ever changed it and it was just copied over to new classes (Tendermint37Client and Comet38Client).
The text was updated successfully, but these errors were encountered:
It's a mystery why it's needed by every time I tried to remove it, the CI tests start failing. The way this was designed is more optimized for longer living tendermint clients.
If that code is removed, does it break the client itself or is it just about CI tests failing?
If the client doesn't work without making this initial call, what about using a HEAD request or some kind of low-level network call that wouldn't count towards rate limits?
If it breaks the CI tests, I would suggest to simply run that code conditionally only in CI.
I have just noticed that all Tendermint/Comet clients make an additional call to
/status
when they are being created byconnect
method. This is very unfortunate, especially when the client is being created and destroyed very often.Is it really necessary to make this call? Because from the comment, it looks like the author of this code was not even sure what he was doing. Just because of some failing CI job, all applications around the world using
cosmjs
library make double calls to RPC nodes.I refer to the following code:
It looks like this code was added there three years ago when
Tendermint34Client
class was first implemented. Nobody has ever changed it and it was just copied over to new classes (Tendermint37Client
andComet38Client
).The text was updated successfully, but these errors were encountered: