mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 03:41:02 +00:00
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:
Generated
+182
-181
File diff suppressed because it is too large
Load Diff
@@ -328,14 +328,12 @@ where
|
|||||||
};
|
};
|
||||||
|
|
||||||
runner.run_node_until_exit(move |config| async move {
|
runner.run_node_until_exit(move |config| async move {
|
||||||
let hwbench = if !cli.run.no_hardware_benchmarks {
|
let hwbench = (!cli.run.no_hardware_benchmarks)
|
||||||
config.database.path().map(|database_path| {
|
.then_some(config.database.path().map(|database_path| {
|
||||||
let _ = std::fs::create_dir_all(&database_path);
|
let _ = std::fs::create_dir_all(&database_path);
|
||||||
sc_sysinfo::gather_hwbench(Some(database_path))
|
sc_sysinfo::gather_hwbench(Some(database_path))
|
||||||
})
|
}))
|
||||||
} else {
|
.flatten();
|
||||||
None
|
|
||||||
};
|
|
||||||
|
|
||||||
service::build_full(
|
service::build_full(
|
||||||
config,
|
config,
|
||||||
|
|||||||
@@ -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" }
|
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-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", package = "sp-beefy" }
|
||||||
beefy-gadget = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
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" }
|
grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
mmr-gadget = { 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"}
|
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
|
# Substrate Other
|
||||||
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
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" }
|
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
|
# External Crates
|
||||||
futures = "0.3.21"
|
futures = "0.3.21"
|
||||||
@@ -77,6 +78,7 @@ parity-db = { version = "0.4.2", optional = true }
|
|||||||
|
|
||||||
async-trait = "0.1.57"
|
async-trait = "0.1.57"
|
||||||
lru = "0.8"
|
lru = "0.8"
|
||||||
|
log = "0.4.17"
|
||||||
|
|
||||||
# Polkadot
|
# Polkadot
|
||||||
polkadot-node-core-parachains-inherent = { path = "../core/parachains-inherent" }
|
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-test-client = { path = "../test/client" }
|
||||||
polkadot-node-subsystem-test-helpers = { path = "../subsystem-test-helpers" }
|
polkadot-node-subsystem-test-helpers = { path = "../subsystem-test-helpers" }
|
||||||
env_logger = "0.9.0"
|
env_logger = "0.9.0"
|
||||||
log = "0.4.17"
|
|
||||||
assert_matches = "1.5.0"
|
assert_matches = "1.5.0"
|
||||||
tempfile = "3.2"
|
tempfile = "3.2"
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ pub use polkadot_client::PolkadotExecutorDispatch;
|
|||||||
|
|
||||||
pub use chain_spec::{KusamaChainSpec, PolkadotChainSpec, RococoChainSpec, WestendChainSpec};
|
pub use chain_spec::{KusamaChainSpec, PolkadotChainSpec, RococoChainSpec, WestendChainSpec};
|
||||||
pub use consensus_common::{block_validation::Chain, Proposal, SelectChain};
|
pub use consensus_common::{block_validation::Chain, Proposal, SelectChain};
|
||||||
|
use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE;
|
||||||
use mmr_gadget::MmrGadget;
|
use mmr_gadget::MmrGadget;
|
||||||
#[cfg(feature = "full-node")]
|
#[cfg(feature = "full-node")]
|
||||||
pub use polkadot_client::{
|
pub use polkadot_client::{
|
||||||
@@ -986,6 +987,12 @@ where
|
|||||||
|
|
||||||
if let Some(hwbench) = hwbench {
|
if let Some(hwbench) = hwbench {
|
||||||
sc_sysinfo::print_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 {
|
if let Some(ref mut telemetry) = telemetry {
|
||||||
let telemetry_handle = telemetry.handle();
|
let telemetry_handle = telemetry.handle();
|
||||||
|
|||||||
Reference in New Issue
Block a user