pub struct RunCmd {Show 23 fields
pub validator: bool,
pub no_grandpa: bool,
pub name: Option<String>,
pub rpc_params: RpcParams,
pub telemetry_params: TelemetryParams,
pub prometheus_params: PrometheusParams,
pub runtime_params: RuntimeParams,
pub offchain_worker_params: OffchainWorkerParams,
pub shared_params: SharedParams,
pub import_params: ImportParams,
pub network_params: NetworkParams,
pub pool_config: TransactionPoolParams,
pub keystore_params: KeystoreParams,
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 tmp: bool,
}Expand description
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).
no_grandpa: boolDisable GRANDPA.
Disables voter when running in validator mode, otherwise disable the GRANDPA observer.
name: Option<String>The human-readable name for this node.
It’s used as network node name.
rpc_params: RpcParams§telemetry_params: TelemetryParams§prometheus_params: PrometheusParams§runtime_params: RuntimeParams§offchain_worker_params: OffchainWorkerParams§import_params: ImportParams§network_params: NetworkParams§pool_config: TransactionPoolParams§keystore_params: KeystoreParams§alice: boolShortcut for --name Alice --validator.
Session keys for Alice are added to keystore.
bob: boolShortcut for --name Bob --validator.
Session keys for Bob are added to keystore.
charlie: boolShortcut for --name Charlie --validator.
Session keys for Charlie are added to keystore.
dave: boolShortcut for --name Dave --validator.
Session keys for Dave are added to keystore.
eve: boolShortcut for --name Eve --validator.
Session keys for Eve are added to keystore.
ferdie: boolShortcut for --name Ferdie --validator.
Session keys for Ferdie are added to keystore.
one: boolShortcut for --name One --validator.
Session keys for One are added to keystore.
two: boolShortcut for --name Two --validator.
Session keys for Two are added to keystore.
Enable authoring even when offline.
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.
When --dev is given and no explicit --base-path, this option is implied.
Implementations§
Source§impl RunCmd
impl RunCmd
Sourcepub fn get_keyring(&self) -> Option<Sr25519Keyring>
pub fn get_keyring(&self) -> Option<Sr25519Keyring>
Get the Sr25519Keyring matching one of the flag.
Trait Implementations§
Source§impl Args for RunCmd
impl Args for RunCmd
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CliConfiguration for RunCmd
impl CliConfiguration for RunCmd
Source§fn import_params(&self) -> Option<&ImportParams>
fn import_params(&self) -> Option<&ImportParams>
Source§fn network_params(&self) -> Option<&NetworkParams>
fn network_params(&self) -> Option<&NetworkParams>
Source§fn keystore_params(&self) -> Option<&KeystoreParams>
fn keystore_params(&self) -> Option<&KeystoreParams>
Source§fn offchain_worker_params(&self) -> Option<&OffchainWorkerParams>
fn offchain_worker_params(&self) -> Option<&OffchainWorkerParams>
OffchainWorkerParams for this object.Source§fn dev_key_seed(&self, is_dev: bool) -> Result<Option<String>>
fn dev_key_seed(&self, is_dev: bool) -> Result<Option<String>>
Source§fn telemetry_endpoints(
&self,
chain_spec: &Box<dyn ChainSpec>,
) -> Result<Option<TelemetryEndpoints>>
fn telemetry_endpoints( &self, chain_spec: &Box<dyn ChainSpec>, ) -> Result<Option<TelemetryEndpoints>>
Ok(true) if authoring should be forced Read moreSource§fn prometheus_config(
&self,
default_listen_port: u16,
chain_spec: &Box<dyn ChainSpec>,
) -> Result<Option<PrometheusConfig>>
fn prometheus_config( &self, default_listen_port: u16, chain_spec: &Box<dyn ChainSpec>, ) -> Result<Option<PrometheusConfig>>
None if disabled) Read moreSource§fn disable_grandpa(&self) -> Result<bool>
fn disable_grandpa(&self) -> Result<bool>
Ok(true) if grandpa should be disabled Read moreSource§fn rpc_max_connections(&self) -> Result<u32>
fn rpc_max_connections(&self) -> Result<u32>
Source§fn rpc_cors(&self, is_dev: bool) -> Result<Option<Vec<String>>>
fn rpc_cors(&self, is_dev: bool) -> Result<Option<Vec<String>>>
None if disabled) Read moreSource§fn rpc_addr(&self, default_listen_port: u16) -> Result<Option<Vec<RpcEndpoint>>>
fn rpc_addr(&self, default_listen_port: u16) -> Result<Option<Vec<RpcEndpoint>>>
Source§fn rpc_methods(&self) -> Result<RpcMethods>
fn rpc_methods(&self) -> Result<RpcMethods>
Source§fn rpc_max_request_size(&self) -> Result<u32>
fn rpc_max_request_size(&self) -> Result<u32>
Source§fn rpc_max_response_size(&self) -> Result<u32>
fn rpc_max_response_size(&self) -> Result<u32>
Source§fn rpc_max_subscriptions_per_connection(&self) -> Result<u32>
fn rpc_max_subscriptions_per_connection(&self) -> Result<u32>
Source§fn rpc_buffer_capacity_per_connection(&self) -> Result<u32>
fn rpc_buffer_capacity_per_connection(&self) -> Result<u32>
Source§fn rpc_batch_config(&self) -> Result<RpcBatchRequestConfig>
fn rpc_batch_config(&self) -> Result<RpcBatchRequestConfig>
Source§fn rpc_rate_limit(&self) -> Result<Option<NonZeroU32>>
fn rpc_rate_limit(&self) -> Result<Option<NonZeroU32>>
Source§fn rpc_rate_limit_whitelisted_ips(&self) -> Result<Vec<IpNetwork>>
fn rpc_rate_limit_whitelisted_ips(&self) -> Result<Vec<IpNetwork>>
Source§fn rpc_rate_limit_trust_proxy_headers(&self) -> Result<bool>
fn rpc_rate_limit_trust_proxy_headers(&self) -> Result<bool>
Source§fn transaction_pool(&self, is_dev: bool) -> Result<TransactionPoolOptions>
fn transaction_pool(&self, is_dev: bool) -> Result<TransactionPoolOptions>
Source§fn max_runtime_instances(&self) -> Result<Option<usize>>
fn max_runtime_instances(&self) -> Result<Option<usize>>
Source§fn base_path(&self) -> Result<Option<BasePath>>
fn base_path(&self) -> Result<Option<BasePath>>
Source§fn pruning_params(&self) -> Option<&PruningParams>
fn pruning_params(&self) -> Option<&PruningParams>
Source§fn node_key_params(&self) -> Option<&NodeKeyParams>
fn node_key_params(&self) -> Option<&NodeKeyParams>
Source§fn database_params(&self) -> Option<&DatabaseParams>
fn database_params(&self) -> Option<&DatabaseParams>
Source§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>
Source§fn keystore_config(&self, config_dir: &PathBuf) -> Result<KeystoreConfig>
fn keystore_config(&self, config_dir: &PathBuf) -> Result<KeystoreConfig>
Source§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>
Source§fn trie_cache_maximum_size(&self) -> Result<Option<usize>>
fn trie_cache_maximum_size(&self) -> Result<Option<usize>>
Source§fn warm_up_trie_cache(&self) -> Result<Option<TrieCacheWarmUpStrategy>>
fn warm_up_trie_cache(&self) -> Result<Option<TrieCacheWarmUpStrategy>>
Source§fn state_pruning(&self) -> Result<Option<PruningMode>>
fn state_pruning(&self) -> Result<Option<PruningMode>>
Source§fn blocks_pruning(&self) -> Result<BlocksPruning>
fn blocks_pruning(&self) -> Result<BlocksPruning>
Source§fn wasm_method(&self) -> Result<WasmExecutionMethod>
fn wasm_method(&self) -> Result<WasmExecutionMethod>
Source§fn wasm_runtime_overrides(&self) -> Option<PathBuf>
fn wasm_runtime_overrides(&self) -> Option<PathBuf>
Source§fn default_heap_pages(&self) -> Result<Option<u64>>
fn default_heap_pages(&self) -> Result<Option<u64>>
Source§fn offchain_worker(&self, role: &Role) -> Result<OffchainWorkerConfig>
fn offchain_worker(&self, role: &Role) -> Result<OffchainWorkerConfig>
Ok(_) Read moreSource§fn tracing_targets(&self) -> Result<Option<String>>
fn tracing_targets(&self) -> Result<Option<String>>
Source§fn tracing_receiver(&self) -> Result<TracingReceiver>
fn tracing_receiver(&self) -> Result<TracingReceiver>
Source§fn node_key(&self, net_config_dir: &PathBuf) -> Result<NodeKeyConfig>
fn node_key(&self, net_config_dir: &PathBuf) -> Result<NodeKeyConfig>
Source§fn announce_block(&self) -> Result<bool>
fn announce_block(&self) -> Result<bool>
Source§fn create_configuration<C: SubstrateCli>(
&self,
cli: &C,
tokio_handle: Handle,
) -> Result<Configuration>
fn create_configuration<C: SubstrateCli>( &self, cli: &C, tokio_handle: Handle, ) -> Result<Configuration>
Source§fn detailed_log_output(&self) -> Result<bool>
fn detailed_log_output(&self) -> Result<bool>
Source§fn enable_log_reloading(&self) -> Result<bool>
fn enable_log_reloading(&self) -> Result<bool>
Source§fn disable_log_color(&self) -> Result<bool>
fn disable_log_color(&self) -> Result<bool>
Source§impl CommandFactory for RunCmd
impl CommandFactory for RunCmd
Source§impl FromArgMatches for RunCmd
impl FromArgMatches for RunCmd
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for RunCmd
impl Parser for RunCmd
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for RunCmd
impl RefUnwindSafe for RunCmd
impl Send for RunCmd
impl Sync for RunCmd
impl Unpin for RunCmd
impl UnsafeUnpin for RunCmd
impl UnwindSafe for RunCmd
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
Source§fn defensive_truncate_into(self) -> U
fn defensive_truncate_into(self) -> U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read moreSource§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
Source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.