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

feat(txpool): use GasFeeCapIntCmp to check min fee #901

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

Thegaram
Copy link

@Thegaram Thegaram commented Jul 12, 2024

1. Purpose or design rationale of this PR

Assuming we set L2GETH_MIN_GAS_PRICE to 48700001 (min base fee + 1), we can now accept transactions with 1 wei tip.

Previously, L2GETH_MIN_GAS_PRICE = 48700001 would have set the minimum tip, but L2GETH_MIN_GAS_PRICE = 1 would have allowed unexecutable legacy txs with 1 wei gas price to enter the txpool.

A motivating example with L2GETH_MIN_GAS_PRICE = 48700001 and baseFee = 48700000:

effectiveGasTipCapCmp gasTipCapCmp gasFeeCapCmp
legacy gasPrice = 1 reject reject reject
legacy gasPrice=48700001 reject (1) accept accept
1559 gasFeeCap = 48700001, gasTipCap = 1 reject reject (2) accept

The previous PR (#825) fixed (1), while this PR aims to fix (2).

2. PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • feat: A new feature

3. Deployment tag versioning

Has the version in params/version.go been updated?

  • This PR doesn't involve a new deployment, git tag, docker image tag, and it doesn't affect traces
  • Yes

4. Breaking change label

Does this PR have the breaking-change label?

  • This PR is not a breaking change
  • Yes

colinlyguo
colinlyguo previously approved these changes Jul 12, 2024
jonastheis
jonastheis previously approved these changes Jul 12, 2024
@Thegaram Thegaram dismissed stale reviews from jonastheis and colinlyguo via e724b44 July 12, 2024 08:53
@Thegaram Thegaram requested a review from zimpha July 12, 2024 09:00
@Thegaram Thegaram merged commit 0b5146b into develop Jul 12, 2024
8 checks passed
@Thegaram Thegaram deleted the feat-txpool-compare-gas-fee-cap branch July 12, 2024 09:56
@0xmountaintop 0xmountaintop mentioned this pull request Aug 5, 2024
13 tasks
lwedge99 pushed a commit to sentioxyz/scroll-geth that referenced this pull request Aug 27, 2024
* feat(txpool): use GasFeeCapIntCmp to check min fee

* fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants