First step in implementing #4386 (#4437)

* First step in implementing https://github.com/paritytech/polkadot/issues/4386

This PR:

- Reduces MAX_UNSHARED_UPLOAD_TIME to 150ms
- Increases timeout on collation fetching to 1200ms
- Reduces limit on needed backing votes in the runtime

This PR does not yet reduce the number of needed backing votes on the
node as this can only be meaningfully enacted once the changed limit in
the runtime is live.

* Fix tests.

* Guide updates.

* Review remarks.

* Bump minimum required backing votes to 2 in runtime.

* Make sure node side code won't make runtime vomit.

* cargo +nightly fmt
This commit is contained in:
Robert Klotzner
2021-12-23 17:41:34 +01:00
committed by GitHub
parent 4689ccffce
commit 846828f61c
6 changed files with 44 additions and 19 deletions
@@ -66,12 +66,8 @@ const COST_APPARENT_FLOOD: Rep =
///
/// This is to protect from a single slow validator preventing collations from happening.
///
/// With a collation size of 5MB and bandwidth of 500Mbit/s (requirement for Kusama validators),
/// the transfer should be possible within 0.1 seconds. 400 milliseconds should therefore be
/// plenty and should be low enough for later validators to still be able to finish on time.
///
/// There is debug logging output, so we can adjust this value based on production results.
const MAX_UNSHARED_UPLOAD_TIME: Duration = Duration::from_millis(400);
/// For considerations on this value, see: https://github.com/paritytech/polkadot/issues/4386
const MAX_UNSHARED_UPLOAD_TIME: Duration = Duration::from_millis(150);
#[derive(Clone, Default)]
pub struct Metrics(Option<MetricsInner>);