Struct sc_service::config::Configuration [−][src]
pub struct Configuration {Show 39 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 state_cache_size: usize,
pub state_cache_child_ratio: Option<usize>,
pub state_pruning: PruningMode,
pub keep_blocks: KeepBlocks,
pub transaction_storage: TransactionStorageMode,
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 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,
}Expand description
Service configuration.
Fields
impl_name: StringImplementation name
impl_version: StringImplementation version (see sc-cli to see an example of format)
role: RoleNode role.
tokio_handle: HandleHandle to the tokio runtime. Will be used to spawn futures by the task manager.
transaction_pool: TransactionPoolOptionsExtrinsic pool configuration.
network: NetworkConfigurationNetwork configuration.
keystore: KeystoreConfigConfiguration for the keystore.
keystore_remote: Option<String>Remote URI to connect to for async keystore support
database: DatabaseSourceConfiguration for the database.
state_cache_size: usizeSize of internal state cache in Bytes
state_cache_child_ratio: Option<usize>Size in percent of cache size dedicated to child tries
state_pruning: PruningModeState pruning settings.
keep_blocks: KeepBlocksNumber of blocks to keep in the db.
transaction_storage: TransactionStorageModeTransaction storage scheme.
chain_spec: Box<dyn ChainSpec>Chain configuration.
wasm_method: WasmExecutionMethodWasm 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: ExecutionStrategiesExecution 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: RpcMethodsRPC methods to expose (by default only a safe subset or all of them).
rpc_max_payload: Option<usize>Maximum payload of rpc request/responses.
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: OffchainWorkerConfigShould offchain workers be executed.
Enable authoring even when offline.
disable_grandpa: boolDisable 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: TracingReceiverTracing receiver
max_runtime_instances: usizeThe size of the instances cache.
The default value is 8.
announce_block: boolAnnounce block automatically after they have been imported
base_path: Option<BasePath>Base path of the configuration
informant_output_format: OutputFormatConfiguration of the output format that the informant uses.
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
Auto Trait Implementations
impl !RefUnwindSafe for Configuration
impl Send for Configuration
impl Sync for Configuration
impl Unpin for Configuration
impl !UnwindSafe for Configuration
Blanket Implementations
Mutably borrows from an owned value. Read more
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
Causes self to use its Binary implementation when Debug-formatted.
Causes self to use its Display implementation when
Debug-formatted. Read more
Causes self to use its LowerExp implementation when
Debug-formatted. Read more
Causes self to use its LowerHex implementation when
Debug-formatted. Read more
Causes self to use its Octal implementation when Debug-formatted.
Causes self to use its Pointer implementation when
Debug-formatted. Read more
Causes self to use its UpperExp implementation when
Debug-formatted. Read more
Causes self to use its UpperHex implementation when
Debug-formatted. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe
function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe
function. Read more
Borrows self, then passes self.deref() into the pipe function.
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
Pipes a dereference into a function that cannot normally be called in suffix position. Read more
Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release
builds. Read more
Calls .tap_borrow() only in debug builds, and is erased in release
builds. Read more
Calls .tap_borrow_mut() only in debug builds, and is erased in release
builds. Read more
Calls .tap_ref() only in debug builds, and is erased in release
builds. Read more
Calls .tap_ref_mut() only in debug builds, and is erased in release
builds. Read more
Calls .tap_deref() only in debug builds, and is erased in release
builds. Read more
Provides immutable access to the reference for inspection.
Calls tap_ref in debug builds, and does nothing in release builds.
Provides mutable access to the reference for modification.
Calls tap_ref_mut in debug builds, and does nothing in release builds.
Provides immutable access to the borrow for inspection. Read more
Calls tap_borrow in debug builds, and does nothing in release builds.
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Provides mutable access to the borrow for modification.
Immutably dereferences self for inspection.
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Calls tap_deref in debug builds, and does nothing in release builds.
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Mutably dereferences self for modification.
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