Skip to content

Commit

Permalink
Edits Parachains' Protocol (#5208)
Browse files Browse the repository at this point in the history
* updated figures

* adjusted text

* added banner async backing

* minor addition

* added Bader's feedback
  • Loading branch information
filippoweb3 authored Sep 21, 2023
1 parent 4c77933 commit 43d9c1d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
Binary file modified docs/assets/parachain-approval-process.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/parachain-inclusion-pipeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/parachain-protocol-summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 22 additions & 12 deletions docs/learn/learn-parachains-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ The parachain protocol is divided into two main phases:
- [**Inclusion Pipeline**](#inclusion-pipeline): Collators send parachain blocks (parablocks) with
PoV to Validators. Validators verify if the parablocks follow the state transition rules of the
parachain and sign statements that can have a positive or negative outcome. With enough positive
statements, the block is added to the Relay Chain, but is still pending approval.
statements, the block is **backed** and **included** in the Relay Chain, but is still pending
approval.
- [**Approval Process**](#approval-process): Validators perform additional checks that, if positive,
allow the parablock to be approved.
allow the parablock to be **approved**.

The figure below shows a representation of a parachain with collators and validators. The figure
also shows the journey of a parachain block (white square) through the Inclusion Pipeline and the
Expand Down Expand Up @@ -122,20 +123,29 @@ changes its status through this path as follows:
the collator). Note the candidate is not valid yet and can still fail to be included in the Relay
Chain.
- Seconded: The block is put forward by the para-validator V1 to other para-validators (in this case
V2 and V3). The seconded block is shown as a white square with a white tick mark and two yellow
tick marks on top of it. The yellow marks show the PoV from the para-validators.
V2 and V3). The seconded block is shown as a white square with a white tick mark and a yellow tick
mark on top of it. The yellow mark show the PoV from para-validator V1.
- Backable: The block validity is attested by a majority of the para-validators. The backable block
is shown as white square with a white tick mark and three yellow tick marks on top of it. The
yellow marks show the PoV from the para-validators, while the white mark the PoV from the
collator.
- Backed: The block is backed and noted in a fork on the Relay Chain by a relay chain block author
(in this case V4). The backed block is shown as a square with white background and yellow border.
The backed block can still fail to be included in the Relay Chain. Note that for simplicity here
the backed parachain block is represented as a block of the Relay Chain, but in reality a relay
chain block contains many parachian blocks.
(in this case V4). The backed block is shown as a square with white background and yellow border
enclosing a "B". The backed block can still fail to be included in the Relay Chain. Note that for
simplicity here the backed parachain block is represented within the Relay Chain block, but in
reality a relay chain block does not contain the parablocks themselves (more about this later).
- Pending availability: The block is backed but not considered available yet.
- Included: The block is backed and considered available (we have a parablock). Parablocks are shown
as square with white background and yellow border enclosing a "P".
- Included: The block is backed and considered available (we have a parablock). Included parablocks
are shown as square with white background and yellow border enclosing an "I".

:::info Asynchronous Backing

Parablocks' backing and inclusion take 12 seconds to be recorded on the relay chain, i.e. backing
happens in one relay chain block (6 seconds) and inclusion in another relay chain block (additional
6 seconds, see Figure above). With [**asynchronous backing**](./learn-async-backing.md), backing and
inclusion can be recorded in just one relay chain block.

:::

### Parachain Phase

Expand Down Expand Up @@ -267,8 +277,8 @@ enters the Approval Process. The parablock becomes accepted when it is backed, a
**undisputed**. The parablock is checked a second time by a subset of validators (V5, V6 and V7),
and if there are no contradictory results the block is approved and gossiped to other relay chain
validators. Note the parablock after secondary checks is shown as a square with a white background a
yellow border enclosing a "P", and three white ticks (one for each secondary check). Approved
para-blocks are shown as yellow squares that become grey.
yellow border enclosing an "I" (stands for _included_), and three white ticks (one for each
secondary check). Approved para-blocks are shown as yellow squares.

![parachain-approval-process](../assets/parachain-approval-process.png)

Expand Down

0 comments on commit 43d9c1d

Please sign in to comment.