pub struct Configuration {
Show 42 fields pub impl_name: String, pub impl_version: String, pub role: Role, pub tokio_handle: Handle, pub transaction_pool: TransactionPoolOptions, pub network: NetworkConfiguration, pub keystore: KeystoreConfig, pub keystore_remote: Option<String>, pub database: DatabaseSource, pub trie_cache_maximum_size: Option<usize>, pub state_pruning: Option<PruningMode>, pub blocks_pruning: BlocksPruning, pub chain_spec: Box<dyn ChainSpec>, pub wasm_method: WasmExecutionMethod, pub wasm_runtime_overrides: Option<PathBuf>, pub execution_strategies: ExecutionStrategies, pub rpc_http: Option<SocketAddr>, pub rpc_ws: Option<SocketAddr>, pub rpc_ipc: Option<String>, pub rpc_ws_max_connections: Option<usize>, pub rpc_cors: Option<Vec<String>>, pub rpc_methods: RpcMethods, pub rpc_max_payload: Option<usize>, pub rpc_max_request_size: Option<usize>, pub rpc_max_response_size: Option<usize>, pub rpc_id_provider: Option<Box<dyn RpcSubscriptionIdProvider>>, pub rpc_max_subs_per_conn: Option<usize>, pub ws_max_out_buffer_capacity: Option<usize>, pub prometheus_config: Option<PrometheusConfig>, pub telemetry_endpoints: Option<TelemetryEndpoints>, pub default_heap_pages: Option<u64>, pub offchain_worker: OffchainWorkerConfig, pub force_authoring: bool, pub disable_grandpa: bool, pub dev_key_seed: Option<String>, pub tracing_targets: Option<String>, pub tracing_receiver: TracingReceiver, pub max_runtime_instances: usize, pub announce_block: bool, pub base_path: Option<BasePath>, pub informant_output_format: OutputFormat, pub runtime_cache_size: u8,
}
Expand description

Service configuration.

Fields

impl_name: String

Implementation name

impl_version: String

Implementation version (see sc-cli to see an example of format)

role: Role

Node role.

tokio_handle: Handle

Handle to the tokio runtime. Will be used to spawn futures by the task manager.

transaction_pool: TransactionPoolOptions

Extrinsic pool configuration.

network: NetworkConfiguration

Network configuration.

keystore: KeystoreConfig

Configuration for the keystore.

keystore_remote: Option<String>

Remote URI to connect to for async keystore support

database: DatabaseSource

Configuration for the database.

trie_cache_maximum_size: Option<usize>

Maximum size of internal trie cache in bytes.

If None is given the cache is disabled.

state_pruning: Option<PruningMode>

State pruning settings.

blocks_pruning: BlocksPruning

Number of blocks to keep in the db.

NOTE: only finalized blocks are subject for removal!

chain_spec: Box<dyn ChainSpec>

Chain configuration.

wasm_method: WasmExecutionMethod

Wasm execution method.

wasm_runtime_overrides: Option<PathBuf>

Directory where local WASM runtimes live. These runtimes take precedence over on-chain runtimes when the spec version matches. Set to None to disable overrides (default).

execution_strategies: ExecutionStrategies

Execution strategies.

rpc_http: Option<SocketAddr>

RPC over HTTP binding address. None if disabled.

rpc_ws: Option<SocketAddr>

RPC over Websockets binding address. None if disabled.

rpc_ipc: Option<String>

RPC over IPC binding path. None if disabled.

rpc_ws_max_connections: Option<usize>

Maximum number of connections for WebSockets RPC server. None if default.

rpc_cors: Option<Vec<String>>

CORS settings for HTTP & WS servers. None if all origins are allowed.

rpc_methods: RpcMethods

RPC methods to expose (by default only a safe subset or all of them).

rpc_max_payload: Option<usize>

Maximum payload of rpc request/responses.

rpc_max_request_size: Option<usize>

Maximum payload of a rpc request

rpc_max_response_size: Option<usize>

Maximum payload of a rpc request

rpc_id_provider: Option<Box<dyn RpcSubscriptionIdProvider>>

Custom JSON-RPC subscription ID provider.

Default: crate::RandomStringSubscriptionId.

rpc_max_subs_per_conn: Option<usize>

Maximum allowed subscriptions per rpc connection

Default: 1024.

ws_max_out_buffer_capacity: Option<usize>

Maximum size of the output buffer capacity for websocket connections.

prometheus_config: Option<PrometheusConfig>

Prometheus endpoint configuration. None if disabled.

telemetry_endpoints: Option<TelemetryEndpoints>

Telemetry service URL. None if disabled.

default_heap_pages: Option<u64>

The default number of 64KB pages to allocate for Wasm execution

offchain_worker: OffchainWorkerConfig

Should offchain workers be executed.

force_authoring: bool

Enable authoring even when offline.

disable_grandpa: bool

Disable GRANDPA when running in validator mode

dev_key_seed: Option<String>

Development key seed.

When running in development mode, the seed will be used to generate authority keys by the keystore.

Should only be set when node is running development mode.

tracing_targets: Option<String>

Tracing targets

tracing_receiver: TracingReceiver

Tracing receiver

max_runtime_instances: usize

The size of the instances cache.

The default value is 8.

announce_block: bool

Announce block automatically after they have been imported

base_path: Option<BasePath>

Base path of the configuration

informant_output_format: OutputFormat

Configuration of the output format that the informant uses.

runtime_cache_size: u8

Maximum number of different runtime versions that can be cached.

Implementations

Returns a string displaying the node role.

Returns the prometheus metrics registry, if available.

Returns the network protocol id from the chain spec, or the default.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert from a value of T into an equivalent instance of Option<Self>. Read more

Consume self to return Some equivalent value of Option<T>. Read more

Deserializes using the given deserializer

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type for metadata in pointers and references to Self.

Should always be Self

Convert from a value of T into an equivalent instance of Self. Read more

Consume self to return an equivalent value of T. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The counterpart to unchecked_from.

Consume self to return an equivalent value of T.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more