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): only try demoting txns from accounts that were active #1050

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

omerfirmak
Copy link

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.

jonastheis
jonastheis previously approved these changes 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.
@@ -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()
Copy link
Author

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

core/tx_pool.go Outdated Show resolved Hide resolved
colinlyguo
colinlyguo previously approved these changes Sep 23, 2024
georgehao
georgehao previously approved these changes Sep 23, 2024
core/tx_pool.go Show resolved Hide resolved
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.

5 participants