Struct sc_cli::RunCmd[][src]

pub struct RunCmd {
Show fields pub validator: bool, pub no_grandpa: bool, pub light: bool, pub rpc_external: bool, pub unsafe_rpc_external: bool, pub rpc_methods: RpcMethods, pub ws_external: bool, pub unsafe_ws_external: bool, pub rpc_max_payload: Option<usize>, pub prometheus_external: bool, pub ipc_path: Option<String>, pub rpc_port: Option<u16>, pub ws_port: Option<u16>, pub ws_max_connections: Option<usize>, pub rpc_http_threads: Option<usize>, pub rpc_cors: Option<Cors>, pub prometheus_port: Option<u16>, pub no_prometheus: bool, pub name: Option<String>, pub no_telemetry: bool, pub telemetry_endpoints: Vec<(String, u8)>, pub offchain_worker_params: OffchainWorkerParams, pub shared_params: SharedParams, pub import_params: ImportParams, pub network_params: NetworkParams, pub pool_config: TransactionPoolParams, pub alice: bool, pub bob: bool, pub charlie: bool, pub dave: bool, pub eve: bool, pub ferdie: bool, pub one: bool, pub two: bool, pub force_authoring: bool, pub keystore_params: KeystoreParams, pub max_runtime_instances: Option<usize>, pub tmp: bool,
}
Expand description

The run command used to run a node.

Fields

validator: bool

Enable validator mode.

The node will be started with the authority role and actively participate in any consensus task that it can (e.g. depending on availability of local keys).

no_grandpa: bool

Disable GRANDPA voter when running in validator mode, otherwise disable the GRANDPA observer.

light: bool

Experimental: Run in light client mode.

rpc_external: bool

Listen to all RPC interfaces.

Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: https://github.com/paritytech/substrate/wiki/Public-RPC. Use --unsafe-rpc-external to suppress the warning if you understand the risks.

unsafe_rpc_external: bool

Listen to all RPC interfaces.

Same as --rpc-external.

rpc_methods: RpcMethods

RPC methods to expose.

ws_external: bool

Listen to all Websocket interfaces.

Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: https://github.com/paritytech/substrate/wiki/Public-RPC. Use --unsafe-ws-external to suppress the warning if you understand the risks.

unsafe_ws_external: bool

Listen to all Websocket interfaces.

Same as --ws-external but doesn’t warn you about it.

rpc_max_payload: Option<usize>

Set the the maximum RPC payload size for both requests and responses (both http and ws), in megabytes. Default is 15MiB.

prometheus_external: bool

Expose Prometheus exporter on all interfaces.

Default is local.

ipc_path: Option<String>

Specify IPC RPC server path

rpc_port: Option<u16>

Specify HTTP RPC server TCP port.

ws_port: Option<u16>

Specify WebSockets RPC server TCP port.

ws_max_connections: Option<usize>

Maximum number of WS RPC server connections.

rpc_http_threads: Option<usize>

Size of the RPC HTTP server thread pool.

rpc_cors: Option<Cors>

Specify browser Origins allowed to access the HTTP & WS RPC servers.

