go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

core: effectiveTip = `GasPrice - BaseFee` instead of `GasFeeCap - BaseFee`

Open zhiqiangxu opened this issue 7 months ago • 0 comments

In buyGas, GasPrice is used to conduct the gas cost.

However when computing effectiveTip, GasFeeCap is used instead.

In theory, GasFeeCap >= GasPrice, so it may happen that the tip fee is larger than it should be.

This PR tries to reduce such confusion by computing effectiveTip by GasPrice - BaseFee instead of GasFeeCap - BaseFee.

Note that for all tx types, GasFeeCap == GasPrice always holds, so there's no problem for tx. But it's still better to make it consistent .

zhiqiangxu avatar May 06 '25 16:05 zhiqiangxu