Skip to content

Latest commit

 

History

History
444 lines (307 loc) · 30.5 KB

sect-block-production.md

File metadata and controls

444 lines (307 loc) · 30.5 KB
title
-chap-num- Block Production

import Pseudocode from '@site/src/components/Pseudocode'; import blockProductionLottery from '!!raw-loader!@site/src/algorithms/blockProductionLottery.tex'; import slotTime from '!!raw-loader!@site/src/algorithms/slotTime.tex'; import medianAlgorithm from '!!raw-loader!@site/src/algorithms/medianAlgorithm.tex'; import invokeBlockAuthoring from '!!raw-loader!@site/src/algorithms/invokeBlockAuthoring.tex'; import verifyAuthorshipRight from '!!raw-loader!@site/src/algorithms/verifyAuthorshipRight.tex'; import verifySlotWinner from '!!raw-loader!@site/src/algorithms/verifySlotWinner.tex'; import buildBlock from '!!raw-loader!@site/src/algorithms/buildBlock.tex';

-sec-num- Introduction {#id-introduction-3}

The Polkadot Host uses BABE protocol for block production. It is designed based on Ouroboros praos . BABE execution happens in sequential non-overlapping phases known as an epoch. Each epoch on its turn is divided into a predefined number of slots. All slots in each epoch are sequentially indexed starting from 0. At the beginning of each epoch, the BABE node needs to run Block-Production-Lottery to find out in which slots it should produce a block and gossip to the other block producers. In turn, the block producer node should keep a copy of the block tree and grow it as it receives valid blocks from other block producers. A block producer prunes the tree in parallel by eliminating branches that do not include the most recent finalized blocks (Definition -def-num-ref-).

-sec-num- Block Producer {#id-block-producer}

A block producer, noted by ${\mathcal{{P}}}_{{j}}$, is a node running the Polkadot Host which is authorized to keep a transaction queue and which it gets a turn in producing blocks.

-sec-num- Block Authoring Session Key Pair {#id-block-authoring-session-key-pair}

Block authoring session key pair ${\left({s}{{k}{{j}}^{{s}}},{p}{{k}{{j}}^{{s}}}\right)}$ is an SR25519 key pair which the block producer ${\mathcal{{P}}}_{{j}}$ signs by their account key (Definition -def-num-ref-) and is used to sign the produced block as well as to compute its lottery values in Block-Production-Lottery.

Definition -def-num- Epoch and Slot {#defn-epoch-slot}

::::definition

A block production epoch, formally referred to as ${\mathcal{{E}}}$, is a period with a pre-known starting time and fixed-length during which the set of block producers stays constant. Epochs are indexed sequentially, and we refer to the ${n}^{{{t}{h}}}$ epoch since genesis by ${\mathcal{{E}}}_{{n}}$. Each epoch is divided into equal-length periods known as block production slots, sequentially indexed in each epoch. The index of each slot is called a slot number. The equal length duration of each slot is called the slot duration and indicated by ${\mathcal{{T}}}$. Each slot is awarded to a subset of block producers during which they are allowed to generate a block.

:::info Substrate refers to an epoch as "session" in some places, however, epoch should be the preferred and official name for these periods. | :::

::::

Definition -def-num- Epoch and Slot Duration {#defn-epoch-duration}

:::definition

We refer to the number of slots in epoch ${\mathcal{{E}}}{{n}}$ by ${s}{c}{{n}}$. ${s}{c}{{n}}$ is set to the duration field in the returned data from the call of the Runtime entry BabeApi_configuration (Section -sec-num-ref-) at genesis. For a given block ${B}$, we use the notation **${s}{{B}}$** to refer to the slot during which ${B}$ has been produced. Conversely, for slot ${s}$, ${\mathcal{{B}}}_{{c}}$ is the set of Blocks generated at slot ${s}$.

Definition -def-num-ref- provides an iterator over the blocks produced during a specific epoch.

:::

Definition -def-num- Epoch Subchain {#defn-epoch-subchain}

:::definition

By ${\text{SubChain}{\left({\mathcal{{E}}}{{n}}\right)}}$ for epoch ${\mathcal{{E}}}{{n}}$, we refer to the path graph of ${B}{T}$ containing all the blocks generated during the slots of epoch ${\mathcal{{E}}}_{{n}}$. When there is more than one block generated at a slot, we choose the one which is also on $\text{Longest-Chain}{\left({B}{T}\right)}$.

:::

Definition -def-num- Equivocation {#defn-producer-equivocation}

:::definition

A block producer equivocates if they produce more than one block at the same slot. The proof of equivocation are the given distinct headers that were signed by the validator and which include the slot number.

The Polkadot Host must detect equivocations committed by other validators and submit those to the Runtime as described in Section -sec-num-ref-.

:::

Definition -def-num- BABE Consensus Message {#defn-consensus-message-babe}

:::definition

$\text{CM}_{{b}}$, the consensus message for BABE, is of the following format:

$$ \text{CM}{{b}}={\left\lbrace\begin{matrix}{1}&{\left(\text{Auth}{{C}},{r}\right)}\{2}&{A}_{{i}}\{3}&{D}\end{matrix}\right.} $$

where

1 implies next epoch data: The Runtime issues this message on every first block of an epoch. The supplied authority set Definition -def-num-ref-, ${\text{Auth}_C}$, and randomness Definition -def-num-ref-, ${r}$, are used in the next epoch $\mathcal E_n + 1$.
2 implies on disabled: A 32-bit integer, ${A_i}$, indicating the individual authority in the current authority list that should be immediately disabled until the next authority set changes. This message initial intension was to cause an immediate suspension of all authority functionality with the specified authority.
3 implies next epoch descriptor: These messages are only issued on configuration change and in the first block of an epoch. The supplied configuration data are intended to be used from the next epoch onwards.
  • $D$ is a varying datatype of the following format: $$ D = {1, (c,2_{\text{nd}})} $$ where ${c}$ is the probability that a slot will not be empty Definition -def-num-ref-. It is encoded as a tuple of two unsigned 64-bit integers ${c_{nominator},c_{denominator}}$ which are used to compute the rational ${c = \frac{c_{nominator}}{c_{denominator}}}$.
  • ${2_{\text{nd}}}$ describes what secondary slot Definition -def-num-ref-, if any, is to be used. It is encoded as one-byte varying datatype: $$ s_{\text{2nd}} = \begin{cases} 0 \rightarrow \text{no secondary slot} \ 1 \rightarrow \text{plain secondary slot} \ 2 \rightarrow \text{secondary slot with VRF output} \end{cases} $$

:::

-sec-num- Block Production Lottery {#sect-block-production-lottery}

The babe constant (Definition -def-num-ref-) is initialized at genesis to the value returned by calling BabeApi_configuration (Section -sec-num-ref-). For efficiency reasons, it is generally updated by the Runtime through the next config data consensus message in the digest (Definition -def-num-ref-) of the first block of an epoch for the next epoch.

A block producer aiming to produce a block during ${\mathcal{{E}}}_{{n}}$ should run <algo-block-production-lottery>> to identify the slots it is awarded. These are the slots during which the block producer is allowed to build a block. The ${s}{k}$ is the block producer lottery secret key and ${n}$ is the index of the epoch for whose slots the block producer is running the lottery.

In order to ensure consistent block production, BABE uses secondary slots in case no authority won the (primary) block production lottery. Unlike the lottery, secondary slot assignees are know upfront publically (Definition -def-num-ref-). The Runtime provides information on how or if secondary slots are executed (Section -sec-num-ref-), explained further in Definition -def-num-ref-.

Definition -def-num- BABE Constant {#defn-babe-constant}

:::definition

The BABE constant is the probability that a slot will not be empty and used in the winning threshold calculation (Definition -def-num-ref-). It’s expressed as a rational, ${\left({x},{y}\right)}$, where ${x}$ is the numerator and ${y}$ is the denominator.

:::

Definition -def-num- Winning Threshold {#defn-winning-threshold}

:::definition

The Winning threshold denoted by ${T}{{{\mathcal{{E}}}{{n}}}}$ is the threshold that is used alongside the result of Block-Production-Lottery to decide if a block producer is the winner of a specific slot. ${T}{{{\mathcal{{E}}}{{n}}}}$ is calculated as follows:

$$ {A}{{w}}={\sum{{{n}={1}}}^{{{\left|\text{Auth}{{C}}{\left({B}\right)}\right|}}}}{\left({w}{{A}}\in\text{Auth}{{C}}{\left({B}\right)}{{n}}\right)} $$ $$ {T}{{{\mathcal{{E}}}{{n}}}}:={1}-{\left({1}-{c}\right)}^{{\frac{{w}{{a}}}{{A}{{w}}}}} $$

where ${A}{{w}}$ is the total sum of all authority weights in the authority set (Definition -def-num-ref-) for epoch ${\mathcal{{E}}}{{n}}$, ${w}_{{a}}$ is the weight of the block author and ${c}\in{\left({0},{1}\right)}$ is the BABE constant (Definition -def-num-ref-).

The numbers should be treated as 64-bit rational numbers.

:::

-sec-num- Primary Block Production Lottery {#id-primary-block-production-lottery}

A block producer aiming to produce a block during ${\mathcal{{E}}}_{{n}}$ should run the $\text{Block-Production-Lottery}$ algorithm to identify the slots it is awarded. These are the slots during which the block producer is allowed to build a block. The session secret key, ${s}{k}$, is the block producer lottery secret key and ${n}$ is the index of the epoch for whose slots the block producer is running the lottery.

Algorithm -algo-num- Block Production Lottery {#algo-block-production-lottery}

:::algorithm <Pseudocode content={blockProductionLottery} algID="blockProductionLottery" options={{ "lineNumber": true }} />

where $\text{Epoch-Randomness}$ is defined in (Definition -def-num-ref-), ${s}{c}{{n}}$ is defined in Definition -def-num-ref- , $\text{VRF}$ creates the BABE VRF transcript (Definition -def-num-ref-) and ${e}{{i}}$ is the epoch index, retrieved from the Runtime (Section -sec-num-ref-). ${s}{{k}}$ and ${p}{{k}}$ is the secret key respectively the public key of the authority. For any slot ${s}$ in epoch ${n}$ where ${o}<{T}{{{\mathcal{{E}}}{{n}}}}$ (Definition -def-num-ref-), the block producer is required to produce a block. :::

:::info The secondary slots (Definition -def-num-ref-) are running along side the primary block production lottery and mainly serve as a fallback to in case no authority was selected in the primary lottery. :::

Definition -def-num- Secondary Slots {#defn-babe-secondary-slots}

:::definition

Secondary slots work along side primary slot to ensure consistent block production, as described in Section -sec-num-ref-. The secondary assignee of a block is determined by calculating a specific value, ${i}{{d}}$, which indicates the index in the authority set (Definition -def-num-ref-). The corresponding authority in that set has the right to author a secondary block. This calculation is done for every slot in the epoch, ${s}\in{s}{c}{{n}}$ (Definition -def-num-ref-).

$$ {p}\leftarrow{h}{\left(\text{Enc}{\text{SC}}{\left({r},{s}\right)}\right)} $$ $$ {i}{{d}}\leftarrow{p}\text{mod}{A}_{{l}} $$

where

  • ${r}$ is the Epoch randomness (Definition -def-num-ref-).

  • ${s}$ is the slot number (Definition -def-num-ref-).

  • $\text{Enc}_{\text{SC}}{\left(\ldots\right)}$ encodes its inner value to the corresponding SCALE value.

  • ${h}{\left(\ldots\right)}$ creates a 256-bit Blake2 hash from its inner value.

  • ${A}_{{l}}$ is the lengths of the authority list (Definition -def-num-ref-).

If ${i}_{{d}}$ points to the authority, that authority must claim the secondary slot by creating a BABE VRF transcript (Definition -def-num-ref-). The resulting values ${o}$ and ${p}$ are then used in the Pre-Digest item (Definition -def-num-ref-). In case of secondary slots with plain outputs, respectively the Pre-Digest being of value 2, the transcript respectively the VRF is skipped.

:::

Definition -def-num- BABE Slot VRF transcript {#defn-babe-vrf-transcript}

:::definition

The BABE block production lottery requires a specific transcript structure (Definition -def-num-ref-). That structure is used by both primary slots (Block-Production-Lottery) and secondary slots (Definition -def-num-ref-).

$$ {t}{{1}}\leftarrow\text{Transcript}{\left(\text{'BABE'}\right)} $$ $$ {t}{{2}}\leftarrow\text{append}{\left({t}{{1}},\text{'slot number'},{s}\right)} $$ $$ {t}{{3}}\leftarrow\text{append}{\left({t}{{2}},\text{'current epoch'},{e}{{i}}\right)} $$ $$ {t}{{4}}\leftarrow\text{append}{\left({t}{{3}},\text{'chain randomness'},{r}\right)} $$ $$ {t}{{5}}\leftarrow\text{append}{\left({t}{{4}},\text{'vrf-nm-pk'},{p}{{k}}\right)} $$ $$ {t}{{6}}\leftarrow\text{meta-ad}{\left({t}{{5}},\text{'VRFHash'},\text{False}\right)} $$ $$ {t}{{7}}\leftarrow\text{meta-ad}{\left({t}{{6}},{64}{\text{le}},\text{True}\right)} $$ $$ {h}\leftarrow\text{prf}{\left({t}{{7}},\text{False}\right)} $$ $$ {o}={s}{{k}}\cdot{h} $$ $$ {p}\leftarrow\text{dleq_prove}{\left({t}_{{7}},{h}\right)} $$

The operators are defined in Definition -def-num-ref-, $\text{dleq_prove}$ in Definition -def-num-ref-. The computed outputs, ${o}$ and ${p}$, are included in the block Pre-Digest (Definition -def-num-ref-).

:::

-sec-num- Slot Number Calculation {#sect-slot-number-calculation}

It is imperative for the security of the network that each block producer correctly determines the current slot numbers at a given time by regularly estimating the local clock offset in relation to the network (Definition -def-num-ref-).

:::danger The calculation described in this section is still to be implemented and deployed: For now, each block producer is required to synchronize its local clock using NTP instead. The current slot ${s}$ is then calculated by ${s}={t}{\text{unix}}{\mathcal{{T}}}$ where ${\mathcal{{T}}}$ is defined in Definition -def-num-ref- and ${t}{\text{unix}}$ is defined in Definition -def-num-ref-. That also entails that slot numbers are currently not reset at the beginning of each epoch. :::

Polkadot does this synchronization without relying on any external clock source (e.g. through the or the ). To stay in synchronization, each producer is therefore required to periodically estimate its local clock offset in relation to the rest of the network.

This estimation depends on the two fixed parameters ${k}$ (Definition -def-num-ref-) and ${s}_{{{c}{q}}}$ (Definition -def-num-ref-). These are chosen based on the results of a formal security analysis, currently assuming a ${1}{s}$ clock drift per day and targeting a probability lower than ${0.5}%$ for an adversary to break BABE in 3 years with resistance against a network delay up to $\frac{{1}}{{3}}$ of the slot time and a Babe constant (Definition -def-num-ref-) of ${c}={0.38}$.

All validators are then required to run Median-Algorithm at the beginning of each sync period (Definition -def-num-ref-) to update their synchronization using all block arrival times of the previous period. The algorithm should only be run once all the blocks in this period have been finalized, even if only probabilistically (Definition -def-num-ref-). The target slot to which to synchronize should be the first slot in the new sync period.

Definition -def-num- Slot Offset {#defn-slot-offset}

:::definition

Let ${s}{{i}}$ and ${s}{{j}}$ be two slots belonging to epochs ${\mathcal{{E}}}{{k}}$ and ${\mathcal{{E}}}{{l}}$. By Slot-Offset${\left({s}{{i}},{s}{{j}}\right)}$ we refer to the function whose value is equal to the number of slots between ${s}{{i}}$ and ${s}{{j}}$ (counting ${s}{{j}}$) on the time continuum. As such, we have Slot-Offset${\left({s}{{i}},{s}_{{i}}\right)}={0}$. :::

It is imperative for the security of the network that each block producer correctly determines the current slot numbers at a given time by regularly estimating the local clock offset in relation to the network (Definition -def-num-ref-).

Definition -def-num- Relative Time Synchronization {#defn-relative-synchronization}

:::definition

The relative time synchronization is a tuple of a slot number and a local clock timestamp ${\left({s}{\text{sync}},{t}{\text{sync}}\right)}$ describing the last point at which the slot numbers have been synchronized with the local clock.

:::

Algorithm -algo-num- Slot Time {#algo-slot-time}

:::algorithm <Pseudocode content={slotTime} algID="slotTime" options={{ "lineNumber": true }} />

where ${s}$ is the slot number. :::

Algorithm -algo-num- Median Algorithm {#algo-median-algorithm}

:::algorithm <Pseudocode content={medianAlgorithm} algID="medianAlgorithm" options={{ "lineNumber": true }} />

where

  • ${\mathfrak{{{E}}}}$ is the sync period used for the estimate.

  • ${s}_{\text{sync}}$ is the slot time to estimate.

  • $\text{Slot-Offset}$ is defined in Slot-Time.

  • ${\mathcal{{{T}}}}$ is the slot duration defined in Definition -def-num-ref-.

:::

Definition -def-num- Pruned Best Chain {#defn-prunned-best}

:::definition

The pruned best chain ${C}^{{{r}^{{k}}}}$ is the longest selected chain (Definition -def-num-ref-) with the last ${k}$ Blocks pruned. We chose ${k}={140}$. The last (probabilistic) finalized block describes the last block in this pruned best chain.

:::

Definition -def-num- Chain Quality {#defn-chain-quality}

:::definition

The chain quality ${s}{{{c}{q}}}$ represents the number of slots that are used to estimate the local clock offset. Currently, it is set to ${s}{{{c}{q}}}={3000}$.

The prerequisite for such a calculation is that each producer stores the arrival time of each block (Definition -def-num-ref-) measured by a clock that is otherwise not adjusted by any external protocol.

:::

Definition -def-num- Block Arrival Time {#defn-block-time}

:::definition

The block arrival time of block ${B}$ for node ${j}$ formally represented by ${{T}{{B}}^{{j}}}$ is the local time of node ${j}$ when node ${j}$ has received block ${B}$ for the first time. If the node ${j}$ itself is the producer of ${B}$, ${{T}{{B}}^{{j}}}$ is set equal to the time that the block is produced. The index ${j}$ in ${{T}{{B}}^{{j}}}$ notation may be dropped and B’s arrival time is referred to by ${T}{{B}}$ when there is no ambiguity about the underlying node.

:::

Definition -def-num- Sync Period {#defn-sync-period}

:::definition

A is an interval at which each validator (re-)evaluates its local clock offsets. The first sync period ${\mathfrak{{E}}}{{1}}$ starts just after the genesis block is released. Consequently, each sync period ${\mathfrak{{E}}}{{i}}$ starts after ${\mathfrak{{E}}}{{{i}-{1}}}$. The length of the sync period (Definition -def-num-ref-) is equal to ${s}{{{q}{c}}}$and expressed in the number of slots.

:::

Image -img-num- An exemplary result of Median Algorithm in first sync epoch with ${s}_{\text{cq}}={9}$ and ${k}={1}$. {#img-median-algorithm}

-sec-num- Production Algorithm {#block-production}

Throughout each epoch, each block producer should run Invoke-Block-Authoring to produce blocks during the slots it has been awarded during that epoch. The produced block needs to carry the Pre-Digest (Definition -def-num-ref-) as well as the block signature (Definition -def-num-ref-) as Pre-Runtime and Seal digest items.

Definition -def-num- Pre-Digest {#defn-babe-header}

:::definition

The Pre-Digest, or BABE header, ${P}$, is a varying datatype of the following format:

$$ {P}={\left\lbrace\begin{matrix}{1}&\rightarrow&{\left({a}{\text{id}},{s},{o},{p}\right)}\{2}&\rightarrow&{\left({a}{\text{id}},{s}\right)}\{3}&\rightarrow&{\left({a}_{\text{id}},{s},{o},{p}\right)}\end{matrix}\right.} $$

where

The Pre-Digest must be included as a digest item of Pre-Runtime type in the header digest (Definition -def-num-ref-) ${H}_{{d}}{\left({B}\right)}$. :::

Algorithm -algo-num- Invoke-Block-Authoring {#algo-block-production}

:::algorithm <Pseudocode content={invokeBlockAuthoring} algID="invokeBlockAuthoring" options={{ "lineNumber": true }} />

where $\text{BT}$ is the current block tree, $\text{Block-Production-Lottery}$ is defined in Block-Production-Lottery and $\text{Add-Digest-Item}$ appends a digest item to the end of the header digest ${H}_{{d}}{\left({B}\right)}$ (Definition -def-num-ref-). :::

Definition -def-num- Block Signature {#defn-block-signature}

:::definition

The Block Signature ${S}_{{B}}$ is a signature of the block header hash (Definition -def-num-ref-) and defined as

$$ \text{Sig}{{\text{SR25519},{\text{sk}{{j}}^{{s}}}}}{\left({H}_{{h}}{\left({B}\right)}\right)} $$

${m}$ should be included in ${H}_{{d}}{\left({B}\right)}$ as the Seal digest item (Definition -def-num-ref-) of value:

$$ {\left({t},\text{id}{\left(\text{BABE}\right)},{m}\right)} $$

in which, ${t}={5}$ is the seal digest identifier and $\text{id}{\left(\text{BABE}\right)}$ is the BABE consensus engine unique identifier (Definition -def-num-ref-). The Seal digest item is referred to as the BABE Seal.

:::

-sec-num- Epoch Randomness {#sect-epoch-randomness}

At the beginning of each epoch, ${\mathcal{{E}}}{{n}}$ the host will receive the randomness seed ${\mathcal{{R}}}{{{\mathcal{{E}}}{{{n}+{1}}}}}$ (Definition -def-num-ref-) necessary to participate in the block production lottery in the next epoch ${\mathcal{{E}}}{{{n}+{1}}}$ from the Runtime, through the consensus message (Definition -def-num-ref-) in the digest of the first block.

Definition -def-num- Randomness Seed {#defn-epoch-randomness}

:::definition

For epoch ${\mathcal{{E}}}$, there is a 32-byte ${\mathcal{{R}}}{{{\mathcal{{E}}}}}$ computed based on the previous epochs VRF outputs. For ${\mathcal{{E}}}{{0}}$ and ${\mathcal{{E}}}_{{1}}$, the randomness seed is provided in the genesis state (Section -sec-num-ref-). For any further epochs, the randomness is retrieved from the consensus message (Definition -def-num-ref-).

:::

-sec-num- Verifying Authorship Right {#sect-verifying-authorship}

When a Polkadot node receives a produced block, it needs to verify if the block producer was entitled to produce the block in the given slot by running Verify-Authorship-Right. Verify-Slot-Winner runs as part of the verification process, when a node is importing a block.

Algorithm -algo-num- Verify Authorship Right {#algo-verify-authorship-right}

:::algorithm <Pseudocode content={verifyAuthorshipRight} algID="verifyAuthorshipRight" options={{ "lineNumber": true }} />

where

Algorithm -algo-num- Verify Slot Winner {#algo-verify-slot-winner}

:::algorithm <Pseudocode content={verifySlotWinner} algID="verifySlotWinner" options={{ "lineNumber": true }} />

where

  1. $\text{Epoch-Randomness}$ is defined in Definition -def-num-ref-.

  2. ${H}_{\text{BABE}}{\left({B}\right)}$ is the BABE header defined in Definition -def-num-ref-.

  3. ${\left({o},{p}\right)}$ is the block lottery result for block ${B}$ (Block-Production-Lottery), respectively the VRF output (Definition -def-num-ref-).

  4. $\text{Verify-VRF}$ is described in Section -sec-num-ref-.

  5. ${T}{{{\mathcal{{E}}}{{n}}}}$ is the winning threshold as defined in Definition -def-num-ref-. :::

-sec-num- Block Building Process {#sect-block-building}

The block building process is triggered by Invoke-Block-Authoring of the consensus engine which in turn runs Build-Block.

Algorithm -algo-num- Build Block {#algo-build-block}

:::algorithm <Pseudocode content={buildBlock} algID="buildBlock" options={{ "lineNumber": true }} />

where

  • ${C}_{\text{Best}}$ is the chain head at which the block should be constructed ("parent").

  • ${s}$ is the slot number.

  • $\text{Head}{\left({B}\right)}$ is defined in Definition -def-num-ref-.

  • $\text{Call-Runtime-Entry}$ is defined in Definition -def-num-ref-.

  • $\text{Inherent-Data}$ is defined in Definition -def-num-ref-.

  • $\text{End-Of-Slot}$ indicates the end of the BABE slot as defined Median-Algorithm respectively Definition -def-num-ref-.

  • $\text{Next-Ready-Extrinsic}$ indicates picking an extrinsic from the extrinsics queue (Definition -def-num-ref-).

  • $\text{Block-Is-Full}$ indicates that the maximum block size is being used.

  • $\text{Should-Drop}$ determines based on the result ${R}$ whether the extrinsic should be dropped or remain in the extrinsics queue and scheduled for the next block. The ApplyExtrinsicResult (Definition -def-num-ref-) describes this behavior in more detail.

  • $\text{Drop}$ indicates removing the extrinsic from the extrinsic queue (Definition -def-num-ref-).

  • $\text{Add-Seal}$ adds the seal to the block (<<>>) before sending it to peers. The seal is removed again before submitting it to the Runtime. :::