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

Expose explicitSignerData for simulation method and reduce rpc node requests #1606

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

DavideSegullo
Copy link
Contributor

@DavideSegullo DavideSegullo commented Sep 6, 2024

At the moment when we want to perform a simulation, using the simulate method exposed in the SigningCosmWasmClient and SigningCosmWasmClient classes, it is not possible to specify the sequence, but a request is made each time to get it.

However, this in practical use results in sending multiple requests to the RPC nodes, for example when we go to use the signAndBroadcast method at the moment three requests are made to the nodes:

  1. getAccount (fetched by the simulation method)
  2. getAccount (fetched by the sign method)
  3. getStatus

So we make the same request twice in a row to get the account details, specifically sequence and accountNumber.

The goal of this PR is to remove this redundancy and reduce the number of requests made to nodes in the chain, also for anyone who build libraries based on cosmjs it's a good way to control this kind of node requests.

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