#consensus-algorithm #chain #parachain #relay #block #collator #relay-chain

cumulus-client-consensus-relay-chain

The relay-chain provided consensus algorithm

17 breaking releases

new 0.20.0 Jan 14, 2025
0.18.0 Oct 1, 2024
0.17.0 Jul 19, 2024
0.10.0 Mar 19, 2024
0.0.0 Nov 14, 2022

#659 in Magic Beans

Download history 160/week @ 2024-09-28 34/week @ 2024-10-05 65/week @ 2024-10-12 95/week @ 2024-10-19 6/week @ 2024-10-26 118/week @ 2024-11-02 30/week @ 2024-11-09 84/week @ 2024-11-16 81/week @ 2024-11-23 79/week @ 2024-11-30 124/week @ 2024-12-07 114/week @ 2024-12-14 39/week @ 2024-12-21 35/week @ 2024-12-28 64/week @ 2025-01-04 185/week @ 2025-01-11

341 downloads per month
Used in 5 crates (4 directly)

GPL-3.0-or-later…

19KB
280 lines

Release

Polkadot SDK Stable 2412


lib.rs:

The relay-chain provided consensus algorithm for parachains.

This is the simplest consensus algorithm you can use when developing a parachain. It is a permission-less consensus algorithm that doesn't require any staking or similar to join as a collator. In this algorithm the consensus is provided by the relay-chain. This works in the following way.

  1. Each node that sees itself as a collator is free to build a parachain candidate.

  2. This parachain candidate is send to the parachain validators that are part of the relay chain.

  3. The parachain validators validate at most X different parachain candidates, where X is the total number of parachain validators.

  4. The parachain candidate that is backed by the most validators is chosen by the relay-chain block producer to be added as backed candidate on chain.

  5. After the parachain candidate got backed and included, all collators start at 1.

Dependencies

~96–135MB
~2.5M SLoC