Skip to content

Commit 86f6a2f

Browse files
improved sync vs async section of async backing
1 parent 1aed941 commit 86f6a2f

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

reference/parachains/consensus/async-backing.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ The following configurations can be set by on-chain governance, dictating how ma
1616

1717
## Synchronous VS. Asynchronous Processing
1818

19-
*in progress*
19+
<!-- In the synchronous scenario, both the collators and validators draw context from the relay parent of the prior parablock, which lives on the relay chain. This makes the Backing and Generation steps tightly coupled to the prior parablock completing the inclusion pipeline. As a result, one parablock can be processed *every other* relay block, and only `0.5` seconds are assigned for execution. -->
2020

21-
In the synchronous scenario, both the collators and validators draw context from the relay parent of the prior parablock, which lives on the relay chain. This makes the Backing and Generation steps tightly coupled to the prior parablock completing the inclusion pipeline. As a result, one parablock can be processed *every other* relay block, and only `0.5` seconds are assigned for execution.
21+
The Polkadot-parachain protocol originally operated in synchronous mode, where both collators and validators drew context exclusively from the relay parent of the prior parablock, which lives on the relay chain. This made the Backing and Generation steps tightly coupled to the prior parablock completing the entire inclusion pipeline. As a result, one parablock could only be processed every other relay block, with just 0.5 seconds assigned for execution.
2222

23-
<div className="merm-16x9">
2423
```mermaid
2524
---
2625
displayMode: compact
@@ -76,11 +75,14 @@ gantt
7675
Backing : item2, 1913, 1918
7776
Inclusion : item3, 1918, 1924
7877
```
79-
</div>
8078

81-
In the asynchronous scenario, where both the collators and validators have access to [Unincluded Segments](/reference/parachains/consensus/inclusion-pipeline) as an additional context source, the Backing and Generation steps are no longer coupled to the prior block completing the full inclusion pipeline. Instead, the prior parablock only needs to complete the generation step and be added to the Unincluded Segments before the next parablock can begin the Backing and Generation steps.
79+
<!-- In the asynchronous scenario, where both the collators and validators have access to [Unincluded Segments](/reference/parachains/consensus/inclusion-pipeline) as an additional context source, the Backing and Generation steps are no longer coupled to the prior block completing the full inclusion pipeline. Instead, the prior parablock only needs to complete the generation step and be added to the Unincluded Segments before the next parablock can begin the Backing and Generation steps.
8280
83-
This results in one parablock being processed *every* relay block, and allows for `2` seconds of execution.
81+
This results in one parablock being processed *every* relay block, and allows for `2` seconds of execution. -->
82+
83+
The modern protocol now uses asynchronous backing, where both collators and validators have access to [Unincluded Segments](/reference/parachains/consensus/inclusion-pipeline) as an additional context source. The Backing and Generation steps are no longer coupled to the prior block completing the full inclusion pipeline. Instead, the prior parablock only needs to complete the generation step and be added to the Unincluded Segments before the next parablock can begin the Backing and Generation steps.
84+
85+
This results in one parablock being processed every relay block (instead of every other relay block), and allows for more time to execute during the Generation step (0.5s → 2s).
8486

8587
```mermaid
8688
---
@@ -157,9 +159,8 @@ gantt
157159
Backing : item2, 1920, 1930
158160
```
159161

160-
Notice how `P2` starts before the backing stage of `P1`.
162+
<!-- In the multi-core scenario, by using elastic scaling we can further increase the the number of parablocks processed for each relay block. By using two cores, here we double the number of parablocks being processed in a 30 second period:
161163
162-
In the multi-core scenario
163164
```mermaid
164165
---
165166
displayMode: compact
@@ -252,4 +253,4 @@ gantt
252253
X : item1, 1912, 1914
253254
Backing : item2, 1914, 1924
254255
Inclusion : item3, 1924, 1930
255-
```
256+
``` -->

reference/parachains/consensus/inclusion-pipeline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ flowchart LR
3939

4040
**Generation**: Collators *execute* their blockchain's core functionality to generate a new block, producing a [proof-of-validity](https://paritytech.github.io/polkadot-sdk/book/types/availability.html?#proof-of-validity) (PoV), which is passed to validators selected for backing. The PoV is composed of:
4141

42-
- The block candidate (list of state transitions)
42+
- A list of state transitions called the **block candidate**
4343
- The values in the parachain's database that the block modifies
4444
- The hashes of the unaffected points in the Merkle tree
4545

0 commit comments

Comments
 (0)