You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: develop/parachains/maintenance/asynchronous-backing.md
+11-30Lines changed: 11 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,7 @@ This guide is relevant for Cumulus-based parachain projects started in 2023 or b
17
17
18
18
## Prerequisite
19
19
20
-
The relay chain needs to have async backing enabled so double-check that the relay chain
21
-
configuration contains the following three parameters (especially when testing locally e.g. with
22
-
zombienet):
20
+
The relay chain needs to have async backing enabled so double-check that the relay chain configuration contains the following three parameters (especially when testing locally e.g. with zombienet):
23
21
24
22
```json
25
23
"async_backing_params": {
@@ -30,17 +28,14 @@ zombienet):
30
28
```
31
29
32
30
!!! warning
33
-
`scheduling_lookahead` must be set to 2, otherwise parachain
34
-
block times will degrade to worse than with sync backing!
31
+
`scheduling_lookahead` must be set to 2, otherwise parachain block times will degrade to worse than with sync backing!
35
32
36
33
## Phase 1 - Update Parachain Runtime
37
34
38
-
This phase involves configuring your parachain's runtime `/runtime/src/lib.rs` to make use of
39
-
async backing system.
35
+
This phase involves configuring your parachain's runtime `/runtime/src/lib.rs` to make use of async backing system.
40
36
41
37
1. Establish and ensure that constants for capacity (`UNINCLUDED_SEGMENT_CAPACITY`) and velocity (`BLOCK_PROCESSING_VELOCITY`) are both set to `1` in the runtime.
42
-
2. Establish and ensure the constant relay chain slot duration measured in milliseconds equal to
43
-
`6000` in the runtime.
38
+
2. Establish and ensure the constant relay chain slot duration measured in milliseconds equal to `6000` in the runtime.
44
39
45
40
```rust title="lib.rs"
46
41
// Maximum number of blocks simultaneously accepted by the runtime, not yet included into the
@@ -147,11 +142,7 @@ async backing system.
147
142
```
148
143
149
144
!!!note
150
-
Withacapacityof1wehaveaneffectivevelocityof ½ evenwhenvelocityis
Withacapacityof1wehaveaneffectivevelocityof ½ evenwhenvelocityisconfiguredtosomelargervalue.Thisisbecausecapacitywillbefilledafterasingleblockisproducedandwillonlybefreedupafterthatblockisincludedontherelaychain, whichtakes2relayblockstoaccomplish.Thuswithcapacity1andvelocity1wegetthecustomary12secondparachainblocktime.
requiringadditionalchanges.Seethesection"Timing by Block Number".
275
+
Foraparachainwhichmeasurestimeintermsofitsownblocknumberratherthanbyrelayblocknumberitmaybepreferabletoincreasevelocity.Changingblocktimemaycausecomplications, requiringadditionalchanges.Seethesection"Timing by Block Number".
290
276
291
277
```rust
292
278
modblock_times {
@@ -328,12 +314,7 @@ This phase consists of changes to your parachain's runtime that activate async b
0 commit comments