Expand description
Utility module for subsystems
Many subsystems have common interests such as canceling a bunch of spawned jobs, or determining what their validator ID is. These common interests are factored into this module.
This crate also reexports Prometheus metric types which are expected to be implemented by subsystems.
Re-exports§
Modules§
- availability_
chunks - Helpers for the validator->chunk index mapping.
- backing_
implicit_ view - A utility for managing the implicit view of the relay-chain derived from active leaves and the minimum allowed relay-parents that parachain candidates can have and be backed in those leaves’ children.
- database
- Database trait for subsystem. Database trait for polkadot db.
- inclusion_
emulator - An emulator for node-side code to predict the results of on-chain parachain inclusion and predict future constraints.
- metrics
- This module reexports Prometheus types and defines the
Metricstrait. - nesting_
sender - Nested message sending
- reexports
- These reexports are required so that external crates can use the
delegated_subsystemmacro properly. - reputation
- A utility abstraction to collect and send reputation changes.
- runtime
- Convenient and efficient runtime info access. Convenient interface to runtime information.
- vstaging
- Helpers for working with unreleased runtime calls Contains helpers for staging runtime calls.
Structs§
- Controlled
Validator Indices - Keeps track of the validator indices controlled by the local validator in a given session. For better performance, the values for each session are cached.
- Metronome
- Create a stream of ticks with a defined cycle duration.
- Timeout
- A future that wraps another future with a
Delayallowing for time-limited futures. - Validator
- Local validator information
Enums§
- Error
- Utility errors
- Overseer
Error - An error type that describes faults that may happen
Constants§
- JOB_
CHANNEL_ CAPACITY - Capacity of channels to and from individual jobs
- JOB_
GRACEFUL_ STOP_ DURATION - Duration a job will wait after sending a stop signal before hard-aborting.
- MIN_
GOSSIP_ PEERS - The minimum amount of peers to send gossip messages to.
Traits§
- Subsystem
- A trait that describes the
Subsystems that can run on theOrchestra. - Timeout
Ext - Extends
Futureto allow time-limited futures.
Functions§
- choose_
random_ subset - Choose a random subset of
minelements. But always includeis_priorityelements. - choose_
random_ subset_ with_ rng - Choose a random subset of
minelements using a specific Random GeneratorRngBut always includeis_priorityelements. - determine_
new_ blocks - Given a new chain-head hash, this determines the hashes of all new blocks we should track metadata for, given this head.
- executor_
params_ at_ relay_ parent - Requests executor parameters from the runtime effective at given relay-parent. First obtains
session index at the relay-parent, relying on the fact that it should be cached by the runtime
API caching layer even if the block itself has already been pruned. Then requests executor
parameters by session index.
Returns an error if failed to communicate to the runtime, or the parameters are not in the
storage, which should never happen.
Returns default execution parameters if the runtime doesn’t yet support
SessionExecutorParamsAPI call. Otherwise, returns execution parameters returned by the runtime. - find_
validator_ group - Find the validator group the given validator index belongs to.
- gen_
ratio - Returns a
boolwith a probability ofa / bof being true. - gen_
ratio_ rng - Returns a
boolwith a probability ofa / bof being true. - has_
required_ runtime - Verifies if
ParachainHostruntime api is at least at versionrequired_runtime_version. This method is used to determine if a given runtime call is supported by the runtime. - request_
assumed_ validation_ data - Request
AssumedValidationDatafrom the runtime - request_
async_ backing_ params - Request
AsyncBackingParamsfrom the runtime - request_
authorities - Request
Authoritiesfrom the runtime - request_
availability_ cores - Request
AvailabilityCoresfrom the runtime - request_
backing_ constraints - Request
BackingConstraintsfrom the runtime - request_
candidate_ events - Request
CandidateEventsfrom the runtime - request_
candidate_ pending_ availability - Request
CandidatePendingAvailabilityfrom the runtime - request_
candidates_ pending_ availability - Request
CandidatesPendingAvailabilityfrom the runtime - request_
claim_ queue - Request
ClaimQueuefrom the runtime - request_
disabled_ validators - Request
DisabledValidatorsfrom the runtime - request_
from_ runtime - Request some data from the
RuntimeApi. - request_
key_ ownership_ proof - Request
KeyOwnershipProoffrom the runtime - request_
min_ backing_ votes - Request
MinimumBackingVotesfrom the runtime - request_
node_ features - Request
NodeFeaturesfrom the runtime - request_
on_ chain_ votes - Request
FetchOnChainVotesfrom the runtime - request_
para_ backing_ state - Request
ParaBackingStatefrom the runtime - request_
para_ ids - Request
ParaIdsfrom the runtime - request_
persisted_ validation_ data - Request
PersistedValidationDatafrom the runtime - request_
runtime_ api_ version - Request
Versionfrom the runtime - request_
session_ executor_ params - Request
SessionExecutorParamsfrom the runtime - request_
session_ index_ for_ child - Request
SessionIndexForChildfrom the runtime - request_
session_ info - Request
SessionInfofrom the runtime - request_
submit_ report_ dispute_ lost - Request
SubmitReportDisputeLostfrom the runtime - request_
unapplied_ slashes - Request
UnappliedSlashesfrom the runtime - request_
validation_ code - Request
ValidationCodefrom the runtime - request_
validation_ code_ by_ hash - Request
ValidationCodeByHashfrom the runtime - request_
validation_ code_ hash - Request
ValidationCodeHashfrom the runtime - request_
validator_ groups - Request
ValidatorGroupsfrom the runtime - request_
validators - Request
Validatorsfrom the runtime - sign
- Sign the given data with the given validator ID.
- signing_
key - From the given set of validators, find the first key we can sign with, if any.
- signing_
key_ and_ index - From the given set of validators, find the first key we can sign with, if any, and return it along with the validator index.
Type Aliases§
- Runtime
ApiReceiver - A type alias for Runtime API receivers.