[−][src]Struct sc_cli::RunCmd
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: bool
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
.
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.
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. If no verbosity level is specified the default is 0.
offchain_worker: OffchainWorkerEnabled
Should execute offchain workers on every block.
By default it's only enabled for nodes that are authoring new blocks.
import_params: ImportParams
network_config: NetworkConfigurationParams
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_path: Option<PathBuf>
Specify custom keystore path.
password_interactive: bool
Use interactive shell for entering the password used by the keystore.
password: Option<String>
Password used by the keystore.
password_filename: Option<PathBuf>
File that contains the password used by the keystore.
max_runtime_instances: usize
The size of the instances cache for each runtime.
The default value is 8 and the values higher than 256 are ignored.
Methods
impl RunCmd
[src]
pub fn get_keyring(&self) -> Option<Sr25519Keyring>
[src]
Get the Sr25519Keyring
matching one of the flag.
pub fn update_config<F>(
&self,
config: &mut Configuration,
spec_factory: F,
version: &VersionInfo
) -> Result<()> where
F: FnOnce(&str) -> Result<Box<dyn ChainSpec>, String>,
[src]
&self,
config: &mut Configuration,
spec_factory: F,
version: &VersionInfo
) -> Result<()> where
F: FnOnce(&str) -> Result<Box<dyn ChainSpec>, String>,
Update and prepare a Configuration
with command line parameters of RunCmd
and VersionInfo
.
pub fn run<FNL, FNF, SL, SF>(
self,
config: Configuration,
new_light: FNL,
new_full: FNF,
version: &VersionInfo
) -> Result<()> where
FNL: FnOnce(Configuration) -> Result<SL, Error>,
FNF: FnOnce(Configuration) -> Result<SF, Error>,
SL: AbstractService + Unpin,
SF: AbstractService + Unpin,
[src]
self,
config: Configuration,
new_light: FNL,
new_full: FNF,
version: &VersionInfo
) -> Result<()> where
FNL: FnOnce(Configuration) -> Result<SL, Error>,
FNF: FnOnce(Configuration) -> Result<SF, Error>,
SL: AbstractService + Unpin,
SF: AbstractService + Unpin,
Run the command that runs the node.
pub fn init(&self, version: &VersionInfo) -> Result<()>
[src]
Initialize substrate. This must be done only once.
This method:
- Set the panic handler
- Raise the FD limit
- Initialize the logger
Trait Implementations
impl Clone for RunCmd
[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]
fn from_args() -> Self
[src]
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,
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]
fn from_subcommand(_sub: (&'b str, Option<&'b ArgMatches<'a>>)) -> Option<Self>
[src]
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CheckedConversion for T
[src]
fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
[src]
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
fn from_ref(outer: &Outer) -> &T
[src]
Get a reference to the inner from the outer.
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,
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Self: UniqueSaturatedFrom<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Self: UniqueSaturatedInto<T>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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.
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>,
fn unchecked_into(self) -> T
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
S: TryInto<T>,
T: Bounded,
S: TryInto<T>,
T: Bounded,
fn unique_saturated_into(self) -> T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,