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 lookahead collator and enable async backing in all runtimes #448

Merged
merged 40 commits into from
Mar 21, 2024

Conversation

Agusrodri
Copy link
Contributor

@Agusrodri Agusrodri commented Mar 11, 2024

What does it do?

Following #399, this PR adds an implementation for the lookahead collator client.

With this collator, we now can enable asynchronous backing and leverage all its new functionalities, like the six seconds blocktime and also producing parachain blocks on top of other para-blocks that were not included in the relay yet (unincluded segment). Without the lookahead collator, these features could not be implemented as the other kind of collator (basic) allows to produce blocks only in the old way without async-backing enabled.

@Agusrodri Agusrodri added a0-pleasereview Pull request needs code review. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Mar 11, 2024
Copy link
Contributor

github-actions bot commented Mar 11, 2024

Coverage Report

(master)

@@                      Coverage Diff                       @@
##           master   agustin-lookahead-collator      +/-   ##
==============================================================
- Coverage   67.55%                       65.08%   -2.47%     
+ Files          63                           64       +1     
+ Lines        9166                         9515     +349     
==============================================================
  Hits         6192                         6192              
+ Misses       2974                         3323     +349     
Files Changed Coverage

Coverage generated Tue Mar 19 20:17:57 UTC 2024

@girazoki
Copy link
Collaborator

@Agusrodri the zombienet tests do not work because you are pointing at a custom polkadot branch. Once you cherry-pick in the 1.6.0 branch all will be good

@Agusrodri Agusrodri marked this pull request as ready for review March 15, 2024 14:04
@Agusrodri Agusrodri changed the title WIP: Add lookahead collator and enable async backing in all runtimes Add lookahead collator and enable async backing in all runtimes Mar 15, 2024
Agusrodri and others added 2 commits March 15, 2024 07:12
Fixes a rare bug where collators will try to build a block before the
runtime upgrade using the slot duration from the latest block, which is
after the runtime upgrade, resulting in a stall
@girazoki
Copy link
Collaborator

Let's not forget to modify the inflation rate to match the new expectations

@girazoki
Copy link
Collaborator

@Agusrodri make sure you merge master in please, that should make your tests more robust against the CI

This was referenced Mar 19, 2024
node/src/service.rs Outdated Show resolved Hide resolved
@ParthDesai ParthDesai self-requested a review March 20, 2024 09:48
Copy link
Contributor

@ParthDesai ParthDesai left a comment

Choose a reason for hiding this comment

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

Looks good to me. As discussed, we will handle cancellation token in different PR.

Some minor questions, which are not blocker.

@Agusrodri Agusrodri merged commit f11c837 into master Mar 21, 2024
32 checks passed
@Agusrodri Agusrodri deleted the agustin-lookahead-collator branch March 21, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a0-pleasereview Pull request needs code review. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants