Skip to content

Commit f22e05f

Browse files
Update from github-actions[bot] running command 'prdoc --audience node_dev --bump patch'
1 parent af6befa commit f22e05f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

prdoc/pr_10891.prdoc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
title: 'collator-protocol: Re-advertise collations when peer authority IDs are updated'
2+
doc:
3+
- audience: Node Dev
4+
description: |-
5+
The collator protocol contained a race-condition which could manifest as "Collation wasn't advertised".
6+
7+
A given peer ("A") can connect before the new authority keys are received via `UpdatedAuthorityIds` (nk -- new key).
8+
9+
- T0: peer A connects`PeerConnected`
10+
- T1: peer A sends its current view `PeerViewChange`
11+
- Peer A wants the block N
12+
- T2: `validator_group.should_advertise_to`: checks peer A for key nK (the new key)
13+
- We don't have this key stored and therefore return `ShouldAdvertiseTo::NotAuthority`
14+
- T3: `UpdatedAuthorityIds` arrives with (peer A, [nK])
15+
16+
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".
17+
18+
To close the gap, the `UpdatedAuthorityIds` events will trigger a re-advertisement of collations
19+
- note: if the advertisement was already sent, the logic does not resend it (achieved in should_advertise_to).
20+
21+
Part of the stabilization of:
22+
- https://github.com/paritytech/polkadot-sdk/issues/10425
23+
crates:
24+
- name: polkadot-collator-protocol
25+
bump: patch

0 commit comments

Comments
 (0)