diff --git a/node/impl/full/gas.go b/node/impl/full/gas.go index 43e04deea..b07d658e2 100644 --- a/node/impl/full/gas.go +++ b/node/impl/full/gas.go @@ -388,6 +388,10 @@ func (m *GasModule) GasEstimateMessageGas(ctx context.Context, msg *types.Messag return nil, err } msg.GasLimit = int64(float64(gasLimit) * m.Mpool.GetConfig().GasLimitOverestimation) + // Gas overestimation can cause us to exceed the block gas limit, cap it. + if msg.GasLimit > build.BlockGasLimit { + msg.GasLimit = build.BlockGasLimit + } } if msg.GasPremium == types.EmptyInt || types.BigCmp(msg.GasPremium, types.NewInt(0)) == 0 {