Skip to content

chore: deprecate BroadcastModeBlock  #2721

@tbruyelle

Description

@tbruyelle

Is your feature request related to a problem or issue you encountered? Please describe.
BroadcastModeBlock is planned for deprecation in the SDK (see cosmos/cosmos-sdk#12167)

Describe the solution you'd like
This mode is currently used in :

  • cosmosclient
  • cosmoscmd
  • the template tests of map, single and list.

We should switch to BroadcastModeSync. This requires a little bit of work since with BroadcastModeSync you don't receive the result of the transaction, but only its hash. When you need to read the result of the transaction, you must wait for the next block until you can request it.

For cosmosclient, this can be done in 2 ways :

  • adapt existing BroadcastTx so it waits for the TX to be included in a block, and then returns the parsed response.
  • change the return of BroadcastTx so it returns only the tx hash, then the user can call WaitForNextBlock and then request the tx. Or we could also introduce a new method WaitForTx(hash), that calls WaitForNextBlock internally and requests the tx.

Describe alternatives you've considered
We can delay that but it will add additional work when we'll upgrade to the version of the SDK where BroadcastModeBlock will be removed.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions