Skip to content

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.

Copy link

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much needed fix, tysm 🙏

@angelorc
Copy link

angelorc commented May 2, 2025

Is there a chance we’ll see this merged? 😄

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.

3 participants