Skip to content

Conversation

@lexnv
Copy link
Contributor

@lexnv lexnv commented Jan 23, 2026

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).

  • T0: peer A connectsPeerConnected
  • T1: peer A sends its current view PeerViewChange
    • Peer A wants the block N
  • T2: validator_group.should_advertise_to: checks peer A for key nK (the new key)
    • We don't have this key stored and therefore return ShouldAdvertiseTo::NotAuthority
  • T3: UpdatedAuthorityIds arrives 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 UpdatedAuthorityIds events will trigger a re-advertisement of collations

  • note: if the advertisement was already sent, the logic does not resend it (achieved in should_advertise_to).

Part of the stabilization of:

lexnv added 2 commits January 23, 2026 12:50
…e updated

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv self-assigned this Jan 23, 2026
@lexnv lexnv added the T0-node This PR/Issue is related to the topic “node”. label Jan 23, 2026
@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/21287736978
Failed job name: fmt

lexnv and others added 2 commits January 23, 2026 13:31
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T0-node This PR/Issue is related to the topic “node”.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants