core/txpool/legacypool: move queue out of main txpool#32270
Merged
cskiraly merged 9 commits intoethereum:masterfrom Oct 13, 2025
Merged
core/txpool/legacypool: move queue out of main txpool#32270cskiraly merged 9 commits intoethereum:masterfrom
cskiraly merged 9 commits intoethereum:masterfrom
Conversation
Contributor
|
@MariusVanDerWijden this looks like a clean change, I think we can make this a PR and merge. |
Contributor
|
Actually, I think |
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
cskiraly
previously approved these changes
Oct 2, 2025
Contributor
|
Testing this I've bumped into the following error: Holding back on merging until I clarify if it is related or not. |
promoteExecutable already removes the txs from the queue. We just need to remove them from the lookup. Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Contributor
|
@MariusVanDerWijden the error was due to using |
cskiraly
reviewed
Oct 6, 2025
Comment on lines
1516
to
1519
|
|
||
| addresses = addresses[:len(addresses)-1] | ||
|
|
||
| // Drop all transactions if they are less than the overflow | ||
| if size := uint64(list.Len()); size <= drop { | ||
| for _, tx := range list.Flatten() { | ||
| pool.removeTx(tx.Hash(), true, true) | ||
| } | ||
| drop -= size | ||
| queuedRateLimitMeter.Mark(int64(size)) | ||
| continue | ||
| } | ||
| // Otherwise drop only last few transactions | ||
| txs := list.Flatten() | ||
| for i := len(txs) - 1; i >= 0 && drop > 0; i-- { | ||
| pool.removeTx(txs[i].Hash(), true, true) | ||
| drop-- | ||
| queuedRateLimitMeter.Mark(1) | ||
| } | ||
| for _, hash := range removed { | ||
| pool.removeTx(hash, true, false) | ||
| } |
Contributor
There was a problem hiding this comment.
Why is this removeTx instead of pool.all.Remove, and why is it with unreserve=false ?
Contributor
There was a problem hiding this comment.
added patch to use pool.all.Remove, and unreserve as needed.
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Contributor
|
Running this branch I still see something around reservation off. I will make another pass on it (after syncing my node). |
Release was called twice when promoteExecutables was called with already released addresses. Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
cskiraly
approved these changes
Oct 13, 2025
cskiraly
pushed a commit
that referenced
this pull request
Oct 14, 2025
This pr addresses a few issues brought by the #32270 - Add updates to pricedList after dropping transactions. - Remove redundant deletions in queue.evictList, since pool.removeTx(hash, true, true) already performs the removal. - Prevent duplicate addresses during promotion when Reset is not nil.
atkinsonholly
pushed a commit
to atkinsonholly/ephemery-geth
that referenced
this pull request
Nov 24, 2025
This PR move the queue out of the main transaction pool. For now there should be no functional changes. I see this as a first step to refactor the legacypool and make the queue a fully separate concept from the main pending pool. --------- Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com> Co-authored-by: Csaba Kiraly <csaba.kiraly@gmail.com>
atkinsonholly
pushed a commit
to atkinsonholly/ephemery-geth
that referenced
this pull request
Nov 24, 2025
This pr addresses a few issues brought by the ethereum#32270 - Add updates to pricedList after dropping transactions. - Remove redundant deletions in queue.evictList, since pool.removeTx(hash, true, true) already performs the removal. - Prevent duplicate addresses during promotion when Reset is not nil.
prestoalvarez
pushed a commit
to prestoalvarez/go-ethereum
that referenced
this pull request
Nov 27, 2025
This PR move the queue out of the main transaction pool. For now there should be no functional changes. I see this as a first step to refactor the legacypool and make the queue a fully separate concept from the main pending pool. --------- Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com> Co-authored-by: Csaba Kiraly <csaba.kiraly@gmail.com>
prestoalvarez
pushed a commit
to prestoalvarez/go-ethereum
that referenced
this pull request
Nov 27, 2025
This pr addresses a few issues brought by the ethereum#32270 - Add updates to pricedList after dropping transactions. - Remove redundant deletions in queue.evictList, since pool.removeTx(hash, true, true) already performs the removal. - Prevent duplicate addresses during promotion when Reset is not nil.
atkinsonholly
pushed a commit
to atkinsonholly/ephemery-geth
that referenced
this pull request
Dec 1, 2025
This PR move the queue out of the main transaction pool. For now there should be no functional changes. I see this as a first step to refactor the legacypool and make the queue a fully separate concept from the main pending pool. --------- Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com> Co-authored-by: Csaba Kiraly <csaba.kiraly@gmail.com>
atkinsonholly
pushed a commit
to atkinsonholly/ephemery-geth
that referenced
this pull request
Dec 1, 2025
This pr addresses a few issues brought by the ethereum#32270 - Add updates to pricedList after dropping transactions. - Remove redundant deletions in queue.evictList, since pool.removeTx(hash, true, true) already performs the removal. - Prevent duplicate addresses during promotion when Reset is not nil.
This file contains hidden or 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
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.
This PR move the queue out of the main transaction pool.
For now there should be no functional changes.
I see this as a first step to refactor the legacypool and make the queue a fully separate concept from the main pending pool.