#subsystem #collation #generation #polkadot #candidate

polkadot-node-collation-generation

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

17 major breaking releases

18.0.0 Oct 1, 2024
17.0.0 Jul 19, 2024
15.0.0 Jul 13, 2024
14.0.0 Jun 24, 2024
0.0.0 Nov 21, 2022

#13 in #candidate

Download history 389/week @ 2024-07-25 393/week @ 2024-08-01 510/week @ 2024-08-08 664/week @ 2024-08-15 603/week @ 2024-08-22 368/week @ 2024-08-29 579/week @ 2024-09-05 658/week @ 2024-09-12 778/week @ 2024-09-19 1161/week @ 2024-09-26 710/week @ 2024-10-03 731/week @ 2024-10-10 844/week @ 2024-10-17 755/week @ 2024-10-24 1008/week @ 2024-10-31 713/week @ 2024-11-07

3,426 downloads per month
Used in 6 crates (2 directly)

GPL-3.0-only

71KB
1.5K SLoC

Release

Polkadot SDK stable2409


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

~97–140MB
~2.5M SLoC