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§
- 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 trait for subsystem. Database trait for polkadot db.
- An emulator for node-side code to predict the results of on-chain parachain inclusion and predict future constraints.
- This module reexports Prometheus types and defines the
Metricstrait. - Nested message sending
- These reexports are required so that external crates can use the
delegated_subsystemmacro properly. - A utility abstraction to collect and send reputation changes.
- Convenient and efficient runtime info access. Convenient interface to runtime information.
- Helpers for working with unreleased runtime calls Contains helpers for staging runtime calls.
Structs§
- Create a stream of ticks with a defined cycle duration.
- A future that wraps another future with a
Delayallowing for time-limited futures. - Local validator information
Enums§
- Utility errors
- An error type that describes faults that may happen
Constants§
- Capacity of channels to and from individual jobs
- Duration a job will wait after sending a stop signal before hard-aborting.
- The minimum amount of peers to send gossip messages to.
Traits§
- Extends
Futureto allow time-limited futures.
Functions§
- Choose a random subset of
minelements. But always includeis_priorityelements. - Choose a random subset of
minelements using a specific Random GeneratorRngBut always includeis_priorityelements. - Given a new chain-head hash, this determines the hashes of all new blocks we should track metadata for, given this head.
- 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 the validator group the given validator index belongs to.
- Returns a
boolwith a probability ofa / bof being true. - Returns a
boolwith a probability ofa / bof being true. - 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
AssumedValidationDatafrom the runtime - Request
AsyncBackingParamsfrom the runtime - Request
Authoritiesfrom the runtime - Request
AvailabilityCoresfrom the runtime - Request
CandidateEventsfrom the runtime - Request
CandidatePendingAvailabilityfrom the runtime - Request
DisabledValidatorsfrom the runtime - Request some data from the
RuntimeApi. - Request
KeyOwnershipProoffrom the runtime - Request
FetchOnChainVotesfrom the runtime - Request
PersistedValidationDatafrom the runtime - Request
Versionfrom the runtime - Request
SessionExecutorParamsfrom the runtime - Request
SessionIndexForChildfrom the runtime - Request
SessionInfofrom the runtime - Request
SubmitReportDisputeLostfrom the runtime - Request
UnappliedSlashesfrom the runtime - Request
ValidationCodefrom the runtime - Request
ValidationCodeByHashfrom the runtime - Request
ValidationCodeHashfrom the runtime - Request
ValidatorGroupsfrom the runtime - Request
Validatorsfrom the runtime - Sign the given data with the given validator ID.
- From the given set of validators, find the first key we can sign with, if any.
- 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§
- A type alias for Runtime API receivers.