#polkadot #collation #blockchain #substrate

polkadot-node-collation-generation

Collator-side subsystem that handles incoming candidate submissions from the parachain

20 major breaking releases

22.0.0 Apr 4, 2025
21.0.0 Jan 29, 2025
20.0.0 Jan 14, 2025
18.0.0 Oct 1, 2024
0.0.0 Nov 21, 2022

#159 in #polkadot

Download history 935/week @ 2024-12-26 1003/week @ 2025-01-02 1358/week @ 2025-01-09 1122/week @ 2025-01-16 1090/week @ 2025-01-23 1171/week @ 2025-01-30 1344/week @ 2025-02-06 1163/week @ 2025-02-13 1099/week @ 2025-02-20 1229/week @ 2025-02-27 979/week @ 2025-03-06 1572/week @ 2025-03-13 1410/week @ 2025-03-20 1318/week @ 2025-03-27 1142/week @ 2025-04-03 1035/week @ 2025-04-10

5,162 downloads per month
Used in 5 crates (2 directly)

GPL-3.0-only

1MB
17K SLoC

The collation generation subsystem is the interface between polkadot and the collators.

Protocol

On every ActiveLeavesUpdate:

  • If there is no collation generation config, ignore.
  • Otherwise, for each activated head in the update:
    • Determine if the para is scheduled on any core by fetching the availability_cores Runtime API.
    • Use the Runtime API subsystem to fetch the full validation data.
    • Invoke the collator, and use its outputs to produce a CandidateReceipt, signed with the configuration's key.
    • Dispatch a CollatorProtocolMessage::DistributeCollation(receipt, pov).

Dependencies

~95–130MB
~2.5M SLoC