Crate sc_service
source ·Expand description
Substrate service. Starts a thread that spins up the network, client, and extrinsic pool. Manages communication between them.
Re-exports§
pub use self::client::ClientConfig;
pub use self::client::LocalCallExecutor;
pub use self::error::Error;
pub use config::BasePath;
pub use config::Configuration;
pub use config::TaskType;
Modules§
- Chain utilities.
- Substrate Client and associated logic.
- Service configuration.
- Errors that can occur during the service operation.
Structs§
- Parameters to pass into
build_network_advanced
. - Parameters to pass into
build_network
. - Configuration for
build_default_syncing_engine
. - A configuration of a chain. Can be used to build a genesis block.
- Default genesis block builder in Substrate.
- Construct a local keystore shareable container
- A
MetricsService
periodically sends general client and network state to the telemetry as well as (optionally) a Prometheus endpoint. - An incomplete set of chain components, but enough to run the chain ops subcommands.
- Generates random integers as subscription ID.
- Generates random strings of length
len
as subscription ID. - A running RPC service that can perform in-memory RPC queries.
- A wrapper over
SpawnTaskHandle
that will notify a receiver whenever any task spawned through it fails. The service should be on the receiver side and will shut itself down whenever it receives any message, i.e. an essential task has failed. - An handle for spawning tasks in the service.
- Parameters to pass into
build
. - Represents a running async task in the
TaskManager
. - Helper struct to manage background/async tasks in Service.
- Keeps track of all running
Task
s inTaskManager
. - Transaction pool adapter.
- Transaction pool options.
Enums§
- Block pruning settings.
- The type of chain.
- Where to find the database..
- Pruning mode.
- Role of the local node.
- Available RPC methods.
- Used to configure how to receive the metrics
- Warp sync configuration as accepted by
WarpSync
.
Constants§
- Default task group name.
Traits§
- Trait for building the genesis block.
- Common interface of a chain specification.
- A collection of
ChainSpec
extensions. - In-pool transaction interface.
- Transaction pool error conversion.
- Delegate for dispatching a CodeExecutor call.
- Transaction pool interface.
Functions§
- Build default block downloader
- Build default syncing engine using
build_default_block_downloader
andbuild_polkadot_syncing_strategy
internally. - Build the network service, the network status sinks and an RPC sender.
- Build the network service, the network status sinks and an RPC sender, this is a lower-level version of
build_network
for those needing more control. - Build standard polkadot syncing strategy
- Builds a future that processes system RPC requests.
- Create a genesis block, given the initial storage.
- Generate RPC module using provided configuration
- Initialize telemetry with provided configuration and return telemetry handle
- Create an instance of client backed by given backend.
- Create an instance of default DB-backend backend.
- Creates a new full client for the given config.
- Create the initial parts of a full node with the default genesis block builder.
- Create the initial parts of a full node with the default genesis block builder.
- Create the initial parts of a full node.
- new_native_or_wasm_executorDeprecatedCreates a
NativeElseWasmExecutor
according toConfiguration
. - Creates a
WasmExecutor
according toExecutorConfiguration
. - Returns a future that forwards imported transactions to the transaction networking protocol.
- Return the state version given the genesis storage and executor.
- Spawn the tasks that are required to run a node.
- Starts RPC servers.
Type Aliases§
- A type denoting empty extensions.
- Arbitrary properties defined in chain spec as a JSON object
- Full client backend type.
- Full client call executor type.
- Full client type.