Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

txpool: gasLimit calculation does not match sealing engine gasLimit #1032

Closed
jangko opened this issue Apr 3, 2022 · 1 comment
Closed

txpool: gasLimit calculation does not match sealing engine gasLimit #1032

jangko opened this issue Apr 3, 2022 · 1 comment
Labels
txpool tx pool related issue

Comments

@jangko
Copy link
Contributor

jangko commented Apr 3, 2022

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

@jangko
Copy link
Contributor Author

jangko commented Apr 11, 2022

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.

@jangko jangko added the txpool tx pool related issue label Aug 19, 2022
@jangko jangko closed this as completed in 112a6f7 Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
txpool tx pool related issue
Projects
None yet
Development

No branches or pull requests

1 participant