cosmos / cosmos/evm

Bad `Maxtx-gas-want` implementation that may lead to proposal rejection of normal nodes.

Open
#593 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
164
Forks
213
Avg merge
3d 58m
Merged PRs (30d)
12

Description

https://github.com/cosmos/evm/blob/67950ad934f3393cf6a507dc1b5ad2aa46edaa60/ante/evm/08_gas_consume.go#L20
# introduce
In the following code, maxtxgaswant is used to limit the upper limit of messages. However, in the actual implementation, it did not realize its function. On the contrary, due to the difference of the cumulative results of gaswant during checktx and processhandler, it may cause the normal node to send a proposal that was rejected by processhandler because it contained sub-message transactions beyond maxtxgaswant.

# Risk scenario
Specifically, for those nodes whose maxtxgaswant is not 0, malicious users can send a message that the tx contains a msg which gas greater than maxtxgaswant, so that the gas accumulation of the transaction in the checktx phase is smaller and enters the transaction pool. And during the processhandler, the proposal may be rejected because of the normal calculation of gas and the higher gaswant than before.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.