Struct tc_cli::RunCmd[][src]

pub struct RunCmd {
    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: 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/tetcoin/tetcore/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 as Safe if RPC is served externally, e.g. when --{rpc,ws}-external is passed, otherwise acts as Unsafe.
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/tetcoin/tetcore/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 Tetcore 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: OffchainWorkerParamsshared_params: SharedParamsimport_params: ImportParamsnetwork_params: NetworkParamspool_config: TransactionPoolParamsalice: 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.

force_authoring: bool

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: 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]

impl Debug for RunCmd[src]

impl StructOpt for RunCmd[src]

impl StructOptInternal for RunCmd[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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 
[src]

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

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, 

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]