#collation #subsystem #generation #polkadot #candidate #validation #receipt

polkadot-node-collation-generation

Collator-side subsystem that handles incoming candidate submissions from the parachain. (polkadot v1.10.0)

11 major breaking releases

new 11.0.0 Apr 10, 2024
10.0.0 Mar 19, 2024
9.0.0 Feb 27, 2024
8.0.0 Feb 13, 2024
0.0.0 Nov 21, 2022

#49 in Magic Beans

Download history 8/week @ 2023-12-22 103/week @ 2023-12-29 181/week @ 2024-01-05 126/week @ 2024-01-12 160/week @ 2024-01-19 128/week @ 2024-01-26 213/week @ 2024-02-02 349/week @ 2024-02-09 388/week @ 2024-02-16 892/week @ 2024-02-23 626/week @ 2024-03-01 368/week @ 2024-03-08 744/week @ 2024-03-15 890/week @ 2024-03-22 944/week @ 2024-03-29 696/week @ 2024-04-05

3,333 downloads per month
Used in 10 crates (2 directly)

GPL-3.0-only

68KB
1.5K 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

~74–115MB
~2M SLoC