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

polkadot-node-collation-generation

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

19 major breaking releases

21.0.0 Jan 29, 2025
20.0.0 Jan 14, 2025
18.0.0 Oct 1, 2024
17.0.0 Jul 19, 2024
0.0.0 Nov 21, 2022

#11 in #incoming

Download history 811/week @ 2024-10-28 981/week @ 2024-11-04 770/week @ 2024-11-11 1423/week @ 2024-11-18 1111/week @ 2024-11-25 1086/week @ 2024-12-02 1592/week @ 2024-12-09 1535/week @ 2024-12-16 911/week @ 2024-12-23 918/week @ 2024-12-30 1140/week @ 2025-01-06 1342/week @ 2025-01-13 1126/week @ 2025-01-20 1098/week @ 2025-01-27 1216/week @ 2025-02-03 1264/week @ 2025-02-10

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

GPL-3.0-only

66KB
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