Warn validators with slow hardware (#6269)

* Warn validators with slow hardware

* update

* cargo update -p sp-io

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix printing logic

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* fix

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* add deps

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* update lockfile for {"substrate"}

* fmt

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Sergej Sakac
2023-01-21 18:36:47 +01:00
committed by GitHub
parent f0c8219b24
commit db726cf7bb
4 changed files with 196 additions and 189 deletions
+182 -181
View File
File diff suppressed because it is too large Load Diff
+4 -6
View File
@@ -328,14 +328,12 @@ where
};
runner.run_node_until_exit(move |config| async move {
let hwbench = if !cli.run.no_hardware_benchmarks {
config.database.path().map(|database_path| {
let hwbench = (!cli.run.no_hardware_benchmarks)
.then_some(config.database.path().map(|database_path| {
let _ = std::fs::create_dir_all(&database_path);
sc_sysinfo::gather_hwbench(Some(database_path))
})
} else {
None
};
}))
.flatten();
service::build_full(
config,
+3 -2
View File
@@ -11,7 +11,6 @@ sc-authority-discovery = { git = "https://github.com/paritytech/substrate", bran
babe = { package = "sc-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master" }
beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", package = "sp-beefy" }
beefy-gadget = { git = "https://github.com/paritytech/substrate", branch = "master" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" }
grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" }
mmr-gadget = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master"}
@@ -63,6 +62,8 @@ pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/parityt
# Substrate Other
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "master" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master" }
# External Crates
futures = "0.3.21"
@@ -77,6 +78,7 @@ parity-db = { version = "0.4.2", optional = true }
async-trait = "0.1.57"
lru = "0.8"
log = "0.4.17"
# Polkadot
polkadot-node-core-parachains-inherent = { path = "../core/parachains-inherent" }
@@ -131,7 +133,6 @@ polkadot-statement-distribution = { path = "../network/statement-distribution",
polkadot-test-client = { path = "../test/client" }
polkadot-node-subsystem-test-helpers = { path = "../subsystem-test-helpers" }
env_logger = "0.9.0"
log = "0.4.17"
assert_matches = "1.5.0"
tempfile = "3.2"
+7
View File
@@ -95,6 +95,7 @@ pub use polkadot_client::PolkadotExecutorDispatch;
pub use chain_spec::{KusamaChainSpec, PolkadotChainSpec, RococoChainSpec, WestendChainSpec};
pub use consensus_common::{block_validation::Chain, Proposal, SelectChain};
use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE;
use mmr_gadget::MmrGadget;
#[cfg(feature = "full-node")]
pub use polkadot_client::{
@@ -986,6 +987,12 @@ where
if let Some(hwbench) = hwbench {
sc_sysinfo::print_hwbench(&hwbench);
if !SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) && role.is_authority() {
log::warn!(
"⚠️ The hardware does not meet the minimal requirements for role 'Authority' find out more at:\n\
https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#reference-hardware"
);
}
if let Some(ref mut telemetry) = telemetry {
let telemetry_handle = telemetry.handle();