Module polkadot_runtime_parachains::scheduler

source ·
Expand description

The scheduler module for parachains and parathreads.

This module is responsible for two main tasks:

  • Partitioning validators into groups and assigning groups to parachains and parathreads
  • Scheduling parachains and parathreads

It aims to achieve these tasks with these goals in mind:

  • It should be possible to know at least a block ahead-of-time, ideally more, which validators are going to be assigned to which parachains.
  • Parachains that have a candidate pending availability in this fork of the chain should not be assigned.
  • Validator assignments should not be gameable. Malicious cartels should not be able to manipulate the scheduler to assign themselves as desired.
  • High or close to optimal throughput of parachains and parathreads. Work among validator groups should be balanced.

The Scheduler manages resource allocation using the concept of “Availability Cores”. There will be one availability core for each parachain, and a fixed number of cores used for multiplexing parathreads. Validators will be partitioned into groups, with the same number of groups as availability cores. Validator groups will be assigned to different availability cores over time.

Re-exports§

Modules§

  • Common traits and types used by the scheduler and assignment providers.
  • A module that is responsible for migration of storage.
  • The pallet module in each FRAME pallet hosts the most important items needed to construct this pallet.

Type Aliases§

  • The block number type used by Polkadot. 32-bits will allow for 136 years of blocks assuming 1 block per second.