Struct sc_cli::RunCmd

source ·
pub struct RunCmd {
Show 41 fields pub validator: bool, pub no_grandpa: 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 rpc_max_request_size: Option<usize>, pub rpc_max_response_size: Option<usize>, pub rpc_max_subscriptions_per_connection: 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 ws_max_out_buffer_capacity: 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 runtime_cache_size: u8, 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.

§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://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs. 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.

  • unsafe: Exposes every RPC method.
  • safe: Exposes only a safe subset of RPC methods, denying unsafe RPC methods.
  • auto: Acts as safe if RPC is served externally, e.g. when --{rpc,ws}-external is passed, otherwise acts as unsafe.
§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://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs. 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>

DEPRECATED, this has no affect anymore. Use rpc_max_request_size or rpc_max_response_size instead.

§rpc_max_request_size: Option<usize>

Set the the maximum RPC request payload size for both HTTP and WS in megabytes. Default is 15MiB.

§rpc_max_response_size: Option<usize>

Set the the maximum RPC response payload size for both HTTP and WS in megabytes. Default is 15MiB.

§rpc_max_subscriptions_per_connection: Option<usize>

Set the the maximum concurrent subscriptions per connection. Default is 1024.

§prometheus_external: bool

Expose Prometheus exporter on all interfaces.

Default is local.

§ipc_path: Option<String>

DEPRECATED, IPC support has been removed.

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

§ws_max_out_buffer_capacity: Option<usize>

DEPRECATED, this has no affect anymore. Use rpc_max_response_size instead.

§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: OffchainWorkerParams§shared_params: SharedParams§import_params: ImportParams§network_params: NetworkParams§pool_config: TransactionPoolParams§alice: 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: KeystoreParams§max_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.

§runtime_cache_size: u8

Maximum number of different runtimes that can be cached.

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

When --dev is given and no explicit --base-path, this option is implied.

Implementations§

Get the Sr25519Keyring matching one of the flag.

Trait Implementations§

Append to Command so it can instantiate Self. Read more
Append to Command so it can update self. Read more
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 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 maximum RPC request payload size.
Get maximum RPC response payload size.
Get maximum number of subscriptions per connection.
Get maximum WS output buffer capacity.
Get the transaction pool options Read more
Get maximum runtime instances Read more
Get maximum different runtimes in cache 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 backend variant. Read more
Get the database configuration object for the parameters provided
Get the trie cache maximum size. 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 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
Should the detailed log output be enabled.
Is log reloading enabled?
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
👎Deprecated since 3.1.0: Replaced with `CommandFactory::command
Deprecated, replaced with CommandFactory::command
👎Deprecated since 3.1.0: Replaced with `CommandFactory::command_for_update
Deprecated, replaced with CommandFactory::command_for_update
Build a Command that can instantiate Self. Read more
Build a Command that can update self. Read more
Formats the value using the given formatter. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Assign values from ArgMatches to self.
Assign values from ArgMatches to self.
Parse from std::env::args_os(), exit on error
Parse from std::env::args_os(), return Err on error.
Parse from iterator, exit on error
Parse from iterator, return Err on error.
Update from iterator, exit on error
Update from iterator, return Err on error.

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
Converts self into T using Into<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
Causes self to use its Binary implementation when Debug-formatted. Read more
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. Read more
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
Formats each item in a sequence. 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.

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.
Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more
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
Immutable access to a value. Read more
Mutable access to a value. 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
Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Attempts to convert self into T using TryInto<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