Evaluate use of Tx simulate to determine the fees #930
Labels
I: logic
Internal: related to the relaying logic
O: new-feature
Objective: cause to add a new feature or support
Milestone
Crate
relayer
Summary
Big Tx-es (e.g. including 30 msgs which is the default maximum) are sometimes rejected with
out of gas
error.Problem Definition
We currently use the
gas
andfee_amount
in the config file when sending a Tx. The Tx is sometimes rejected without of gas
error. Current workaround is to increase the value in the config file.Instead we should evaluate the gas/ fee parameters at the moment we send the Tx.
Proposal
@andynog made this analysis earlier:
The REST API has a
/cosmos/tx/v1beta1/simulate
endpoint that you can submit a tx and it returns the gas used, you can craft a 'fake' transaction e.g. MsgSend but it does enforce a few validation (address needs to exist on chain, account sequence number) and it will return something like:and this just simulates and doesn't execute the transaction. Anyways, this is probably the best way found so far to find how much gas a tx will use.
Acceptance Criteria
For Admin Use
The text was updated successfully, but these errors were encountered: