-
Notifications
You must be signed in to change notification settings - Fork 688
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
Collation fetching fairness #4880
Open
tdimitrov
wants to merge
106
commits into
master
Choose a base branch
from
tsv-collator-proto-fairness
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.
Open
Changes from all commits
Commits
Show all changes
106 commits
Select commit
Hold shift + click to select a range
f4738dc
Collation fetching fairness
tdimitrov c7074da
Comments
tdimitrov 73eee87
Fix tests and add some logs
tdimitrov fa321ce
Fix per para limit calculation in `is_collations_limit_reached`
tdimitrov 96392a5
Fix default `TestState` initialization: claim queue len should be equ…
tdimitrov 0f28aa8
clippy
tdimitrov e5ea548
Update `is_collations_limit_reached` - remove seconded limit
tdimitrov 9abc898
Fix pending fetches and more tests
tdimitrov c07890b
Remove unnecessary clone
tdimitrov e50440e
Comments
tdimitrov 42b05c7
Better var names
tdimitrov 2f5a466
Fix `pick_a_collation_to_fetch` and add more tests
tdimitrov ff96ef9
Fix test: `collation_fetching_respects_claim_queue`
tdimitrov e837689
Add `collation_fetching_fallback_works` test + comments
tdimitrov 91cdd13
More tests
tdimitrov 9f2d59b
Fix collation limit fallback
tdimitrov a10c86d
Separate `claim_queue_support` from `ProspectiveParachainsMode`
tdimitrov b39858a
Fix comments and add logs
tdimitrov b30f340
Update test: `collation_fetching_prefer_entries_earlier_in_claim_queue`
tdimitrov c0f18b9
Fix `pick_a_collation_to_fetch` and more tests
tdimitrov 703ed6d
Merge branch 'master' into tsv-collator-proto-fairness
tdimitrov fba7ca6
Fix `pick_a_collation_to_fetch` - iter 1
tdimitrov d4f4ce2
Fix `pick_a_collation_to_fetch` - iter 2
tdimitrov 5f52712
Remove a redundant runtime version check
tdimitrov 6c73e24
formatting and comments
tdimitrov 752f3cc
pr doc
tdimitrov f0069f1
add license
tdimitrov 6b9f0b3
clippy
tdimitrov 5f6dcdd
Merge branch 'master' into tsv-collator-proto-fairness
tdimitrov b8c1b85
Update prdoc/pr_4880.prdoc
tdimitrov f26362f
Limit collations based on seconded count instead of number of fetches
tdimitrov d6857fc
Undo rename: is_seconded_limit_reached
tdimitrov cde28cd
fix collation tests
tdimitrov 4c3db2a
`collations_fetching_respects_seconded_limit` test
tdimitrov b2bbdfe
nits
tdimitrov e220cb4
Merge branch 'master' into tsv-collator-proto-fairness
tdimitrov 01d121e
Remove duplicated dependency after merge
tdimitrov 7b3c002
Remove `ProspectiveParachainsMode` from collator-protocol, validator-…
tdimitrov 5dffdde
Fix compilation errors in collation tests
tdimitrov 1c1744b
`is_seconded_limit_reached` uses the whole view
tdimitrov aaccab1
Fix `is_seconded_limit_reached` check
tdimitrov b1df2e3
Trace logs useful for debugging tests
tdimitrov ce3a95e
Handle unconnected candidates
tdimitrov fe3c09d
Rework pre-prospective parachains tests to work with claim queue
tdimitrov b9ab579
Fix `collation_fetches_without_claimqueue`
tdimitrov fe623bc
Test - `collation_fetching_prefer_entries_earlier_in_claim_queue`
tdimitrov d216689
Remove collations test file - all tests are moved in prospective_para…
tdimitrov ea99c7a
fixup - collation_fetching_prefer_entries_earlier_in_claim_queue
tdimitrov ee155f5
New test - `collation_fetching_considers_advertisements_from_the_whol…
tdimitrov 55b7902
Merge branch 'master' into tsv-collator-proto-fairness
tdimitrov 515a784
Update PRdoc and comments
tdimitrov 4ef6919
Combine `seconded_per_para` and `claims_per_para` from collations in …
tdimitrov bd7174f
No need to handle missing claim queue anymore
tdimitrov df6165e
Remove dead code and fix some comments
tdimitrov 4c5c271
Remove `is_seconded_limit_reached` and use the code directly due to t…
tdimitrov b0e4627
Fix comments
tdimitrov d1cf41d
`pending_for_para` -> `is_pending_for_para`
tdimitrov df3a215
Fix `0011-async-backing-6-seconds-rate.toml` - set `lookahead` to 3 o…
tdimitrov b70807b
Set `lookahead` in polkadot/zombienet_tests/elastic_scaling/0002-elas…
tdimitrov f047036
paras_now -> assigned_paras
tdimitrov 94e4fc3
Remove a duplicated parameter in `update_view`
tdimitrov 386488b
Remove an outdated comment
tdimitrov ff312c9
Fix `seconded_and_pending_for_para_in_view`
tdimitrov 88d0307
`claim_queue_state` becomes `unfulfilled_claim_queue_entries` - the b…
tdimitrov af78352
For consistency use `chain_ids` only from `test_state`
tdimitrov d636091
Limit the number of advertisements accepted by each peer for spam pro…
tdimitrov 2bb82eb
Zombienet test
tdimitrov c782058
Rearrange imports
tdimitrov 903f7f4
Newline and outdated comment
tdimitrov cefbce8
Undo `lookahead = 3` in zombienet tests
tdimitrov cb69361
Consider what's scheduled on the core when determining assignments
tdimitrov 1142a90
Merge branch 'master' into tsv-collator-proto-fairness
tdimitrov 4438349
Fix a clippy warning
tdimitrov e82c386
Update PRdoc
tdimitrov 4b2d4c5
Apply suggestions from code review
tdimitrov 1c91371
".git/.scripts/commands/fmt/fmt.sh"
be34132
Code review feedback
tdimitrov 5c7b2ac
Fix a typo in prdoc
tdimitrov 62c6473
`seconded_and_pending_for_para_in_view` looks up to the len of the cl…
tdimitrov 9e3f62d
Merge branch 'master' into tsv-collator-proto-fairness
tdimitrov a4bc21f
rerun CI
tdimitrov 6c103df
Fix zombienet test
tdimitrov 15e3a74
Merge branch 'master' into tsv-collator-proto-fairness
tdimitrov d6b35ca
Relax expected block counts for each para
tdimitrov 586b56b
Bump lookahead and decrease timeout
tdimitrov a04d480
Fix ZN pipeline - try 1
tdimitrov 13d5d15
Fix ZN pipeline - try 2
tdimitrov 86870d0
Fix ZN pipeline - try 3
tdimitrov 7b822af
Fix ZN pipeline - try 4
tdimitrov 558c82e
Merge branch 'master' into tsv-collator-proto-fairness
tdimitrov 06c0fd0
Merge branch 'master' into tsv-collator-proto-fairness
tdimitrov ade7f9b
Rename ZN test
tdimitrov 8ba2a80
Merge branch 'master' into tsv-collator-proto-fairness
tdimitrov ab70567
Handle merge conflicts
tdimitrov d24fdc1
When counting occupied slots from the claim queue consider relay pare…
tdimitrov f55390e
Add a test
tdimitrov a2093ee
Small style fixes in tests
tdimitrov ded6fb5
Fix a todo
tdimitrov cda9330
Fix `paths_to_relay_parent`
tdimitrov 505eb24
Additional test for `paths_to_relay_parent`
tdimitrov 94f573a
Simplifications
tdimitrov fa82404
Merge branch 'master' into tsv-collator-proto-fairness
tdimitrov 55e7fb2
Resolve merge conflicts
tdimitrov e27ddd4
Fix todos
tdimitrov a10c0c1
Comment
tdimitrov ee11c6a
Remove unneeded log line
tdimitrov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Originally and before async backing once we've reached Seconded status we knew we are done here. Right now we can only be satisfied with collations once we reach the seconding limit but I see that we do not have a corresponding status here.
When we reach the seconding limit and no more ocllations are expected what will be the status here?
Or is it nonsensical to even refer to a CollationStatus when we reach the limit? (Dont think so)
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.
We could do it. The lifetime right now is Waiting -> Fetching -> WaitingOnValidation and back to Waiting. We can have an additional
Satisfied
or something similar which indicates that we can't accept any more collations at this relay parent.Then on each seconded collation we can call
seconded_and_pending_for_para_in_view
and if we have reached the claim queue limit we can set the state toSatisfied
and know that nothing can be accepted at this relay parent.The benefits are that once the relay parent 'is complete' (all claim queue entries are filled) we won't need to run any checks in order to reject an incoming collation.
The drawbacks are that on each seconded collation we'll have to run the same function. So unless a collator is spamming us the benefit is minimal. And since we are limiting the number of advertisements per collator we can't get spammed too much.
We can explore this further but it better be a follow up task.