[][src]Struct substrate_service::config::Configuration

pub struct Configuration<C, G> {
    pub impl_name: &'static str,
    pub impl_version: &'static str,
    pub impl_commit: &'static str,
    pub roles: Roles,
    pub transaction_pool: Options,
    pub network: NetworkConfiguration,
    pub keystore_path: PathBuf,
    pub database_path: PathBuf,
    pub database_cache_size: Option<u32>,
    pub state_cache_size: usize,
    pub state_cache_child_ratio: Option<usize>,
    pub pruning: PruningMode,
    pub chain_spec: ChainSpec<G>,
    pub custom: C,
    pub name: String,
    pub execution_strategies: ExecutionStrategies,
    pub rpc_http: Option<SocketAddr>,
    pub rpc_ws: Option<SocketAddr>,
    pub rpc_ws_max_connections: Option<usize>,
    pub rpc_cors: Option<Vec<String>>,
    pub telemetry_endpoints: Option<TelemetryEndpoints>,
    pub telemetry_external_transport: Option<ExtTransport>,
    pub default_heap_pages: Option<u64>,
    pub offchain_worker: bool,
    pub force_authoring: bool,
    pub disable_grandpa: bool,
    pub keystore_password: Option<Protected<String>>,
    pub dev_key_seed: Option<String>,
}

Service configuration.

Fields

impl_name: &'static str

Implementation name

impl_version: &'static str

Implementation version

impl_commit: &'static str

Git commit if any.

roles: Roles

Node roles.

transaction_pool: Options

Extrinsic pool configuration.

network: NetworkConfiguration

Network configuration.

keystore_path: PathBuf

Path to key files.

database_path: PathBuf

Path to the database.

database_cache_size: Option<u32>

Cache Size for internal database in MiB

state_cache_size: usize

Size of internal state cache in Bytes

state_cache_child_ratio: Option<usize>

Size in percent of cache size dedicated to child tries

pruning: PruningMode

Pruning settings.

chain_spec: ChainSpec<G>

Chain configuration.

custom: C

Custom configuration.

name: String

Node name.

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_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.

telemetry_endpoints: Option<TelemetryEndpoints>

Telemetry service URL. None if disabled.

telemetry_external_transport: Option<ExtTransport>

External WASM transport for the telemetry. If Some, when connection to a telemetry endpoint, this transport will be tried in priority before all others.

default_heap_pages: Option<u64>

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

offchain_worker: bool

Should offchain workers be executed.

force_authoring: bool

Enable authoring even when offline.

disable_grandpa: bool

Disable GRANDPA when running in validator mode

keystore_password: Option<Protected<String>>

Node keystore's password

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.

Methods

impl<C: Default, G: Serialize + DeserializeOwned + BuildStorage> Configuration<C, G>[src]

pub fn default_with_spec(chain_spec: ChainSpec<G>) -> Self[src]

Create default config for given chain spec.

pub fn full_version(&self) -> String[src]

Returns full version string of this configuration.

pub fn client_id(&self) -> String[src]

Implementation id and version.

Trait Implementations

impl<C: Clone, G: Clone> Clone for Configuration<C, G>[src]

Auto Trait Implementations

impl<C, G> Sync for Configuration<C, G> where
    C: Sync

impl<C, G> Send for Configuration<C, G> where
    C: Send

impl<C, G> Unpin for Configuration<C, G> where
    C: Unpin

impl<C, G> UnwindSafe for Configuration<C, G> where
    C: UnwindSafe

impl<C, G> RefUnwindSafe for Configuration<C, G> where
    C: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Erased for T[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded
[src]

impl<T> SaturatedConversion for T[src]

impl<T> CheckedConversion for T[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> Erased for T[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T> Typeable for T where
    T: Any
[src]