Crate sc_service

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::error::Error;
pub use config::BasePath;
pub use config::Configuration;
pub use config::TaskType;

Modules§

chain_ops
Chain utilities.
config
Service configuration.
error
Errors that can occur during the service operation.

Structs§

BuildNetworkParams
Parameters to pass into build_network.
ClientConfig
Client configuration items.
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
LocalCallExecutor
Call executor that executes methods locally, querying all required data from local backend.
MetricsService
A MetricsService periodically sends general client and network state to the telemetry as well as (optionally) a Prometheus endpoint.
NetworkStarter
Object used to start the network.
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.
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
Pool configuration 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_network
Build the network service, the network status sinks and an RPC sender.
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.