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_
ops - Chain utilities.
- client
- Substrate Client and associated logic.
- config
- Service configuration.
- error
- Errors that can occur during the service operation.
Structs§
- Build
Network Advanced Params - Parameters to pass into
build_network_advanced
. - Build
Network Params - Parameters to pass into
build_network
. - Default
Syncing Engine Config - Configuration for
build_default_syncing_engine
. - Generic
Chain Spec - A configuration of a chain. Can be used to build a genesis block.
- Genesis
Block Builder - Default genesis block builder in Substrate.
- Keystore
Container - Construct a local keystore shareable container
- Metrics
Service - A
MetricsService
periodically sends general client and network state to the telemetry as well as (optionally) a Prometheus endpoint. - Partial
Components - An incomplete set of chain components, but enough to run the chain ops subcommands.
- Random
Integer Subscription Id - Generates random integers as subscription ID.
- Random
String Subscription Id - Generates random strings of length
len
as subscription ID. - RpcHandlers
- A running RPC service that can perform in-memory RPC queries.
- Spawn
Essential Task Handle - 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. - Spawn
Task Handle - An handle for spawning tasks in the service.
- Spawn
Tasks Params - Parameters to pass into
build
. - Task
- Represents a running async task in the
TaskManager
. - Task
Manager - Helper struct to manage background/async tasks in Service.
- Task
Registry - Keeps track of all running
Task
s inTaskManager
. - Transaction
Pool Adapter - Transaction pool adapter.
- Transaction
Pool Options - Transaction pool options.
Enums§
- Blocks
Pruning - Block pruning settings.
- Chain
Type - The type of chain.
- Database
Source - Where to find the database..
- Pruning
Mode - Pruning mode.
- Role
- Role of the local node.
- RpcMethods
- Available RPC methods.
- Tracing
Receiver - Used to configure how to receive the metrics
- Warp
Sync Config - Warp sync configuration as accepted by
WarpSync
.
Constants§
- DEFAULT_
GROUP_ NAME - Default task group name.
Traits§
- Build
Genesis Block - Trait for building the genesis block.
- Chain
Spec - Common interface of a chain specification.
- Chain
Spec Extension - A collection of
ChainSpec
extensions. - Import
Queue - InPool
Transaction - In-pool transaction interface.
- Into
Pool Error - Transaction pool error conversion.
- Native
Execution Dispatch - Delegate for dispatching a CodeExecutor call.
- Transaction
Pool - Transaction pool interface.
Functions§
- build_
default_ block_ downloader - Build default block downloader
- build_
default_ syncing_ engine - Build default syncing engine using
build_default_block_downloader
andbuild_polkadot_syncing_strategy
internally. - build_
network - Build the network service, the network status sinks and an RPC sender.
- build_
network_ advanced - 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_
polkadot_ syncing_ strategy - Build standard polkadot syncing strategy
- build_
system_ rpc_ future - Builds a future that processes system RPC requests.
- construct_
genesis_ block - Create a genesis block, given the initial storage.
- gen_
rpc_ module - Generate RPC module using provided configuration
- init_
telemetry - Initialize telemetry with provided configuration and return telemetry handle
- new_
client - Create an instance of client backed by given backend.
- new_
db_ backend - Create an instance of default DB-backend backend.
- new_
full_ client - Creates a new full client for the given config.
- new_
full_ parts - Create the initial parts of a full node with the default genesis block builder.
- new_
full_ parts_ record_ import - Create the initial parts of a full node with the default genesis block builder.
- new_
full_ parts_ with_ genesis_ builder - Create the initial parts of a full node.
- new_
native_ or_ wasm_ executor Deprecated - Creates a
NativeElseWasmExecutor
according toConfiguration
. - new_
wasm_ executor - Creates a
WasmExecutor
according toExecutorConfiguration
. - propagate_
transaction_ notifications - Returns a future that forwards imported transactions to the transaction networking protocol.
- resolve_
state_ version_ from_ wasm - Return the state version given the genesis storage and executor.
- spawn_
tasks - Spawn the tasks that are required to run a node.
- start_
rpc_ servers - Starts RPC servers.
Type Aliases§
- NoExtension
- A type denoting empty extensions.
- Properties
- Arbitrary properties defined in chain spec as a JSON object
- TFull
Backend - Full client backend type.
- TFull
Call Executor - Full client call executor type.
- TFull
Client - Full client type.