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

polkadot-node-collation-generation

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

16 major breaking releases

new 17.0.0 Jul 19, 2024
15.0.0 Jul 13, 2024
14.0.0 Jun 24, 2024
13.0.0 May 24, 2024
0.0.0 Nov 21, 2022

#296 in Magic Beans

Download history 538/week @ 2024-04-03 767/week @ 2024-04-10 560/week @ 2024-04-17 469/week @ 2024-04-24 683/week @ 2024-05-01 456/week @ 2024-05-08 837/week @ 2024-05-15 777/week @ 2024-05-22 838/week @ 2024-05-29 1015/week @ 2024-06-05 760/week @ 2024-06-12 640/week @ 2024-06-19 905/week @ 2024-06-26 317/week @ 2024-07-03 523/week @ 2024-07-10 436/week @ 2024-07-17

2,334 downloads per month
Used in 7 crates (2 directly)

GPL-3.0-only

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

~93–135MB
~2.5M SLoC