core: fixed stale comment in txlist #23825
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes a comment in the txlist.
Why do we need to bump both FeeCap and Tip?
We aim to have all transactions in the txpool executable, otherwise an attacker could flood the txpool with invalid transactions or keep their transactions in the txpool indefinitely, taking up space for real users.
If we allowed users to only bump the tip, they could spam the transaction pool with transactions that have a low feecap and bump their tip up every now and then to keep them in the txpools.
If we allowed users to only bumb the feecap, we could reach a similar situation. Right now the miners only accept transactions with tip > 1Gwei by default. This means if someone added a transaction with a tip < 1 gwei, and keeps bumping the feecap, the transaction would remain in the txpool indefinitely.
An attacker introducing a transaction with 1/1 Gwei could bump it twice as much if we allowed for both feecap and tip to be bumped individually, compared to now
closes #23311