#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

#11 in #candidate

Download history 434/week @ 2024-08-26 451/week @ 2024-09-02 661/week @ 2024-09-09 616/week @ 2024-09-16 868/week @ 2024-09-23 1094/week @ 2024-09-30 713/week @ 2024-10-07 777/week @ 2024-10-14 896/week @ 2024-10-21 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

5,296 downloads per month
Used in 5 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

~99–140MB
~2.5M SLoC