forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 277
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): only try demoting txns from accounts that were active #1050
Open
omerfirmak
wants to merge
4
commits into
develop
Choose a base branch
from
omerfirmak/txpool-reorg
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
omerfirmak
force-pushed
the
omerfirmak/txpool-reorg
branch
from
September 19, 2024 14:38
b57d606
to
b33eceb
Compare
jonastheis
previously approved these changes
Sep 20, 2024
Thegaram
reviewed
Sep 20, 2024
txpool demotes pending txns only if their nonce is now lower than the nonce in the latest state or the account no longer has enough funds to cover the costs. Unless the account in question was active since the last txpool reorg, there is no way that it's nonce changed or balance decreased.
omerfirmak
force-pushed
the
omerfirmak/txpool-reorg
branch
from
September 23, 2024 05:43
b33eceb
to
3112cc1
Compare
omerfirmak
commented
Sep 23, 2024
@@ -892,10 +889,6 @@ func (w *worker) commit() (common.Hash, error) { | |||
} | |||
} | |||
|
|||
// A new block event will trigger a reorg in the txpool, pause reorgs to defer this until we fetch txns for next block. | |||
// We may end up trying to process txns that we already included in the previous block, but they will all fail the nonce check | |||
w.eth.TxPool().PauseReorgs() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing as I don't think we will be needing this hack after this
colinlyguo
reviewed
Sep 23, 2024
colinlyguo
approved these changes
Sep 23, 2024
colinlyguo
reviewed
Sep 23, 2024
colinlyguo
previously approved these changes
Sep 23, 2024
georgehao
reviewed
Sep 23, 2024
georgehao
previously approved these changes
Sep 23, 2024
omerfirmak
dismissed stale reviews from georgehao and colinlyguo
via
September 24, 2024 07:29
5a750da
colinlyguo
approved these changes
Sep 24, 2024
georgehao
approved these changes
Sep 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
txpool demotes pending txns only if their nonce is now lower than the nonce in the latest state or the account no longer has enough funds to cover the costs. Unless the account in question was active since the last txpool reorg, there is no way that it's nonce changed or balance decreased.