node: add sentry mode flag (#3959)

* node: add sentry mode flag

* cli: extend docs on validator and sentry modes

* service: add missing field in test Configuration

* node: Display instead of Debug when printing node role
This commit is contained in:
André Silva
2019-10-29 18:58:34 +00:00
committed by Bastian Köcher
parent dc14809804
commit c92eda9809
8 changed files with 79 additions and 10 deletions
+23 -1
View File
@@ -301,9 +301,31 @@ pub struct ExecutionStrategies {
#[derive(Debug, StructOpt, Clone)]
pub struct RunCmd {
/// Enable validator mode.
#[structopt(long = "validator")]
///
/// 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).
#[structopt(
long = "validator",
conflicts_with_all = &[ "sentry" ]
)]
pub validator: 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.
#[structopt(
long = "sentry",
conflicts_with_all = &[ "validator" ]
)]
pub sentry: bool,
/// Disable GRANDPA voter when running in validator mode, otherwise disables the GRANDPA observer.
#[structopt(long = "no-grandpa")]
pub no_grandpa: bool,