Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

impl guide: Update Collator Generation #7250

Merged
merged 5 commits into from
May 24, 2023

Conversation

mrcnski
Copy link
Contributor

@mrcnski mrcnski commented May 18, 2023

Re-raising changes I made in #6938, with async-backing content removed.

I think I added the "Summary in plain English" section because we are trying to move away from code in the impl guide, but let me know if it's not necessary.

@mrcnski mrcnski added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels May 18, 2023

## With Async Backing

### Protocol
Copy link
Contributor

Choose a reason for hiding this comment

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

Was it discussed somewhere? As long as we don't have a plan for collation generation, we shouldn't put it into the guide. We're still in the middle of cumulus changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops sorry, thought I removed this section.

Comment on lines 26 to 27
//! * Determine an occupied core assumption to make about the para. Scheduled cores can make [`OccupiedCoreAssumption::Free`].
//! * TODO: What does this mean?
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's worth mentioning assumptions mechanism here. In short, collation generation only builds new candidates when the parachain core is free, meaning, previous candidate accepted by the runtime reached availability threshold. See pending availability in the inclusion pallet for reference.

This will change with asynchronous backing.

To understand the assumption mechanism: it is also used by candidate validation. When validation data is supplied with candidate, we try to match it with Runtime. The main "matching" point here is parachain head. With free or timed-out assumption the runtime will ignore pending-availability candidate and read latest para head.
With included-assumption it will apply pendind-availability candidate (if any) to the storage and return new para head. This is ok because storage changes done during api calls are discarded.

@mrcnski mrcnski requested a review from slumber May 19, 2023 17:35
I don't remember why I did this. Maybe it only made sense with the async backing
changes.
Comment on lines 144 to 146
- *Slot:* Time is divided into discrete slots. Each validator in the validator
set produces a verifiable random value, using a VRF, per slot. If below a
threshold, this allows the validator to author a new block for that slot.
Copy link
Contributor

Choose a reason for hiding this comment

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

leftover

@mrcnski mrcnski requested a review from slumber May 21, 2023 18:07
@mrcnski
Copy link
Contributor Author

mrcnski commented May 24, 2023

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 67fd3e9 into master May 24, 2023
@paritytech-processbot paritytech-processbot bot deleted the mrcnski/impl-guide-collator-generation branch May 24, 2023 13:36
ordian added a commit that referenced this pull request May 25, 2023
* master:
  XCM: Tools for uniquely referencing messages (#7234)
  Companion: Substrate#13869 (#7119)
  Companion for Substrate#14214 (#7283)
  Fix flaky test and error reporting (#7282)
  impl guide: Update Collator Generation (#7250)
  Add staking-miner bin (#7273)
  metrics: tests: Fix flaky runtime_can_publish_metrics (#7279)
ordian added a commit that referenced this pull request May 25, 2023
…slashing-client

* ao-past-session-slashing-runtime:
  XCM: Tools for uniquely referencing messages (#7234)
  Companion: Substrate#13869 (#7119)
  Companion for Substrate#14214 (#7283)
  Fix flaky test and error reporting (#7282)
  impl guide: Update Collator Generation (#7250)
  Add staking-miner bin (#7273)
  metrics: tests: Fix flaky runtime_can_publish_metrics (#7279)
  [companion] Fix request-response protocols backpressure mechanism (#7276)
  PVF: instantiate runtime from bytes (#7270)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants