-
Notifications
You must be signed in to change notification settings - Fork 1.1k
collator-protocol: Re-advertise collations when peer authority IDs are updated #10891
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
Conversation
…e updated Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
Signed-off-by: Alexandru Vasile <[email protected]>
polkadot/node/network/collator-protocol/src/collator_side/mod.rs
Outdated
Show resolved
Hide resolved
|
/cmd prdoc --audience node_dev --bump patch |
…e_dev --bump patch'
…relay_parents Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
alexggh
left a comment
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.
Fix looks correct, but UpdatedAuthorityIds is not something we should receive that often, because the AuthorityIds usually change only around session boundary when you get new peers that you might not discover yet.
How often did this happen ?
The collator protocol contained a race-condition which could manifest as "Collation wasn't advertised".
A given peer ("A") can connect before the new authority keys are received via
UpdatedAuthorityIds(nk -- new key).PeerConnectedPeerViewChangevalidator_group.should_advertise_to: checks peer A for key nK (the new key)ShouldAdvertiseTo::NotAuthorityUpdatedAuthorityIdsarrives with (peer A, [nK])At this point, we have the collation, peer A wants to collation, we know peer A is an authority but we never send the collation back. Then, the collation will expire with "Collation wasn't advertised".
To close the gap, the
UpdatedAuthorityIdsevents will trigger a re-advertisement of collationsPart of the stabilization of: