Crate sc_service[][src]

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::RpcMethods;
pub use config::TaskType;

Modules

Chain utilities.

Substrate Client and associated logic.

Service configuration.

Errors that can occur during the service operation.

Structs

Parameters to pass into build_network.

Relevant client configuration items relevant for the client.

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

Construct and hold different layers of Keystore wrappers

Call executor that executes methods locally, querying all required data from local backend.

Object used to start the network.

A utility struct for implementing an RpcExtensionBuilder given a cloneable RpcExtension, the resulting builder will simply ignore the provided DenyUnsafe instance and return a static RpcExtension instance.

An incomplete set of chain components, but enough to run the chain ops subcommands.

RPC handlers that can perform RPC queries.

RPC Metadata.

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

An handle for spawning tasks in the service.

Parameters to pass into build.

Helper struct to manage background/async tasks in Service.

Transaction pool adapter.

Pool configuration options.

Enums

The type of a chain.

Where to find the database..

Block pruning settings.

Pruning mode.

Role of the local node.

Used to configure how to receive the metrics

Block body storage scheme.

Traits

Common interface of a chain specification.

A collection of ChainSpec extensions.

Blocks import queue API.

In-pool transaction interface.

Transaction pool error conversion.

Delegate for dispatching a CodeExecutor call.

A utility trait for building an RPC extension given a DenyUnsafe instance. This is useful since at service definition time we don’t know whether the specific interface where the RPC extension will be exposed is safe or not. This trait allows us to lazily build the RPC extension whenever we bind the service to an interface.

A set of traits for the runtime genesis config.

Transaction pool interface.

Functions

Build the network service, the network status sinks and an RPC sender.

Build a shared offchain workers instance.

Create an instance of client backed by given backend.

Create an instance of default DB-backend backend.

Creates a new full client for the given config.

Create the initial parts of a full node.

Create the initial parts of a light node.

Spawn the tasks that are required to run a node.

Type Definitions

A type denoting empty extensions.

Arbitrary properties defined in chain spec as a JSON object

Full client backend type.

Full client call executor type.

Full client type.

Light client backend type.

Light client backend type with a specific hash type.

Light call executor type.

Light client type.

Light client type with a specific backend.