[][src]Crate substrate_service

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::Configuration;
pub use transaction_pool::txpool;

Modules

chain_ops

Chain utilities.

config

Service configuration.

error

Errors that can occur during the service operation.

Macros

construct_service_factory

Constructs a service factory with the given name that implements the ServiceFactory trait. The required parameters are required to be given in the exact order. Some parameters are followed by {} blocks. These blocks are required and used to initialize the given parameter. In these block it is required to write a closure that takes the same number of arguments, the corresponding function in the ServiceFactory trait provides.

Structs

ChainSpec

A configuration of a chain. Can be used to build a genesis block.

FullComponents

A struct that implement Components for the full client.

LightComponents

A struct that implement Components for the light client.

NetworkStatus

Overview status of the network.

Roles

Bitmask of the roles that a node fulfills.

RpcSession

An RPC session. Used to perform in-memory RPC queries (ie. RPC queries that don't go through the HTTP or WebSockets server).

Service

Substrate service.

SpawnTaskHandle

An handle for spawning tasks in the service.

TelemetryOnConnect

Used to hook on telemetry connection established events.

TransactionPool

Extrinsics pool.

TransactionPoolAdapter

Transaction pool adapter.

TransactionPoolOptions

Pool configuration options.

Enums

PruningMode

Pruning mode.

Traits

ChainApi

Concrete extrinsic validation and query logic.

Components

A collection of types and function to generalize over full / light client type.

InitialSessionKeys

Something that can create and store initial session keys from given seeds.

IntoPoolError

Transaction pool error conversion.

RuntimeGenesis

A set of traits for the runtime genesis config.

ServiceFactory

A collection of types and methods to build a service on top of the substrate service.

Functions

new_client

Creates bare client without any networking.

Type Definitions

CodeExecutor

Code executor type for a factory.

ComponentBlock

Block type for Components

ComponentClient

Client type for Components.

ComponentExHash

Extrinsic hash type for Components

ComponentExtrinsic

Extrinsic type.

ComponentOffchainStorage

A offchain workers storage backend type.

FactoryBlock

Block type for a factory.

FactoryChainSpec

ChainSpec specialization for a factory.

FactoryExtrinsic

Extrinsic type for a factory.

FactoryFullConfiguration

Full Configuration type for a factory.

FactoryGenesis

Genesis specialization for a factory.

FinalityNotifications

A stream of block finality notifications.

FullBackend

Full client backend type for a factory.

FullClient

Full client type for a factory.

FullExecutor

Full client executor type for a factory.

LightBackend

Light client backend type for a factory.

LightClient

Light client type for a factory.

LightExecutor

Light client executor type for a factory.

NetworkService

Network service type for Components.

PoolApi

Extrinsic pool API type for Components.

Properties

Arbitrary properties defined in chain spec as a JSON object

TelemetryOnConnectNotifications

Stream of events for connection established to a telemetry server.