-
Notifications
You must be signed in to change notification settings - Fork 696
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
fatxpool
: size limits implemented
#6262
Merged
Merged
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
If all views immediately dropped transactions, it is also dropped from the mempool.
michalkucharczyk
added
R0-silent
Changes should not be mentioned in any release notes
T0-node
This PR/Issue is related to the topic “node”.
labels
Oct 29, 2024
skunert
reviewed
Oct 29, 2024
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.
I like the removal of the initial_views
, I think the scenario was relatively niche 👍
substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs
Outdated
Show resolved
Hide resolved
substrate/client/transaction-pool/src/fork_aware_txpool/dropped_watcher.rs
Show resolved
Hide resolved
Co-authored-by: Sebastian Kunert <[email protected]>
skunert
approved these changes
Oct 29, 2024
bkchr
approved these changes
Nov 7, 2024
substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs
Outdated
Show resolved
Hide resolved
substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Bastian Köcher <[email protected]>
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 adds size-limits to the fork-aware transaction pool.
Review Notes
Existing
TrackedMap
is used in internal mempool to track the size of extrinsics:polkadot-sdk/substrate/client/transaction-pool/src/graph/tracked_map.rs
Lines 33 to 41 in 58fd5ae
In this PR, I also removed the logic that kept transactions in the
tx_mem_pool
if they were immediately dropped by the views. Initially, I implemented this as an improvement: if there was available space in the mempool and all views dropped the transaction upon submission, the transaction would still be retained in the mempool.However, upon further consideration, I decided to remove this functionality to reduce unnecessary complexity. Now, when all views drop a transaction during submission, it is automatically rejected, with the
submit/submit_and_watch
call returningImmediatelyDropped
.Closes: #5476