Skip to content

Commit

Permalink
Problem: different maxGasWanted config leads hash mismatch (#560)
Browse files Browse the repository at this point in the history
this bug was introduced in 773438f
  • Loading branch information
mmsqe authored and yihuang committed Nov 18, 2024
1 parent fd71fe2 commit 1dfe237
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (ante) [#493](https://github.com/crypto-org-chain/ethermint/pull/493) Align gasWanted for process proposal mode, [#500](https://github.com/crypto-org-chain/ethermint/pull/500) Check for overflow before adding gasLimit to gasWanted.
* (ante) [#506](https://github.com/crypto-org-chain/ethermint/pull/506) Disable MsgCreatePermanentLockedAccount and MsgCreatePeriodicVestingAccount messages.
* (ante) [#513](https://github.com/crypto-org-chain/ethermint/pull/513) Avoid unnecessary GetAccount and MakeSigner in ante handlers.
* (ante) [#560](https://github.com/crypto-org-chain/ethermint/pull/560) Check gasWanted only in checkTx mode.

### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion app/ante/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func CheckEthGasConsume(

// We can't trust the tx gas limit, because we'll refund the unused gas.
gasLimit := msgEthTx.GetGas()
if maxGasWanted != 0 {
if ctx.IsCheckTx() && maxGasWanted != 0 {
gasLimit = min(gasLimit, maxGasWanted)
}
if gasWanted > math.MaxInt64-gasLimit {
Expand Down

0 comments on commit 1dfe237

Please sign in to comment.