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

Modules

chain_ops

Chain utilities.

config

Service configuration.

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.

Error

The Error type.

FullComponents

A struct that implement Components for the full client.

LightComponents

A struct that implement Components for the light client.

Roles

Bitmask of the roles that a node fulfills.

Service

Substrate service.

TransactionPool

Extrinsics pool.

TransactionPoolAdapter

Transaction pool adapter.

TransactionPoolOptions

Pool configuration options.

Enums

ErrorKind

The kind of an error.

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.

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.

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 a factory.

PoolApi

Extrinsic pool API type for Components.

Properties

Arbitrary properties defined in chain spec as a JSON object