-
Notifications
You must be signed in to change notification settings - Fork 708
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
: handling limits and priorities improvements
#6405
Open
michalkucharczyk
wants to merge
36
commits into
master
Choose a base branch
from
mku-fatxpool-priorities
base: master
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.
+1,415
−379
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
michalkucharczyk
force-pushed
the
mku-fatxpool-priorities
branch
from
November 12, 2024 14:31
d0d8ddc
to
7b96ca3
Compare
michalkucharczyk
changed the title
Nov 14, 2024
fatxpool
: improvements in handling of prioritiesfatxpool
:limits and priorities improvements
michalkucharczyk
changed the title
Nov 14, 2024
fatxpool
:limits and priorities improvementsfatxpool
: limits and priorities improvements
michalkucharczyk
changed the title
Nov 14, 2024
fatxpool
: limits and priorities improvementsfatxpool
: handling limits and priorities improvements
/cmd prdoc --bump major --audience node_dev |
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
Nov 14, 2024
iulianbarbu
reviewed
Nov 20, 2024
substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs
Outdated
Show resolved
Hide resolved
substrate/client/transaction-pool/src/fork_aware_txpool/dropped_watcher.rs
Outdated
Show resolved
Hide resolved
substrate/client/transaction-pool/src/fork_aware_txpool/dropped_watcher.rs
Outdated
Show resolved
Hide resolved
substrate/client/transaction-pool/src/fork_aware_txpool/dropped_watcher.rs
Outdated
Show resolved
Hide resolved
substrate/client/transaction-pool/src/fork_aware_txpool/dropped_watcher.rs
Outdated
Show resolved
Hide resolved
substrate/client/transaction-pool/src/fork_aware_txpool/dropped_watcher.rs
Show resolved
Hide resolved
Co-authored-by: Iulian Barbu <[email protected]>
michalkucharczyk
requested review from
iulianbarbu and
a team
and removed request for
iulianbarbu
November 20, 2024 12:54
iulianbarbu
approved these changes
Nov 20, 2024
lexnv
reviewed
Nov 21, 2024
substrate/client/transaction-pool/src/single_state_txpool/single_state_txpool.rs
Outdated
Show resolved
Hide resolved
lexnv
reviewed
Nov 21, 2024
substrate/client/transaction-pool/src/fork_aware_txpool/dropped_watcher.rs
Outdated
Show resolved
Hide resolved
lexnv
reviewed
Nov 21, 2024
substrate/client/transaction-pool/src/fork_aware_txpool/dropped_watcher.rs
Outdated
Show resolved
Hide resolved
lexnv
reviewed
Nov 21, 2024
substrate/client/transaction-pool/src/fork_aware_txpool/multi_view_listener.rs
Show resolved
Hide resolved
lexnv
reviewed
Nov 21, 2024
lexnv
reviewed
Nov 21, 2024
lexnv
approved these changes
Nov 21, 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.
LGTM! Not entirely familiar with the code, some minor needs that could all be ignored /followed up later if need be 🙏
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 provides a number of improvements around handling limits and priorities in the fork-aware transaction pool.
Notes to reviewers.
Following are the notable changes:
Better support for
Usurped
transactionsWhen any view reports an
Usurped
transaction (replaced by other with higher priority) it is removed from all the views (also inactive). Removal is implemented by simply submitting usurper transaction to all the views. It is also ensured that usurped tx will not sneak into theview_store
in newly created view (this is whyViewStore::pending_txs_replacements
was added).TimedTransactionSource
introduced:Every view now has an information when the transaction entered the pool. Enforce limits (now only for future txs) uses this timestamp to find worst transactions. Having common timestamp ensures coherent assessment of the transaction's importance across different views. This also could later be used to select which ready transaction shall be dropped.
DroppedWatcher
: improved logic for future transactionsFor future transaction - if the last referencing view is removed, the transaction will be dropped from the pool. This prevents future unincluded and un-promoted transactions from staying in the pool for long time.
And some minor changes:
update_view_with_mempool
(code duplication + minor bug fix).graph::BasePool
: handling priorities for future transaction improved (previously transaction with lower prio was reported as failed),graph::listener
: dedicatedlimit_enforced
/usurped
/dropped
calls added,related to: #5809