#collation #subsystem #generation #polkadot #candidate #incoming #handles

polkadot-node-collation-generation

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

18 major breaking releases

new 20.0.0 Jan 14, 2025
18.0.0 Oct 1, 2024
17.0.0 Jul 19, 2024
15.0.0 Jul 13, 2024
0.0.0 Nov 21, 2022

#601 in Magic Beans

Download history 1130/week @ 2024-09-28 680/week @ 2024-10-05 776/week @ 2024-10-12 926/week @ 2024-10-19 761/week @ 2024-10-26 1012/week @ 2024-11-02 707/week @ 2024-11-09 1344/week @ 2024-11-16 1173/week @ 2024-11-23 1103/week @ 2024-11-30 1471/week @ 2024-12-07 1586/week @ 2024-12-14 888/week @ 2024-12-21 978/week @ 2024-12-28 1088/week @ 2025-01-04 1334/week @ 2025-01-11

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

GPL-3.0-only

46KB
1K SLoC

Release

Polkadot SDK Stable 2412


lib.rs:

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

~93–130MB
~2.5M SLoC