Struct sc_cli::RunCmd [−][src]
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).
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: 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.
prometheus_external: bool
Listen 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: bool
Do 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: 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.
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: 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
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]
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 Debug 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]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut 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> Erased for T
[src]
impl<T> From<T> 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]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
pub fn from_ref(outer: &Outer) -> &T
[src]
Get a reference to the inner from the outer.
pub fn from_mut(outer: &mut Outer) -> &mut T
[src]
Get a mutable reference to the inner from the outer.
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,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
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<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
T: UncheckedFrom<S>,
pub fn unchecked_into(self) -> T
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
[src]
T: Bounded,
S: TryInto<T>,
pub fn unique_saturated_into(self) -> T
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,