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.
Unsafe
: Exposes every RPC method.Safe
: Exposes only a safe subset of RPC methods, denying unsafe RPC methods.Auto
: Acts asSafe
if RPC is served externally, e.g. when--{rpc,ws}-external
is passed, otherwise acts asUnsafe
.
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: OffchainWorkerParams
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.
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.
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 development key seed from the current object Read more
fn telemetry_endpoints(
&self,
chain_spec: &Box<dyn ChainSpec>
) -> Result<Option<TelemetryEndpoints>>
fn telemetry_endpoints(
&self,
chain_spec: &Box<dyn ChainSpec>
) -> Result<Option<TelemetryEndpoints>>
Get the telemetry endpoints (if any) 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 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
fn network_config(
&self,
chain_spec: &Box<dyn ChainSpec>,
is_dev: bool,
is_validator: bool,
net_config_dir: PathBuf,
client_id: &str,
node_name: &str,
node_key: NodeKeyConfig,
default_listen_port: u16
) -> Result<NetworkConfiguration>
fn network_config(
&self,
chain_spec: &Box<dyn ChainSpec>,
is_dev: bool,
is_validator: bool,
net_config_dir: PathBuf,
client_id: &str,
node_name: &str,
node_key: NodeKeyConfig,
default_listen_port: u16
) -> Result<NetworkConfiguration>
Get the network configuration Read more
Get the keystore configuration. Read more
Get the database transaction storage scheme.
fn database_config(
&self,
base_path: &PathBuf,
cache_size: usize,
database: Database
) -> Result<DatabaseSource>
fn database_config(
&self,
base_path: &PathBuf,
cache_size: usize,
database: Database
) -> Result<DatabaseSource>
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 WASM execution method. Read more
Get the path where WASM overrides live. Read more
fn execution_strategies(
&self,
is_dev: bool,
is_validator: bool
) -> Result<ExecutionStrategies>
fn execution_strategies(
&self,
is_dev: bool,
is_validator: bool
) -> Result<ExecutionStrategies>
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
fn create_configuration<C: SubstrateCli>(
&self,
cli: &C,
task_executor: TaskExecutor
) -> Result<Configuration>
fn create_configuration<C: SubstrateCli>(
&self,
cli: &C,
task_executor: TaskExecutor
) -> Result<Configuration>
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?
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
fn from_args() -> Self
fn from_args() -> Self
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
fn from_args_safe() -> Result<Self, Error>
fn from_args_safe() -> Result<Self, Error>
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
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
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
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making. Read more
Auto Trait Implementations
impl RefUnwindSafe for RunCmd
impl UnwindSafe for RunCmd
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
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
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V
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
impl<T> MaybeDebug for T where
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,