Expand description

Overseer

overseer implements the Overseer architecture described in the implementers-guide. For the motivations behind implementing the overseer itself you should check out that guide, documentation in this crate will be mostly discussing technical stuff.

An Overseer is something that allows spawning/stopping and overseeing asynchronous tasks as well as establishing a well-defined and easy to use protocol that the tasks can use to communicate with each other. It is desired that this protocol is the only way tasks communicate with each other, however at this moment there are no foolproof guards against other ways of communication.

The Overseer is instantiated with a pre-defined set of Subsystems that share the same behavior from Overseer’s point of view.

                             +-----------------------------+
                             |         Overseer            |
                             +-----------------------------+

            ................|  Overseer "holds" these and uses |..............
            .                  them to (re)start things                      .
            .                                                                .
            .  +-------------------+                +---------------------+  .
            .  |   Subsystem1      |                |   Subsystem2        |  .
            .  +-------------------+                +---------------------+  .
            .           |                                       |            .
            ..................................................................
                        |                                       |
                      start()                                 start()
                        V                                       V
            ..................| Overseer "runs" these |.......................
            .  +--------------------+               +---------------------+  .
            .  | SubsystemInstance1 |               | SubsystemInstance2  |  .
            .  +--------------------+               +---------------------+  .
            ..................................................................

Re-exports

pub use polkadot_node_subsystem_types::jaeger;
pub use self::metrics::Metrics as OverseerMetrics;
pub use self::dummy::DummySubsystem;
pub use polkadot_node_metrics::metrics::prometheus;
pub use orchestra as gen;
pub use orchestra as gen;

Modules

A dummy subsystem, mostly useful for placeholders and tests.
Prometheus metrics related to the overseer and its channels.

Structs

Activated leaf.
Changes in the set of active leaves: the parachain heads which we care to work on.
An event telling the Overseer on the particular block that has been imported or finalized.
Collection of channels to the individual subsystems.
A handle used to communicate with the Overseer.
A wrapping type for messages.
Create a stream of ticks with a defined cycle duration.
Type marker for the uninitialized field of the orchestra builder. PhantomData is used for type hinting when creating uninitialized builder, e.g. to avoid specifying the generics when instantiating the FooBuilder when calling Foo::builder()
A subsystem that the orchestrator orchestrates.
The orchestra.
Builder pattern to create compile time safe construction path.
External connector.
Connector to send messages towards all subsystems, while tracking the which signals where already received.
A context type that is given to the Subsystem upon spawning. It can be used by Subsystem to communicate with other Subsystems or to spawn it’s SubsystemJobs.
Watermark to track the received signals.
Glue to connect trait orchestra::Spawner and SpawnNamed from substrate.
A running instance of some Subsystem.
Set of readouts of the Meters of a subsystem.
Collection of meters related to a subsystem.

Enums

Generated message type wrapper over all possible messages used by any subsystem.
An event from outside the overseer scope, such as the substrate framework or user interaction.
Some request from outer world.
A message type that a subsystem receives from an orchestra. It wraps signals from an orchestra and messages that are circulating between subsystems.
Type for the initialized field of the orchestra builder
The status of an activated leaf.
An error type that describes faults that may happen
Signals sent by an overseer to a subsystem.
An error type that describes faults that may happen
A type of messages that are sent from a Subsystem to the declared orchestra.

Constants

Store 2 days worth of blocks, not accounting for forks, in the LRU cache. Assumes a 6-second block time.

Traits

Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Binds a generated type covering all declared outgoing messages, which implements #generated_outgoing: From<M> for all annotated types of a particular subsystem.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Whether a header supports parachain consensus or not.
A helper trait to map a subsystem to smth. else.
Subsystem- or job-specific Prometheus metrics.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
Exposes all runtime calls that are used by the runtime API subsystem.
A spawner
Accumulative trait for a particular subsystem wrapper.
A abstracting trait for usage with subsystems.
A trait that describes the Subsystems that can run on the Orchestra.
A context type that is given to the Subsystem upon spawning. It can be used by Subsystem to communicate with other Subsystems or spawn jobs.
Sender end of a channel to interface with a subsystem.
Task kind to launch.
Extends Future to allow time-limited futures.

Functions

Glues together the Overseer and BlockchainEvents by forwarding import and finality notifications into the OverseerHandle.
Spawn task of kind self using spawner S.
Spawn the metrics metronome task.

Type Definitions

Type used to represent a builder where all fields are initialized and the orchestra could be constructed.
Handle for an orchestra.
Incoming messages from both the bounded and unbounded channel.
Ease the use of subsystem errors.

Attribute Macros