Skip to content

Commit

Permalink
Add async backing parameters and fix image references (#5524)
Browse files Browse the repository at this point in the history
* Add async backing parameters and fix image references

* Update docs/maintain/maintain-guides-async-backing.md

Co-authored-by: Dónal Murray <[email protected]>

* Clarify "parameters" section

---------

Co-authored-by: Radha <[email protected]>
Co-authored-by: Dónal Murray <[email protected]>
  • Loading branch information
3 people authored Jan 23, 2024
1 parent cabdc2f commit 7d9db7e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
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/async/async-backing-unincluded-segment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 16 additions & 2 deletions docs/maintain/maintain-guides-async-backing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ slug: ../maintain-guides-async-backing
This guide is relevant for cumulus based parachain projects started in 2023 or before. Later
projects should already be async backing compatible. If starting a new parachain project, please use
an async backing compatible template such as
[`cumulus/parachain-template`](https://github.com/paritytech/cumulus/tree/rh-test-async-backing).
[`cumulus/parachain-template`](https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/parachain-template).

:::

Expand Down Expand Up @@ -195,7 +195,7 @@ This phase consists of changes to your parachain’s runtime that activate async

1. Increase the maximum `UNINCLUDED_SEGMENT_CAPACITY` in `runtime/src/lib.rs`.

![Unincluded-segment-capacity](../assets/async/async-backing-unincluded-segment.png)
![Unincluded-segment-capacity](../assets/async/async-backing-unincluded-segment-capacity.png)

3. Decrease `MILLISECS_PER_BLOCK` to 6000.

Expand All @@ -214,6 +214,20 @@ This phase consists of changes to your parachain’s runtime that activate async

![minimum-period](../assets/async/async-backing-minimum-period.png)

6. Check parameters: double-check that the relay-chain configuration contains the following three
parameters (especially when testing locally e.g. with zombienet):

```json
"async_backing_params": {
"max_candidate_depth": 3,
"allowed_ancestry_len": 2
},
"scheduling_lookahead": 2
```

⚠️ `scheduling_lookahead` must be set to 2, otherwise parachain block times will degrade to worse
than with sync backing! ⚠️

## Timing by Block Number

With asynchronous backing it will be possible for parachains to opt for a block time of 6 seconds
Expand Down

0 comments on commit 7d9db7e

Please sign in to comment.