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

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

@rphmeier

Description

@rphmeier

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    J0-enhancementAn additional feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions