[evm] feat/security: Consume the full gas limit of a failed signing.Tx in the case it has multiple EthereumTx messages #2178
Labels
S-triage
Status: This issue is waiting on initial triage. More Info: https://tinyurl.com/25uty9w5
Context
Note
Non-blocking for Nibiru V2 on mainnet
Originally posted by @Unique-Divine in #4
Original Ticket
Target
nibiru/x/evm/keeper/msg_server.go
Lines 64 to 67 in 13c71a7
Severity:
Description:
In
EthereumTx(..)
, which handles theMsgEthereumTx
message, if a Cosmos tx contains a batch of multipleMsgEthereumTx
EVM messages, and one of it errors inApplyEvmMsg(..)
(i.e.,err != nil
), the full gas limit (e.g.ctx.GasMeter().GasLimit()
) is not consumed. This also differs from Ethereum, where all gas is consumed in case of an unexpected error.Recommendation:
Consume all of the remaining and unused Cosmos tx's gas limit.
The text was updated successfully, but these errors were encountered: