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

Fix base fee calculation for pre-london fork #774

Merged
merged 5 commits into from
Aug 20, 2024

Conversation

sieniven
Copy link

@sieniven sieniven commented Jul 12, 2024

Summary

  • More context on the issue: Base fee calculation error on pre-london fork #773
  • Adds a pre-london fork height check before internally calling CalcBaseFee
  • Resolves the issue where transactions below initial base fee protocol parameters will not get rejected from the txpool, but get stuck forever in baseFee subpool

Copy link

cla-bot bot commented Jul 12, 2024

We require contributors/corporates @sieniven to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

@revitteth
Copy link
Collaborator

Block gas limit tests failing.

Copy link

cla-bot bot commented Jul 16, 2024

We require contributors/corporates @sieniven to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

Copy link

cla-bot bot commented Jul 16, 2024

We require contributors/corporates @sieniven to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

Copy link

cla-bot bot commented Jul 16, 2024

We require contributors/corporates @sieniven to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

@sieniven
Copy link
Author

@revitteth Thanks for the review. Fixed the failing block gas limits test.

Copy link
Collaborator

@mandrigin mandrigin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won’t that allow txs with 0 gas fees to be sent to the network?

@sieniven
Copy link
Author

@mandrigin as discussed, this PR should not let that happen. As the chain is running on pre-london fork anyway and since the design of the txpool is designed for post-london fork, the correct behavior will be for all txs to be promoted to the pending pool from the baseFee pool. However, txs with low gas prices of below initial base fee are able to enter the pool but get stuck in the baseFee pool forever. This bug on the txpool to add a minimum price limit check is resolved in #803.

The correct fixes will be to fork guard the base fee calculation function, and together with the fixes on #803, we should see the desired behavior in the pool while safeguarding against gasless txs.

@mandrigin mandrigin marked this pull request as draft August 20, 2024 09:24
@mandrigin mandrigin marked this pull request as ready for review August 20, 2024 09:25
@mandrigin mandrigin enabled auto-merge (squash) August 20, 2024 09:25
@mandrigin mandrigin merged commit 7bf6281 into 0xPolygonHermez:zkevm Aug 20, 2024
4 checks passed
Stefan-Ethernal pushed a commit that referenced this pull request Sep 20, 2024
* Fix base fee calculation for pre-london fork

* Fix EIP1559 tests

* Fix fork height check
kstoykov pushed a commit that referenced this pull request Sep 25, 2024
* Fix base fee calculation for pre-london fork

* Fix EIP1559 tests

* Fix fork height check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants