From 24d1eb40cc5bc8a289bc71424714e01a81bdb749 Mon Sep 17 00:00:00 2001 From: Robert Klotzner Date: Tue, 1 Jun 2021 05:12:18 +0200 Subject: [PATCH] Increase PoV timeout slightly. (#3144) --- .../node/network/protocol/src/request_response/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/polkadot/node/network/protocol/src/request_response/mod.rs b/polkadot/node/network/protocol/src/request_response/mod.rs index 1be3bf05d2..610fcc1fc5 100644 --- a/polkadot/node/network/protocol/src/request_response/mod.rs +++ b/polkadot/node/network/protocol/src/request_response/mod.rs @@ -86,10 +86,10 @@ const DEFAULT_REQUEST_TIMEOUT: Duration = Duration::from_secs(3); /// peer set as well). const DEFAULT_REQUEST_TIMEOUT_CONNECTED: Duration = Duration::from_secs(1); -/// Timeout for PoV like data, 2 times what it should take, assuming we can fully utilize the -/// bandwidth. This amounts to two seconds right now. -const POV_REQUEST_TIMEOUT_CONNECTED: Duration = - Duration::from_millis(2 * 1000 * (MAX_POV_SIZE as u64) / MIN_BANDWIDTH_BYTES); +/// This timeout is based on what seems sensible from a time budget perspective, considering 6 +/// second block time. This is going to be tough, if we have multiple forks and large PoVs, but we +/// only have so much time. +const POV_REQUEST_TIMEOUT_CONNECTED: Duration = Duration::from_millis(1000); /// We want timeout statement requests fast, so we don't waste time on slow nodes. Responders will /// try their best to either serve within that timeout or return an error immediately. (We need to