A comma-separated list of origins (protocol://domain or special null value). Value of all will disable origin validation. Default is to allow localhost and https://polkadot.js.org origins. When running in –dev mode the default is to allow all origins.

prometheus_port: Option<u16>

Specify Prometheus exporter TCP Port.

no_prometheus: bool

Do not expose a Prometheus exporter endpoint.

Prometheus metric endpoint is enabled by default.

name: Option<String>

The human-readable name for this node.

The node name will be reported to the telemetry server, if enabled.

no_telemetry: bool

Disable connecting to the Substrate telemetry server.

Telemetry is on by default on global chains.

telemetry_endpoints: Vec<(String, u8)>

The URL of the telemetry server to connect to.

This flag can be passed multiple times as a means to specify multiple telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting the least verbosity. Expected format is ‘URL VERBOSITY’, e.g. --telemetry-url 'wss://foo/bar 0'.

offchain_worker_params: OffchainWorkerParamsshared_params: SharedParamsimport_params: ImportParamsnetwork_params: NetworkParamspool_config: TransactionPoolParamsalice: bool

Shortcut for --name Alice --validator with session keys for Alice added to keystore.

bob: bool

Shortcut for --name Bob --validator with session keys for Bob added to keystore.

charlie: bool

Shortcut for --name Charlie --validator with session keys for Charlie added to keystore.

dave: bool

Shortcut for --name Dave --validator with session keys for Dave added to keystore.

eve: bool

Shortcut for --name Eve --validator with session keys for Eve added to keystore.

ferdie: bool

Shortcut for --name Ferdie --validator with session keys for Ferdie added to keystore.

one: bool

Shortcut for --name One --validator with session keys for One added to keystore.

two: bool

Shortcut for --name Two --validator with session keys for Two added to keystore.

force_authoring: bool

Enable authoring even when offline.

keystore_params: KeystoreParamsmax_runtime_instances: Option<usize>

The size of the instances cache for each runtime.

The default value is 8 and the values higher than 256 are ignored.

tmp: bool

Run a temporary node.

A temporary directory will be created to store the configuration and will be deleted at the end of the process.

Note: the directory is random per process execution. This directory is used as base path which includes: database, node key and keystore.

Implementations

Get the Sr25519Keyring matching one of the flag.

Trait Implementations

Get the SharedParams for this object

Get the ImportParams for this object

Get the NetworkParams for this object

Get the KeystoreParams for this object

Get a reference to OffchainWorkerParams for this object.

Get the name of the node. Read more

Get the development key seed from the current object Read more

Get the telemetry endpoints (if any) Read more

Gets the role Read more

Returns Ok(true) if authoring should be forced Read more

Get the prometheus configuration (None if disabled) Read more

Returns Ok(true) if grandpa should be disabled Read more

Get the RPC websockets maximum connections (None if unlimited). Read more

Get the RPC HTTP thread pool size (None for a default 4-thread pool config). Read more

Get the RPC cors (None if disabled) Read more

Get the RPC HTTP address (None if disabled). Read more

Get the RPC IPC path (None if disabled). Read more

Get the RPC websocket address (None if disabled). Read more

Returns the RPC method set to expose. Read more

Get maximum RPC payload.

Get the transaction pool options Read more

Get maximum runtime instances Read more

Get the base path of the configuration (if any) Read more

Get the PruningParams for this object

Get the NodeKeyParams for this object

Get the DatabaseParams for this object

Returns true if the node is for development or not Read more

Get the network configuration Read more

Get the keystore configuration. Read more

Get the database cache size. Read more

Get the database transaction storage scheme.

Get the database backend variant. Read more

Get the database configuration object for the parameters provided

Get the state cache size. Read more

Get the state cache child ratio (if any). Read more

Get the state pruning mode. Read more

Get the block pruning mode. Read more

Get the chain ID (string). Read more

Get the WASM execution method. Read more

Get the path where WASM overrides live. Read more

Get the execution strategies. Read more

Get the telemetry external transport Read more

Get the default value for heap pages Read more

Returns an offchain worker config wrapped in Ok(_) Read more

Get the tracing targets from the current object (if any) Read more

Get the TracingReceiver value from the current object Read more

Get the node key from the current object Read more

Activate or not the automatic announcing of blocks after import Read more

Create a Configuration object from the current object

Get the filters for the logging. Read more

Is log reloading disabled (enabled by default)

Should the log color output be disabled?

Initialize substrate. This must be done only once per process. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns clap::App corresponding to the struct.

Builds the struct from clap::ArgMatches. It’s guaranteed to succeed if matches originates from an App generated by [StructOpt::clap] called on the same type, otherwise it must panic. Read more

Builds the struct from the command line arguments (std::env::args_os). Calls clap::Error::exit on failure, printing the error message and aborting the program. Read more

Builds the struct from the command line arguments (std::env::args_os). Unlike [StructOpt::from_args], returns clap::Error on failure instead of aborting the program, so calling .exit is up to you. Read more

Gets the struct from any iterator such as a Vec of your making. Print the error message and quit the program in case of failure. Read more

Gets the struct from any iterator such as a Vec of your making. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

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

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

Performs the conversion.

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

Performs the conversion.

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

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. 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