Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add async backing parameters and fix image references #5524

Merged
merged 3 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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