execute fee check logic in deliverTX #2383
Labels
state-machine-breaking
State machine breaking changes (impacts consensus).
status: waiting-triage
This issue/PR has not yet been triaged by the team.
type: feature-request
New feature or request improvement
Summary
Present gaia fee antehandler checks the fees only in checkTx. The fee antehandler checks:
if msgs are bypass msgs and the bypass msgs gas usage is within bypass gas limit.
if the paid fee is in the denom required.
if paidFee amount >= required Fee amount (required fee takes the higher fee between mininum-gas-price in app.toml and global fee).
The above fee checks can prevent malicious tx submitters, but it cannot prevent malicious validator.
The solution is to do fee check logic in deliverTx as well, this requires determinism of the fee check result, therefore, the fee check will also run in deliverTx.
In order to make deliverTx deterministic, the deliverTX checks the fee against global fee, while checkTX is checking fees against combinedFees (global fee and local min-gas-price in app.toml).
This means:
Please note, the above mentioned refactor is Consensus breaking !!!
Problem Definition
Proposal
eeCoinsNonZeroDenom.IsAnyGTE(nonZeroCoinGlobalFeeReq)
.zeroCoinFeesDenomReq
, due tozeroCoinFeesDenomReq
can be only from zero coins in globalfee.For Admin Use
The text was updated successfully, but these errors were encountered: