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 1 commit
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.
20 changes: 18 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,22 @@ This phase consists of changes to your parachain’s runtime that activate async

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

6. **Update parameters:** Once the runtime is deployed the final step is to update three parameters!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my case these had to be set on local relay to then propagate to parachain, so might be useful to explicitly mention that these are on the relay and only required for local testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, let me know if that's clear.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nicely done!


After the runtime upgrade with async backing is activated there will be two new parameters:

```json
"async_backing_params": {
"max_candidate_depth": 0,
"allowed_ancestry_len": 0
}
```

These need to be set to 3 and 2 respectively in governance for async backing to be enabled.

⚠️ scheduling_lookahead must also be set to 2 along with this change otherwise parachain block times
DrW3RK marked this conversation as resolved.
Show resolved Hide resolved
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
Loading