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_ops
Chain utilities.
client
Substrate Client and associated logic.
config
Service configuration.
error
Errors that can occur during the service operation.

Structs§

BuildNetworkAdvancedParams
Parameters to pass into build_network_advanced.
BuildNetworkParams
Parameters to pass into build_network.
DefaultSyncingEngineConfig
Configuration for build_default_syncing_engine.
GenericChainSpec
A configuration of a chain. Can be used to build a genesis block.
GenesisBlockBuilder
Default genesis block builder in Substrate.
KeystoreContainer
Construct a local keystore shareable container
MetricsService
A MetricsService periodically sends general client and network state to the telemetry as well as (optionally) a Prometheus endpoint.
PartialComponents
An incomplete set of chain components, but enough to run the chain ops subcommands.
RandomIntegerSubscriptionId
Generates random integers as subscription ID.
RandomStringSubscriptionId
Generates random strings of length len as subscription ID.
RpcHandlers
A running RPC service that can perform in-memory RPC queries.
SpawnEssentialTaskHandle
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.
SpawnTaskHandle
An handle for spawning tasks in the service.
SpawnTasksParams
Parameters to pass into build.
Task
Represents a running async task in the TaskManager.
TaskManager
Helper struct to manage background/async tasks in Service.
TaskRegistry
Keeps track of all running Tasks in TaskManager.
TransactionPoolAdapter
Transaction pool adapter.
TransactionPoolOptions
Transaction pool options.

Enums§

BlocksPruning
Block pruning settings.
ChainType
The type of chain.
DatabaseSource
Where to find the database..
PruningMode
Pruning mode.
Role
Role of the local node.
RpcMethods
Available RPC methods.
TracingReceiver
Used to configure how to receive the metrics
WarpSyncConfig
Warp sync configuration as accepted by WarpSync.

Constants§

DEFAULT_GROUP_NAME
Default task group name.

Traits§

BuildGenesisBlock
Trait for building the genesis block.
ChainSpec
Common interface of a chain specification.
ChainSpecExtension
A collection of ChainSpec extensions.
ImportQueue
InPoolTransaction
In-pool transaction interface.
IntoPoolError
Transaction pool error conversion.
NativeExecutionDispatch
Delegate for dispatching a CodeExecutor call.
TransactionPool
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 and build_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_executorDeprecated
Creates a NativeElseWasmExecutor according to Configuration.
new_wasm_executor
Creates a WasmExecutor according to ExecutorConfiguration.
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
TFullBackend
Full client backend type.
TFullCallExecutor
Full client call executor type.
TFullClient
Full client type.