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§
- Activated
Leaf - Activated leaf.
- Active
Leaves Update - Changes in the set of active leaves: the parachain heads which we care to work on.
- Block
Info - An event telling the
Overseer
on the particular block that has been imported or finalized. - Channels
Out - Collection of channels to the individual subsystems.
- Handle
- A handle used to communicate with the
Overseer
. - High
Priority - High priority.
- Message
Packet - 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 theFooBuilder
when callingFoo::builder()
- Normal
Priority - Normal priority.
- Orchestrated
Subsystem - A subsystem that the orchestrator orchestrates.
- Overseer
- The orchestra.
- Overseer
Builder - Builder pattern to create compile time safe construction path.
- Overseer
Connector - External connector.
- Overseer
Sender - Connector to send messages towards all subsystems, while tracking the which signals where already received.
- Overseer
Subsystem Context - A context type that is given to the
Subsystem
upon spawning. It can be used bySubsystem
to communicate with otherSubsystem
s or to spawn it’sSubsystemJob
s. - Signals
Received - Watermark to track the received signals.
- Spawn
Glue - Glue to connect
trait orchestra::Spawner
andSpawnNamed
fromsubstrate
. - Subsystem
Instance - A running instance of some
Subsystem
. - Subsystem
Meter Readouts - Set of readouts of the
Meter
s of a subsystem. - Subsystem
Meters - Collection of meters related to a subsystem.
Enums§
- AllMessages
- Generated message type wrapper over all possible messages used by any subsystem.
- Approval
Distribution Outgoing Messages - Approval
Voting Outgoing Messages - Approval
Voting Parallel Outgoing Messages - Availability
Distribution Outgoing Messages - Availability
Recovery Outgoing Messages - Availability
Store Outgoing Messages - Bitfield
Distribution Outgoing Messages - Bitfield
Signing Outgoing Messages - Candidate
Backing Outgoing Messages - Candidate
Validation Outgoing Messages - Chain
ApiOutgoing Messages - Chain
Selection Outgoing Messages - Collation
Generation Outgoing Messages - Collator
Protocol Outgoing Messages - Dispute
Coordinator Outgoing Messages - Dispute
Distribution Outgoing Messages - Event
- An event from outside the overseer scope, such as the substrate framework or user interaction.
- External
Request - Some request from outer world.
- From
Orchestra - A message type that a subsystem receives from an orchestra. It wraps signals from an orchestra and messages that are circulating between subsystems.
- Gossip
Support Outgoing Messages - Init
- Type for the initialized field of the orchestra builder
- Network
Bridge RxOutgoing Messages - Network
Bridge TxOutgoing Messages - Overseer
Error - An error type that describes faults that may happen
- Overseer
Signal - Signals sent by an overseer to a subsystem.
- Priority
Level - Priority of messages sending to the individual subsystems. Only for the bounded channel sender.
- Prospective
Parachains Outgoing Messages - Provisioner
Outgoing Messages - PvfChecker
Outgoing Messages - Runtime
ApiOutgoing Messages - Statement
Distribution Outgoing Messages - Subsystem
Error - An error type that describes faults that may happen
- ToOrchestra
- A type of messages that are sent from a
Subsystem
to the declared orchestra. - TrySend
Error - A bounded channel error when trying to send a message (transparently wraps the inner error type)
Traits§
- Approval
Distribution Context Trait - Accumulative trait for a particular subsystem wrapper.
- Approval
Distribution Sender Trait - A abstracting trait for usage with subsystems.
- Approval
Voting Context Trait - Accumulative trait for a particular subsystem wrapper.
- Approval
Voting Parallel Context Trait - Accumulative trait for a particular subsystem wrapper.
- Approval
Voting Parallel Sender Trait - A abstracting trait for usage with subsystems.
- Approval
Voting Sender Trait - A abstracting trait for usage with subsystems.
- Associate
Outgoing - Binds a generated type covering all declared outgoing messages,
which implements
#generated_outgoing: From<M>
for all annotated types of a particular subsystem. - Availability
Distribution Context Trait - Accumulative trait for a particular subsystem wrapper.
- Availability
Distribution Sender Trait - A abstracting trait for usage with subsystems.
- Availability
Recovery Context Trait - Accumulative trait for a particular subsystem wrapper.
- Availability
Recovery Sender Trait - A abstracting trait for usage with subsystems.
- Availability
Store Context Trait - Accumulative trait for a particular subsystem wrapper.
- Availability
Store Sender Trait - A abstracting trait for usage with subsystems.
- Bitfield
Distribution Context Trait - Accumulative trait for a particular subsystem wrapper.
- Bitfield
Distribution Sender Trait - A abstracting trait for usage with subsystems.
- Bitfield
Signing Context Trait - Accumulative trait for a particular subsystem wrapper.
- Bitfield
Signing Sender Trait - A abstracting trait for usage with subsystems.
- Candidate
Backing Context Trait - Accumulative trait for a particular subsystem wrapper.
- Candidate
Backing Sender Trait - A abstracting trait for usage with subsystems.
- Candidate
Validation Context Trait - Accumulative trait for a particular subsystem wrapper.
- Candidate
Validation Sender Trait - A abstracting trait for usage with subsystems.
- Chain
ApiBackend - Offers header utilities.
- Chain
ApiContext Trait - Accumulative trait for a particular subsystem wrapper.
- Chain
ApiSender Trait - A abstracting trait for usage with subsystems.
- Chain
Selection Context Trait - Accumulative trait for a particular subsystem wrapper.
- Chain
Selection Sender Trait - A abstracting trait for usage with subsystems.
- Collation
Generation Context Trait - Accumulative trait for a particular subsystem wrapper.
- Collation
Generation Sender Trait - A abstracting trait for usage with subsystems.
- Collator
Protocol Context Trait - Accumulative trait for a particular subsystem wrapper.
- Collator
Protocol Sender Trait - A abstracting trait for usage with subsystems.
- Dispute
Coordinator Context Trait - Accumulative trait for a particular subsystem wrapper.
- Dispute
Coordinator Sender Trait - A abstracting trait for usage with subsystems.
- Dispute
Distribution Context Trait - Accumulative trait for a particular subsystem wrapper.
- Dispute
Distribution Sender Trait - A abstracting trait for usage with subsystems.
- Gossip
Support Context Trait - Accumulative trait for a particular subsystem wrapper.
- Gossip
Support Sender Trait - A abstracting trait for usage with subsystems.
- Head
Supports Parachains - Whether a header supports parachain consensus or not.
- MapSubsystem
- A helper trait to map a subsystem to smth. else.
- Metrics
Trait - Subsystem- or job-specific Prometheus metrics.
- Network
Bridge RxContext Trait - Accumulative trait for a particular subsystem wrapper.
- Network
Bridge RxSender Trait - A abstracting trait for usage with subsystems.
- Network
Bridge TxContext Trait - Accumulative trait for a particular subsystem wrapper.
- Network
Bridge TxSender Trait - A abstracting trait for usage with subsystems.
- Priority
- Describes the priority of the message.
- Prospective
Parachains Context Trait - Accumulative trait for a particular subsystem wrapper.
- Prospective
Parachains Sender Trait - A abstracting trait for usage with subsystems.
- Provisioner
Context Trait - Accumulative trait for a particular subsystem wrapper.
- Provisioner
Sender Trait - A abstracting trait for usage with subsystems.
- PvfChecker
Context Trait - Accumulative trait for a particular subsystem wrapper.
- PvfChecker
Sender Trait - A abstracting trait for usage with subsystems.
- Runtime
ApiContext Trait - Accumulative trait for a particular subsystem wrapper.
- Runtime
ApiSender Trait - A abstracting trait for usage with subsystems.
- Runtime
ApiSubsystem Client - Exposes all runtime calls that are used by the runtime API subsystem.
- Spawner
- A spawner
- Statement
Distribution Context Trait - Accumulative trait for a particular subsystem wrapper.
- Statement
Distribution Sender Trait - A abstracting trait for usage with subsystems.
- Subsystem
- A trait that describes the
Subsystem
s that can run on theOrchestra
. - Subsystem
Context - A context type that is given to the
Subsystem
upon spawning. It can be used bySubsystem
to communicate with otherSubsystem
s or spawn jobs. - Subsystem
Sender - Sender end of a channel to interface with a subsystem.
- Task
Kind - Task kind to launch.
- Timeout
Ext - Extends
Future
to allow time-limited futures.
Functions§
- forward_
events - Glues together the
Overseer
andBlockchainEvents
by forwarding import and finality notifications into theOverseerHandle
. - spawn
- Spawn task of kind
self
using spawnerS
. - spawn_
metronome_ metrics - Spawn the metrics metronome task.
Type Aliases§
- Initialized
Overseer Builder - Type used to represent a builder where all fields are initialized and the orchestra could be constructed.
- Overseer
Handle - Handle for an orchestra.
- Subsystem
Incoming Messages - Incoming messages from both the bounded and unbounded channel.
- Subsystem
Result - Ease the use of subsystem errors.
- Unpin
Handle - Keeps the state of a specific block pinned in memory while the handle is alive.