mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-16 16:41:10 +00:00
Update Reference Hardware Specs (#13317)
* Remove Polkadot Wiki Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update requirements for new ref hardware Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add test 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 <>
This commit is contained in:
committed by
GitHub
parent
a7d82e1eb1
commit
f1c16d05e7
@@ -25,9 +25,6 @@ lazy_static! {
|
|||||||
///
|
///
|
||||||
/// These values are provided by Parity, however it is possible
|
/// These values are provided by Parity, however it is possible
|
||||||
/// to use your own requirements if you are running a custom chain.
|
/// to use your own requirements if you are running a custom chain.
|
||||||
///
|
|
||||||
/// The reference hardware is describe here:
|
|
||||||
/// <https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot>
|
|
||||||
pub static ref SUBSTRATE_REFERENCE_HARDWARE: Requirements = {
|
pub static ref SUBSTRATE_REFERENCE_HARDWARE: Requirements = {
|
||||||
let raw = include_bytes!("reference_hardware.json").as_slice();
|
let raw = include_bytes!("reference_hardware.json").as_slice();
|
||||||
serde_json::from_slice(raw).expect("Hardcoded data is known good; qed")
|
serde_json::from_slice(raw).expect("Hardcoded data is known good; qed")
|
||||||
@@ -37,8 +34,9 @@ lazy_static! {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use sc_sysinfo::{Metric, Requirement, Requirements, Throughput};
|
||||||
|
|
||||||
/// `SUBSTRATE_REFERENCE_HARDWARE` can be en- and decoded.
|
/// `SUBSTRATE_REFERENCE_HARDWARE` can be decoded.
|
||||||
#[test]
|
#[test]
|
||||||
fn json_static_data() {
|
fn json_static_data() {
|
||||||
let raw = serde_json::to_string(&*SUBSTRATE_REFERENCE_HARDWARE).unwrap();
|
let raw = serde_json::to_string(&*SUBSTRATE_REFERENCE_HARDWARE).unwrap();
|
||||||
@@ -46,4 +44,25 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(decoded, SUBSTRATE_REFERENCE_HARDWARE.clone());
|
assert_eq!(decoded, SUBSTRATE_REFERENCE_HARDWARE.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The hard-coded values are correct.
|
||||||
|
#[test]
|
||||||
|
fn json_static_data_is_correct() {
|
||||||
|
assert_eq!(
|
||||||
|
*SUBSTRATE_REFERENCE_HARDWARE,
|
||||||
|
Requirements(vec![
|
||||||
|
Requirement { metric: Metric::Blake2256, minimum: Throughput::from_mibs(783.27) },
|
||||||
|
Requirement {
|
||||||
|
metric: Metric::Sr25519Verify,
|
||||||
|
minimum: Throughput::from_kibs(560.670000128),
|
||||||
|
},
|
||||||
|
Requirement {
|
||||||
|
metric: Metric::MemCopy,
|
||||||
|
minimum: Throughput::from_gibs(11.4925205078125003),
|
||||||
|
},
|
||||||
|
Requirement { metric: Metric::DiskSeqWrite, minimum: Throughput::from_mibs(950.0) },
|
||||||
|
Requirement { metric: Metric::DiskRndWrite, minimum: Throughput::from_mibs(420.0) },
|
||||||
|
])
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"metric": "Blake2256",
|
"metric": "Blake2256",
|
||||||
"minimum": 1029.0
|
"minimum": 783.27
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"metric": "Sr25519Verify",
|
"metric": "Sr25519Verify",
|
||||||
"minimum": 0.650391
|
"minimum": 0.547529297
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"metric": "MemCopy",
|
"metric": "MemCopy",
|
||||||
"minimum": 14666.752
|
"minimum": 11768.341
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"metric": "DiskSeqWrite",
|
"metric": "DiskSeqWrite",
|
||||||
"minimum": 450.0
|
"minimum": 950.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"metric": "DiskRndWrite",
|
"metric": "DiskRndWrite",
|
||||||
"minimum": 200.0
|
"minimum": 420.0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user