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

#5 in #collation

Download history 1135/week @ 2025-02-15 1140/week @ 2025-02-22 1122/week @ 2025-03-01 1192/week @ 2025-03-08 1502/week @ 2025-03-15 1436/week @ 2025-03-22 1194/week @ 2025-03-29 1183/week @ 2025-04-05 1108/week @ 2025-04-12 1320/week @ 2025-04-19 2066/week @ 2025-04-26 1397/week @ 2025-05-03 1200/week @ 2025-05-10 1031/week @ 2025-05-17 863/week @ 2025-05-24 869/week @ 2025-05-31

4,138 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

~97–135MB
~2.5M SLoC