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 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
Copy link
Contributor Author

lexnv commented Jan 30, 2026

/cmd prdoc --audience node_dev --bump patch

Copy link
Contributor

@alexggh alexggh left a 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 ?

@bkchr bkchr added this pull request to the merge queue Jan 30, 2026
Merged via the queue into master with commit a9c09b0 Jan 30, 2026
241 of 243 checks passed
@bkchr bkchr deleted the lexnv/update-ids branch January 30, 2026 18:32
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.

4 participants