atomone-hub / govgen-proposals

GovGen-dedicated repo to discuss upcoming governance proposals
5 stars 5 forks source link

doc(submit-tx-securely): default gas is too low #10

Closed tbruyelle closed 5 months ago

tbruyelle commented 5 months ago

In Section 3 of the document, the command to create the transaction doesn't specify the gas limit, so the default value is used (200,000), but after some tests it seems like the default value is not enough.

govgend tx <MODULE> <TRANSACTION> [FLAGS]
   --from <ADDRESS> \
   --chain-id govgen-1 \
   --fees 5000ugovgen \
   --generate-only \
   --output-document tx.unsigned.json

To submit a tx on govgen-devnet-4, I had to specify a gas limit to 1,200,000 or else the tx is rejected due to out of gas in location. This is probably because the tx I submitted was a big proposal, so it required more gas to be stored. Given that the guide is aimed mainly to submit proposals, we should specify the gas limit, to reflect what is required for text proposals.

NOTE: Curiously, it doesn't seem possible to use the --gas auto and --generate-only flags at the same time, which would have fixed this issue more elegantly than by specifying a hard coded value.

EDIT: Actually it is possible to use the --gas auto and --generate-only flags at the same time, but it requires also the --sequence flag. So I think the best way to fix this issue is to add --gas auto and --sequence <id> to the underlying command.