You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Port aleph-node 8.2 testnet to mainnet branch (#776)
* Request justification from forks
* Reverted changes to cargo lock introduced in 6ae50ca (#773)
* A0-1635: Limit nonfinalized block production (#769) (#774)
* A0-1635: Limit nonfinalized block production (#769)
* Limit nonfinalized block production
* Better saturation handling
* Add log when delaying block production
* Disable two tests that were operating under outdated assumptions
* Disable one more test
* Turn off the likely broken test
* Changed node version
* Fixed leftover conflicted line in lock file
* Reverted unwanted change to runtime/Cargo.toml
* Updated Cargo.lock
Co-authored-by: Michal Swietek <[email protected]>
Co-authored-by: timorl <[email protected]>
Copy file name to clipboardExpand all lines: bin/node/src/aleph_cli.rs
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@ use std::path::PathBuf;
3
3
use aleph_primitives::DEFAULT_UNIT_CREATION_DELAY;
4
4
use clap::{ArgGroup,Parser};
5
5
use finality_aleph::UnitCreationDelay;
6
+
use log::warn;
6
7
7
8
#[derive(Debug,Parser,Clone)]
8
9
#[clap(group(ArgGroup::new("backup")))]
@@ -33,6 +34,12 @@ pub struct AlephCli {
33
34
/// with `--no-backup`, but note that that limits crash recoverability.
34
35
#[clap(long, value_name = "PATH", group = "backup")]
35
36
backup_path:Option<PathBuf>,
37
+
38
+
/// The maximum number of nonfinalized blocks, after which block production should be locally
39
+
/// stopped. DO NOT CHANGE THIS, PRODUCING MORE OR FEWER BLOCKS MIGHT BE CONSIDERED MALICIOUS
40
+
/// BEHAVIOUR AND PUNISHED ACCORDINGLY!
41
+
#[clap(long, default_value_t = 20)]
42
+
max_nonfinalized_blocks:u32,
36
43
}
37
44
38
45
implAlephCli{
@@ -55,4 +62,11 @@ impl AlephCli {
55
62
pubfnno_backup(&self) -> bool{
56
63
self.no_backup
57
64
}
65
+
66
+
pubfnmax_nonfinalized_blocks(&self) -> u32{
67
+
ifself.max_nonfinalized_blocks != 20{
68
+
warn!("Running block production with a value of max-nonfinalized-blocks {}, which is not the default of 20. THIS MIGHT BE CONSIDERED MALICIOUS BEHAVIOUR AND RESULT IN PENALTIES!",self.max_nonfinalized_blocks);
0 commit comments