referrerpolicy=no-referrer-when-downgrade

Crate polkadot_overseer

Source
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 self::metrics::Metrics as OverseerMetrics;
pub use self::dummy::DummySubsystem;
pub use polkadot_node_metrics::metrics::prometheus;
pub use orchestra as gen;

Modules§

dummy
A dummy subsystem, mostly useful for placeholders and tests.
messages
The exclusive home of all generated dummy messages (if any at all)
metrics
Prometheus metrics related to the overseer and its channels.

Structs§

ActivatedLeaf
Activated leaf.
ActiveLeavesUpdate
Changes in the set of active leaves: the parachain heads which we care to work on.
BlockInfo
An event telling the Overseer on the particular block that has been imported or finalized.
ChannelsOut
Collection of channels to the individual subsystems.
Handle
A handle used to communicate with the Overseer.
HighPriority
High priority.
MessagePacket
A wrapping type for messages.
Metronome
Create a stream of ticks with a defined cycle duration.
Missing
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()
NormalPriority
Normal priority.
OrchestratedSubsystem
A subsystem that the orchestrator orchestrates.
Overseer
The orchestra.
OverseerBuilder
Builder pattern to create compile time safe construction path.
OverseerConnector
External connector.
OverseerSender
Connector to send messages towards all subsystems, while tracking the which signals where already received.
OverseerSubsystemContext
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.
SignalsReceived
Watermark to track the received signals.
SpawnGlue
Glue to connect trait orchestra::Spawner and SpawnNamed from substrate.
SubsystemInstance
A running instance of some Subsystem.
SubsystemMeterReadouts
Set of readouts of the Meters of a subsystem.
SubsystemMeters
Collection of meters related to a subsystem.

Enums§

AllMessages
Generated message type wrapper over all possible messages used by any subsystem.
ApprovalDistributionOutgoingMessages
ApprovalVotingOutgoingMessages
ApprovalVotingParallelOutgoingMessages
AvailabilityDistributionOutgoingMessages
AvailabilityRecoveryOutgoingMessages
AvailabilityStoreOutgoingMessages
BitfieldDistributionOutgoingMessages
BitfieldSigningOutgoingMessages
CandidateBackingOutgoingMessages
CandidateValidationOutgoingMessages
ChainApiOutgoingMessages
ChainSelectionOutgoingMessages
CollationGenerationOutgoingMessages
CollatorProtocolOutgoingMessages
DisputeCoordinatorOutgoingMessages
DisputeDistributionOutgoingMessages
Event
An event from outside the overseer scope, such as the substrate framework or user interaction.
ExternalRequest
Some request from outer world.
FromOrchestra
A message type that a subsystem receives from an orchestra. It wraps signals from an orchestra and messages that are circulating between subsystems.
GossipSupportOutgoingMessages
Init
Type for the initialized field of the orchestra builder
NetworkBridgeRxOutgoingMessages
NetworkBridgeTxOutgoingMessages
OverseerError
An error type that describes faults that may happen
OverseerSignal
Signals sent by an overseer to a subsystem.
PriorityLevel
Priority of messages sending to the individual subsystems. Only for the bounded channel sender.
ProspectiveParachainsOutgoingMessages
ProvisionerOutgoingMessages
PvfCheckerOutgoingMessages
RuntimeApiOutgoingMessages
StatementDistributionOutgoingMessages
SubsystemError
An error type that describes faults that may happen
ToOrchestra
A type of messages that are sent from a Subsystem to the declared orchestra.
TrySendError
A bounded channel error when trying to send a message (transparently wraps the inner error type)

Traits§

