nimbus-eth1
nimbus-eth1 copied to clipboard
txpool: gasLimit calculation does not match sealing engine gasLimit
pre London gasLimit in sealing engine
computeGasLimit(
parent.gasUsed,
parent.gasLimit,
gasFloor = DEFAULT_GAS_LIMIT,
gasCeil = DEFAULT_GAS_LIMIT)
post London gasLimit in sealing engine
if isLondon(conf, header.blockNumber):
var parentGasLimit = parent.gasLimit
if not isLondon(conf, parent.blockNumber):
# Bump by 2x
parentGasLimit = parent.gasLimit * EIP1559_ELASTICITY_MULTIPLIER
# TODO: desiredLimit can be configured by user, gasCeil
header.gasLimit = calcGasLimit1559(parentGasLimit, desiredLimit = DEFAULT_GAS_LIMIT)
seems one or both of them produce different result compared to txPool gasLimit.
Sealing engine gasLimit pass test using test vector from https://notes.ethereum.org/rmVErCfCRPKGqGkUe89-Kg?both
but txPool gasLimit failed to pass test.
see #1030
in #1047 we already remove over complicated job queue in txpool, perhaps we can simplify txpool further by replacing it with simpler gas limit calculator. current gas limit calculator in txpool also broken.