ethermint
ethermint copied to clipboard
Refund unused gas in sdk 0.46's posthandlers
Proposal: Refund unused gas in sdk 0.46's posthandlers
Now we upgraded to SDK 0.46 which supports posthandlers, and apply feemarket to native tx, we can do gas refund in posthandlers in a unified way.
Current behavior: [What currently happens]
Desired behavior: [What you would like to happen]
Use case: [Why is this important (helps with prioritizing requests)]
Requests may be closed if we're not actively planning to work on them.
@yihuang are you planning to work on this or should we assign someone from our team?
@yihuang are you planning to work on this or should we assign someone from our team?
no, we are not working on it, do you plan to refund native tx gas just like eth tx?
just Ethereum for now
Ok I checked the current implementation of PostHandlers and the only way to accomplish the gas refund would be to use the ctx.GasMeter instead of relying on the transaction results (they are not passed to the post handler).
https://github.com/cosmos/cosmos-sdk/blob/81028cf93d0c0436110f350f0134f3c13a0ab7fd/baseapp/baseapp.go#L695-L710
I think we should deprioritize this until we've finished the module readiness (#1258) checklist and we have more extensive tests for gas metering behavior.