ApprovalDistributionContextTrait
Accumulative trait for a particular subsystem wrapper.
ApprovalDistributionSenderTrait
A abstracting trait for usage with subsystems.
ApprovalVotingContextTrait
Accumulative trait for a particular subsystem wrapper.
ApprovalVotingParallelContextTrait
Accumulative trait for a particular subsystem wrapper.
ApprovalVotingParallelSenderTrait
A abstracting trait for usage with subsystems.
ApprovalVotingSenderTrait
A abstracting trait for usage with subsystems.
AssociateOutgoing
Binds a generated type covering all declared outgoing messages, which implements #generated_outgoing: From<M> for all annotated types of a particular subsystem.
AvailabilityDistributionContextTrait
Accumulative trait for a particular subsystem wrapper.
AvailabilityDistributionSenderTrait
A abstracting trait for usage with subsystems.
AvailabilityRecoveryContextTrait
Accumulative trait for a particular subsystem wrapper.
AvailabilityRecoverySenderTrait
A abstracting trait for usage with subsystems.
AvailabilityStoreContextTrait
Accumulative trait for a particular subsystem wrapper.
AvailabilityStoreSenderTrait
A abstracting trait for usage with subsystems.
BitfieldDistributionContextTrait
Accumulative trait for a particular subsystem wrapper.
BitfieldDistributionSenderTrait
A abstracting trait for usage with subsystems.
BitfieldSigningContextTrait
Accumulative trait for a particular subsystem wrapper.
BitfieldSigningSenderTrait
A abstracting trait for usage with subsystems.
CandidateBackingContextTrait
Accumulative trait for a particular subsystem wrapper.
CandidateBackingSenderTrait
A abstracting trait for usage with subsystems.
CandidateValidationContextTrait
Accumulative trait for a particular subsystem wrapper.
CandidateValidationSenderTrait
A abstracting trait for usage with subsystems.
ChainApiBackend
Offers header utilities.
ChainApiContextTrait
Accumulative trait for a particular subsystem wrapper.
ChainApiSenderTrait
A abstracting trait for usage with subsystems.
ChainSelectionContextTrait
Accumulative trait for a particular subsystem wrapper.
ChainSelectionSenderTrait
A abstracting trait for usage with subsystems.
CollationGenerationContextTrait
Accumulative trait for a particular subsystem wrapper.
CollationGenerationSenderTrait
A abstracting trait for usage with subsystems.
CollatorProtocolContextTrait
Accumulative trait for a particular subsystem wrapper.
CollatorProtocolSenderTrait
A abstracting trait for usage with subsystems.
DisputeCoordinatorContextTrait
Accumulative trait for a particular subsystem wrapper.
DisputeCoordinatorSenderTrait
A abstracting trait for usage with subsystems.
DisputeDistributionContextTrait
Accumulative trait for a particular subsystem wrapper.
DisputeDistributionSenderTrait
A abstracting trait for usage with subsystems.
GossipSupportContextTrait
Accumulative trait for a particular subsystem wrapper.
GossipSupportSenderTrait
A abstracting trait for usage with subsystems.
HeadSupportsParachains
Whether a header supports parachain consensus or not.
MapSubsystem
A helper trait to map a subsystem to smth. else.
MetricsTrait
Subsystem- or job-specific Prometheus metrics.
NetworkBridgeRxContextTrait
Accumulative trait for a particular subsystem wrapper.
NetworkBridgeRxSenderTrait
A abstracting trait for usage with subsystems.
NetworkBridgeTxContextTrait
Accumulative trait for a particular subsystem wrapper.
NetworkBridgeTxSenderTrait
A abstracting trait for usage with subsystems.
Priority
Describes the priority of the message.
ProspectiveParachainsContextTrait
Accumulative trait for a particular subsystem wrapper.
ProspectiveParachainsSenderTrait
A abstracting trait for usage with subsystems.
ProvisionerContextTrait
Accumulative trait for a particular subsystem wrapper.
ProvisionerSenderTrait
A abstracting trait for usage with subsystems.
PvfCheckerContextTrait
Accumulative trait for a particular subsystem wrapper.
PvfCheckerSenderTrait
A abstracting trait for usage with subsystems.
RuntimeApiContextTrait
Accumulative trait for a particular subsystem wrapper.
RuntimeApiSenderTrait
A abstracting trait for usage with subsystems.
RuntimeApiSubsystemClient
Exposes all runtime calls that are used by the runtime API subsystem.
Spawner
A spawner
StatementDistributionContextTrait
Accumulative trait for a particular subsystem wrapper.
StatementDistributionSenderTrait
A abstracting trait for usage with subsystems.
Subsystem
A trait that describes the Subsystems that can run on the Orchestra.
SubsystemContext
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.
SubsystemSender
Sender end of a channel to interface with a subsystem.
TaskKind
Task kind to launch.
TimeoutExt
Extends Future to allow time-limited futures.

Functions§

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

Type Aliases§

InitializedOverseerBuilder
Type used to represent a builder where all fields are initialized and the orchestra could be constructed.
OverseerHandle
Handle for an orchestra.
SubsystemIncomingMessages
Incoming messages from both the bounded and unbounded channel.
SubsystemResult
Ease the use of subsystem errors.
UnpinHandle
Keeps the state of a specific block pinned in memory while the handle is alive.

Attribute Macros§

contextbounds
gen
orchestra
subsystem