genutil and globalfee init order #2489
Labels
status: waiting-triage
This issue/PR has not yet been triaged by the team.
type: bug
Issues that need priority attention -- something isn't working
Summary of Bug
In genutils module, there is
DeliverGenTxs
which is called ininitGenesis
,DeliverGenTxs
callsDeliverTx
which will call the antehandler involved in deliverTx check.initGenesis -> DeliverGenTxs -> deliverTx -> antehandler
In the next gaia release, global fee will does fee check also in DeliverTx. Which means in DeliverGenTxs call stack, the globalfee antehandler will be called, global fee module should be inited this moment.
Solution 1:
init globalfee before genutil module in
initBlock
.Disadvantage: if the chain is inited with non-zero globalfee, calling gentx need to be paid, which might cause trouble.
Solution 2:
when getting globalfee Params for fee checks, we check only get the params if they exist, otherwise, return empty params.
this means
gentx
will go through fee check with min-gas-price 0uatom, bypass-msg=[], and BypassMinFeeMsgTypes = 0see this fix.
the fix is to make sure to check if key exists before
get
it to avoid panicDisadvantage: works, but this put gentx at a different fee check condition, which is empty fees.
Solution 3:
Put gentx as bypass-msg which means it is free.
concerns: will the gentx exceed bypass allowed max gas ? bypass can be always proposed to be changed.
Solution 4:
only does globalfee fee antehandler in checkTx.
Version
Steps to Reproduce
For Admin Use
The text was updated successfully, but these errors were encountered: