evmos
evmos copied to clipboard
Question: Can anyone simulate case overflow block gas limit?
Context
Can someone explain to me how 3x transactions with gas limit 36m can be included in a single block like this?
Is the validator altered their Tendermint/CometBFT to bypass the logic check total gas during collect txs from mempool for proposal?
This is the expected behaviour. If the gas used doesn't reach a certain threshold we consume half of the gas limit.
The code that tackle this issue:
// calculate a minimum amount of gas to be charged to sender if GasLimit
// is considerably higher than GasUsed to stay more aligned with Tendermint gas mechanics
// for more info https://github.com/evmos/ethermint/issues/1085
gasLimit := math.LegacyNewDec(int64(msg.Gas()))
minGasMultiplier := k.GetMinGasMultiplier(ctx)
minimumGasUsed := gasLimit.Mul(minGasMultiplier)
if !minimumGasUsed.TruncateInt().IsUint64() {
return nil, errorsmod.Wrapf(types.ErrGasOverflow, "minimumGasUsed(%s) is not a uint64", minimumGasUsed.TruncateInt().String())
}
if msg.Gas() < leftoverGas {
return nil, errorsmod.Wrapf(types.ErrGasOverflow, "message gas limit < leftover gas (%d < %d)", msg.Gas(), leftoverGas)
}
For more info, view this issue
@ramacarlucho I understood and know how it was handled but I was asking about simulate the case. Please reopen the ticket, I still need to know how to simulate the block.
Thanks for reporting this issue @VictorTrustyDev We'll investigate this further
Just to clarify, the issue is that there's this block that consumed more gas than allowed Block max gas is 40M and this block has 54M gas used
Yeah, 3 evm txs each consume half of max gas 18m (of 36m) is already 54m.
This issue is stale because it has been open 45 days with no activity. Remove Status: Stale label or comment or this will be closed in 7 days.