From cb8af11aa5afbd586a6ae5dffbc20ff81d85d258 Mon Sep 17 00:00:00 2001 From: ottovlotto <142217647+ottovlotto@users.noreply.github.com> Date: Tue, 7 Jan 2025 22:51:54 +1300 Subject: [PATCH 1/3] Update pos-consensus.md Updating 2x hyperlinks in "Block Production - BABE" section to link to the new "Randomness" page in the Developer Docs (vs the previous links to the equivalent Polkadot Wiki pages). --- .../architecture/polkadot-chain/pos-consensus.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md b/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md index 0c79fa7ad..382fc8326 100644 --- a/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md +++ b/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md @@ -38,7 +38,7 @@ Key features of BABE include: - **Epochs and slots** - BABE operates in phases called epochs, each of which is divided into slots (around 6 seconds per slot). Validators are assigned slots at the beginning of each epoch based on stake and randomness -- **Randomized block production** - validators enter a lottery to determine which will produce a block in a specific slot. This randomness is sourced from the relay chain's [randomness cycle](https://wiki.polkadot.network/docs/learn-cryptography#randomness){target=\_blank} +- **Randomized block production** - validators enter a lottery to determine which will produce a block in a specific slot. This randomness is sourced from the relay chain's [randomness cycle](https://docs.polkadot.com/polkadot-protocol/basics/randomness/){target=\_blank} - **Multiple block producers per slot** - in some cases, more than one validator might win the lottery for the same slot, resulting in multiple blocks being produced. These blocks are broadcasted, and the network's fork choice rule helps decide which chain to follow @@ -59,7 +59,7 @@ There are two lottery outcomes for any given slot that initiate additional proce - **Multiple validators in a slot** - due to the randomness, multiple validators can be selected to produce a block for the same slot. When this happens, each validator produces a block and broadcasts it to the network resulting in a race condition. The network's topology and latency then determine which block reaches the majority of nodes first. BABE allows both chains to continue building until the finalization process resolves which one becomes canonical. The [Fork Choice](#fork-choice) rule is then used to decide which chain the network should follow -- **No validators in a slot** - on occasions when no validator is selected by the lottery, a [secondary validator selection algorithm](https://spec.polkadot.network/sect-block-production#defn-babe-secondary-slots){target=\_blank} steps in. This backup ensures that a block is still produced, preventing skipped slots. However, if the primary block produced by a verifiable random function [(VRF)-selected](https://wiki.polkadot.network/docs/learn-cryptography#vrf){target=\_blank} validator exists for that slot, the secondary block will be ignored. As a result, every slot will have either a primary or a secondary block +- **No validators in a slot** - on occasions when no validator is selected by the lottery, a [secondary validator selection algorithm](https://spec.polkadot.network/sect-block-production#defn-babe-secondary-slots){target=\_blank} steps in. This backup ensures that a block is still produced, preventing skipped slots. However, if the primary block produced by a verifiable random function [(VRF)-selected](https://docs.polkadot.com/polkadot-protocol/basics/randomness/#vrf){target=\_blank} validator exists for that slot, the secondary block will be ignored. As a result, every slot will have either a primary or a secondary block This design ensures continuous block production, even in cases of multiple competing validators or an absence of selected validators. @@ -120,4 +120,4 @@ Key features of BEEFY include: - [GRANDPA Rust implementation](https://github.com/paritytech/finality-grandpa){target=\_blank} - [GRANDPA Pallet](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/grandpa/src/lib.rs){target=\_blank} - [Block Production and Finalization in Polkadot](https://www.crowdcast.io/e/polkadot-block-production){target=\_blank} - Bill Laboon explains how BABE and GRANDPA work together to produce and finalize blocks on Kusama -- [Block Production and Finalization in Polkadot: Understanding the BABE and GRANDPA Protocols](https://www.youtube.com/watch?v=1CuTSluL7v4&t=4s){target=\_blank} - Bill Laboon's MIT Cryptoeconomic Systems 2020 academic talk describing Polkadot's hybrid consensus model in-depth \ No newline at end of file +- [Block Production and Finalization in Polkadot: Understanding the BABE and GRANDPA Protocols](https://www.youtube.com/watch?v=1CuTSluL7v4&t=4s){target=\_blank} - Bill Laboon's MIT Cryptoeconomic Systems 2020 academic talk describing Polkadot's hybrid consensus model in-depth From f0bcb6ad89a9b69880145dd6b6bb63bad2e1a16a Mon Sep 17 00:00:00 2001 From: ottovlotto <142217647+ottovlotto@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:11:33 +1300 Subject: [PATCH 2/3] Update polkadot-protocol/architecture/polkadot-chain/pos-consensus.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Nicolás Hussein <80422357+nhussein11@users.noreply.github.com> --- polkadot-protocol/architecture/polkadot-chain/pos-consensus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md b/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md index 382fc8326..ef7b7dbba 100644 --- a/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md +++ b/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md @@ -38,7 +38,7 @@ Key features of BABE include: - **Epochs and slots** - BABE operates in phases called epochs, each of which is divided into slots (around 6 seconds per slot). Validators are assigned slots at the beginning of each epoch based on stake and randomness -- **Randomized block production** - validators enter a lottery to determine which will produce a block in a specific slot. This randomness is sourced from the relay chain's [randomness cycle](https://docs.polkadot.com/polkadot-protocol/basics/randomness/){target=\_blank} +- **Randomized block production** - validators enter a lottery to determine which will produce a block in a specific slot. This randomness is sourced from the relay chain's [randomness cycle](/polkadot-protocol/basics/randomness/){target=\_blank} - **Multiple block producers per slot** - in some cases, more than one validator might win the lottery for the same slot, resulting in multiple blocks being produced. These blocks are broadcasted, and the network's fork choice rule helps decide which chain to follow From 7aa74e1182f6227d3fb6a70c0bd27730d2d733ee Mon Sep 17 00:00:00 2001 From: ottovlotto <142217647+ottovlotto@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:12:21 +1300 Subject: [PATCH 3/3] Update polkadot-protocol/architecture/polkadot-chain/pos-consensus.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Nicolás Hussein <80422357+nhussein11@users.noreply.github.com> --- polkadot-protocol/architecture/polkadot-chain/pos-consensus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md b/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md index ef7b7dbba..b00bdbb0b 100644 --- a/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md +++ b/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md @@ -59,7 +59,7 @@ There are two lottery outcomes for any given slot that initiate additional proce - **Multiple validators in a slot** - due to the randomness, multiple validators can be selected to produce a block for the same slot. When this happens, each validator produces a block and broadcasts it to the network resulting in a race condition. The network's topology and latency then determine which block reaches the majority of nodes first. BABE allows both chains to continue building until the finalization process resolves which one becomes canonical. The [Fork Choice](#fork-choice) rule is then used to decide which chain the network should follow -- **No validators in a slot** - on occasions when no validator is selected by the lottery, a [secondary validator selection algorithm](https://spec.polkadot.network/sect-block-production#defn-babe-secondary-slots){target=\_blank} steps in. This backup ensures that a block is still produced, preventing skipped slots. However, if the primary block produced by a verifiable random function [(VRF)-selected](https://docs.polkadot.com/polkadot-protocol/basics/randomness/#vrf){target=\_blank} validator exists for that slot, the secondary block will be ignored. As a result, every slot will have either a primary or a secondary block +- **No validators in a slot** - on occasions when no validator is selected by the lottery, a [secondary validator selection algorithm](https://spec.polkadot.network/sect-block-production#defn-babe-secondary-slots){target=\_blank} steps in. This backup ensures that a block is still produced, preventing skipped slots. However, if the primary block produced by a verifiable random function [(VRF)-selected](/polkadot-protocol/basics/randomness/#vrf){target=\_blank} validator exists for that slot, the secondary block will be ignored. As a result, every slot will have either a primary or a secondary block This design ensures continuous block production, even in cases of multiple competing validators or an absence of selected validators.