Struct sc_cli::RunCmd [−][src]
pub struct RunCmd {Show fields
    pub validator: bool,
    pub sentry: Vec<MultiaddrWithPeerId>,
    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 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_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 sentry_nodes: Vec<MultiaddrWithPeerId>,
    pub tmp: bool,
}The run command used to run a node.
Fields
validator: boolEnable 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).
sentry: Vec<MultiaddrWithPeerId>Enable sentry mode.
The node will be started with the authority role and participate in consensus tasks as an “observer”, it will never actively participate regardless of whether it could (e.g. keys are available locally). This mode is useful as a secure proxy for validators (which would run detached from the network), since we want this node to participate in the full consensus protocols in order to have all needed consensus data available to relay to private nodes.
no_grandpa: boolDisable GRANDPA voter when running in validator mode, otherwise disable the GRANDPA observer.
light: boolExperimental: Run in light client mode.
rpc_external: boolListen 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: boolListen to all RPC interfaces.
Same as --rpc-external.
rpc_methods: RpcMethodsRPC methods to expose.
- Unsafe: Exposes every RPC method.
- Safe: Exposes only a safe subset of RPC methods, denying unsafe RPC methods.
- Auto: Acts as- Safeif RPC is served externally, e.g. when- --{rpc,ws}-externalis passed, otherwise acts as- Unsafe.
ws_external: boolListen 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: boolListen to all Websocket interfaces.
Same as --ws-external but doesn’t warn you about it.
prometheus_external: boolListen to all Prometheus data source 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_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 data source server TCP Port.
no_prometheus: boolDo not expose a Prometheus metric 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: boolDisable 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: OffchainWorkerParamsimport_params: ImportParamsnetwork_params: NetworkParamspool_config: TransactionPoolParamsalice: boolShortcut for --name Alice --validator with session keys for Alice added to keystore.
bob: boolShortcut for --name Bob --validator with session keys for Bob added to keystore.
charlie: boolShortcut for --name Charlie --validator with session keys for Charlie added to keystore.
dave: boolShortcut for --name Dave --validator with session keys for Dave added to keystore.
eve: boolShortcut for --name Eve --validator with session keys for Eve added to keystore.
ferdie: boolShortcut for --name Ferdie --validator with session keys for Ferdie added to keystore.
one: boolShortcut for --name One --validator with session keys for One added to keystore.
two: boolShortcut for --name Two --validator with session keys for Two added to keystore.
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.
sentry_nodes: Vec<MultiaddrWithPeerId>Specify a list of sentry node public addresses.
Can’t be used with –public-addr as the sentry node would take precedence over the public address specified there.
tmp: boolRun 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
impl RunCmd[src]
impl RunCmd[src]pub fn get_keyring(&self) -> Option<Sr25519Keyring>[src]
Get the Sr25519Keyring matching one of the flag.
Trait Implementations
impl CliConfiguration<()> for RunCmd[src]
impl CliConfiguration<()> for RunCmd[src]fn shared_params(&self) -> &SharedParams[src]
fn import_params(&self) -> Option<&ImportParams>[src]
fn network_params(&self) -> Option<&NetworkParams>[src]
fn keystore_params(&self) -> Option<&KeystoreParams>[src]
fn offchain_worker_params(&self) -> Option<&OffchainWorkerParams>[src]
fn node_name(&self) -> Result<String>[src]
fn dev_key_seed(&self, is_dev: bool) -> Result<Option<String>>[src]
fn telemetry_endpoints(
    &self, 
    chain_spec: &Box<dyn ChainSpec>
) -> Result<Option<TelemetryEndpoints>>[src]
&self,
chain_spec: &Box<dyn ChainSpec>
) -> Result<Option<TelemetryEndpoints>>
fn role(&self, is_dev: bool) -> Result<Role>[src]
fn force_authoring(&self) -> Result<bool>[src]
fn prometheus_config(
    &self, 
    default_listen_port: u16
) -> Result<Option<PrometheusConfig>>[src]
&self,
default_listen_port: u16
) -> Result<Option<PrometheusConfig>>
fn disable_grandpa(&self) -> Result<bool>[src]
fn rpc_ws_max_connections(&self) -> Result<Option<usize>>[src]
fn rpc_cors(&self, is_dev: bool) -> Result<Option<Vec<String>>>[src]
fn rpc_http(&self, default_listen_port: u16) -> Result<Option<SocketAddr>>[src]
fn rpc_ipc(&self) -> Result<Option<String>>[src]
fn rpc_ws(&self, default_listen_port: u16) -> Result<Option<SocketAddr>>[src]
fn rpc_methods(&self) -> Result<RpcMethods>[src]
fn transaction_pool(&self) -> Result<TransactionPoolOptions>[src]
fn max_runtime_instances(&self) -> Result<Option<usize>>[src]
fn base_path(&self) -> Result<Option<BasePath>>[src]
fn pruning_params(&self) -> Option<&PruningParams>[src]
fn node_key_params(&self) -> Option<&NodeKeyParams>[src]
fn database_params(&self) -> Option<&DatabaseParams>[src]
fn is_dev(&self) -> Result<bool>[src]
fn network_config(
    &self, 
    chain_spec: &Box<dyn ChainSpec>, 
    is_dev: bool, 
    net_config_dir: PathBuf, 
    client_id: &str, 
    node_name: &str, 
    node_key: NodeKeyConfig, 
    default_listen_port: u16
) -> Result<NetworkConfiguration>[src]
&self,
chain_spec: &Box<dyn ChainSpec>,
is_dev: bool,
net_config_dir: PathBuf,
client_id: &str,
node_name: &str,
node_key: NodeKeyConfig,
default_listen_port: u16
) -> Result<NetworkConfiguration>
fn keystore_config(
    &self, 
    config_dir: &PathBuf
) -> Result<(Option<String>, KeystoreConfig)>[src]
&self,
config_dir: &PathBuf
) -> Result<(Option<String>, KeystoreConfig)>
fn database_cache_size(&self) -> Result<Option<usize>>[src]
fn database_transaction_storage(&self) -> Result<TransactionStorageMode>[src]
fn database(&self) -> Result<Option<Database>>[src]
fn database_config(
    &self, 
    base_path: &PathBuf, 
    cache_size: usize, 
    database: Database
) -> Result<DatabaseConfig>[src]
&self,
base_path: &PathBuf,
cache_size: usize,
database: Database
) -> Result<DatabaseConfig>
fn state_cache_size(&self) -> Result<usize>[src]
fn state_cache_child_ratio(&self) -> Result<Option<usize>>[src]
fn state_pruning(
    &self, 
    unsafe_pruning: bool, 
    role: &Role
) -> Result<PruningMode>[src]
&self,
unsafe_pruning: bool,
role: &Role
) -> Result<PruningMode>
fn keep_blocks(&self) -> Result<KeepBlocks>[src]
fn chain_id(&self, is_dev: bool) -> Result<String>[src]
fn wasm_method(&self) -> Result<WasmExecutionMethod>[src]
fn wasm_runtime_overrides(&self) -> Option<PathBuf>[src]
fn execution_strategies(
    &self, 
    is_dev: bool, 
    is_validator: bool
) -> Result<ExecutionStrategies>[src]
&self,
is_dev: bool,
is_validator: bool
) -> Result<ExecutionStrategies>
fn telemetry_external_transport(&self) -> Result<Option<ExtTransport>>[src]
fn default_heap_pages(&self) -> Result<Option<u64>>[src]
fn offchain_worker(&self, role: &Role) -> Result<OffchainWorkerConfig>[src]
fn tracing_targets(&self) -> Result<Option<String>>[src]
fn tracing_receiver(&self) -> Result<TracingReceiver>[src]
fn node_key(&self, net_config_dir: &PathBuf) -> Result<NodeKeyConfig>[src]
fn announce_block(&self) -> Result<bool>[src]
fn create_configuration<C: SubstrateCli>(
    &self, 
    cli: &C, 
    task_executor: TaskExecutor, 
    telemetry_handle: Option<TelemetryHandle>
) -> Result<Configuration>[src]
&self,
cli: &C,
task_executor: TaskExecutor,
telemetry_handle: Option<TelemetryHandle>
) -> Result<Configuration>
fn log_filters(&self) -> Result<String>[src]
fn is_log_filter_reloading_disabled(&self) -> Result<bool>[src]
fn disable_log_color(&self) -> Result<bool>[src]
fn init<C: SubstrateCli>(&self) -> Result<TelemetryWorker>[src]
impl StructOpt for RunCmd[src]
impl StructOpt for RunCmd[src]fn clap<'a, 'b>() -> App<'a, 'b>[src]
fn from_clap(matches: &ArgMatches<'_>) -> Self[src]
pub fn from_args() -> Self[src]
pub fn from_args_safe() -> Result<Self, Error>[src]
pub fn from_iter<I>(iter: I) -> Self where
    I: IntoIterator,
    <I as IntoIterator>::Item: Into<OsString>,
    <I as IntoIterator>::Item: Clone, [src]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
pub fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
    I: IntoIterator,
    <I as IntoIterator>::Item: Into<OsString>,
    <I as IntoIterator>::Item: Clone, [src]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
impl StructOptInternal for RunCmd[src]
impl StructOptInternal for RunCmd[src]fn augment_clap<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b>[src]
fn is_subcommand() -> bool[src]
pub fn from_subcommand(
    _sub: (&'b str, Option<&'b ArgMatches<'a>>)
) -> Option<Self>[src]
_sub: (&'b str, Option<&'b ArgMatches<'a>>)
) -> Option<Self>
Auto Trait Implementations
impl RefUnwindSafe for RunCmd
impl Send for RunCmd
impl Sync for RunCmd
impl Unpin for RunCmd
impl UnwindSafe for RunCmd
Blanket Implementations
impl<T> CheckedConversion for T[src]
impl<T> CheckedConversion for T[src]pub fn checked_from<T>(t: T) -> Option<Self> where
    Self: TryFrom<T>, [src]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
    Self: TryInto<T>, [src]
Self: TryInto<T>,
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, [src]
impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, [src]impl<T> SaturatedConversion for T[src]
impl<T> SaturatedConversion for T[src]pub fn saturated_from<T>(t: T) -> Self where
    Self: UniqueSaturatedFrom<T>, [src]
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
    Self: UniqueSaturatedInto<T>, [src]
Self: UniqueSaturatedInto<T>,
impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, [src]
impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, [src]pub fn unchecked_into(self) -> T[src]
impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, [src]
impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, [src]pub fn unique_saturated_into(self) -> T[src]
impl<T> WithSubscriber for T[src]
impl<T> WithSubscriber for T[src]pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, [src]
S: Into<Dispatch>,
pub fn with_current_subscriber(self) -> WithDispatch<Self>[src]
impl<T> Erased for T[src]
impl<T> MaybeDebug for T where
    T: Debug, [src]
T: Debug,
impl<T> MaybeDebug for T where
    T: Debug, [src]
T: Debug,
impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe, [src]
T: RefUnwindSafe,