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

cumulus-client-consensus-relay-chain

The relay-chain provided consensus algorithm

16 breaking releases

0.18.0 Oct 1, 2024
0.17.0 Jul 19, 2024
0.15.0 Jul 13, 2024
0.10.0 Mar 19, 2024
0.0.0 Nov 14, 2022

#6 in #collator

Download history 2/week @ 2024-09-09 4/week @ 2024-09-16 8/week @ 2024-09-23 171/week @ 2024-09-30 27/week @ 2024-10-07 62/week @ 2024-10-14 96/week @ 2024-10-21 3/week @ 2024-10-28 125/week @ 2024-11-04 31/week @ 2024-11-11 101/week @ 2024-11-18 77/week @ 2024-11-25 70/week @ 2024-12-02 144/week @ 2024-12-09

396 downloads per month
Used in 3 crates

GPL-3.0-or-later…

18KB
280 lines

Release

Polkadot SDK stable2409


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

~99–140MB
~2.5M SLoC