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

Lookahead Collator: configurable total authoring time per relay-chain block #2947

Open
rphmeier opened this issue Jul 27, 2023 · 0 comments
Open
Labels
J0-enhancement An additional feature request.

Comments

@rphmeier
Copy link
Contributor

The lookahead collator currently operates like this:

  1. It accepts an authoring_duration
  2. Every relay-chain block, it authors blocks in a loop with authoring_duration as a limit.

The lookahead collator should instead get a more intricate set of parameters which limit the total amount of authoring time per block.

struct AuthoringDurations {
    // The maximum amount of time to spend authoring a block.
    max_duration: Duration,
    // The minimum amount of time to allow for authoring a block.
    min_duration: Duration,
    // The maximum amount of time per relay-chain block to spend authoring
    max_per_relay_slot: Duration, 
}

The per-relay-parent authoring loop should adjust the duration that it passes to propose based on the amount of time remaining in the slot, and conclude the loop if it the remaining amount of time would be less than the min_duration.

@rphmeier rphmeier added the J0-enhancement An additional feature request. label Jul 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request.
Projects
None yet
Development

No branches or pull requests

1 participant