grandpa: add voting rule to pause new votes for a period (#904)

* grandpa: add voting rule to pause new votes for a period

* grandpa: increase delay

* grandpa: parse custom pause delay from cli

* grandpa: log scheduled pause on startup

* grandpa: rename parameter to grandpa_pause

* grandpa: make pause voting rule generic on block

* grandpa: add test for pause voting rule

* grandpa: add hardcoded pause

* collator: fix test compilation
This commit is contained in:
André Silva
2020-03-17 14:26:09 +00:00
committed by GitHub
parent d07116a577
commit b9de1c0244
6 changed files with 277 additions and 11 deletions
+9
View File
@@ -75,4 +75,13 @@ pub struct Cli {
#[allow(missing_docs)]
#[structopt(long = "enable-authority-discovery")]
pub authority_discovery_enabled: bool,
/// Setup a GRANDPA scheduled voting pause.
///
/// This parameter takes two values, namely a block number and a delay (in
/// blocks). After the given block number is finalized the GRANDPA voter
/// will temporarily stop voting for new blocks until the given delay has
/// elapsed (i.e. until a block at height `pause_block + delay` is imported).
#[structopt(long = "grandpa-pause", number_of_values(2))]
pub grandpa_pause: Vec<u32>,
}