Skip to content

Commit 3ad1291

Browse files
authored
Bump PoV request timeout (#5924)
# Description We previously set the PoV request timeout to 1.2s based on synchronous backing, which allowed for 5 PoVs per relay block. With asynchronous backing, we no longer have a time budget and can increase the value to 2s. Fixes #5885 ## Integration This PR shouldn't affect downstream projects. ## Review Notes This PR can be followed by experiments with Gluttons on Kusama to confirm that the timeout is sufficient.
1 parent c477076 commit 3ad1291

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

polkadot/node/network/protocol/src/request_response/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,12 @@ const DEFAULT_REQUEST_TIMEOUT_CONNECTED: Duration = Duration::from_secs(1);
123123
/// Timeout for requesting availability chunks.
124124
pub const CHUNK_REQUEST_TIMEOUT: Duration = DEFAULT_REQUEST_TIMEOUT_CONNECTED;
125125

126-
/// This timeout is based on what seems sensible from a time budget perspective, considering 6
127-
/// second block time. This is going to be tough, if we have multiple forks and large PoVs, but we
128-
/// only have so much time.
129-
const POV_REQUEST_TIMEOUT_CONNECTED: Duration = Duration::from_millis(1200);
126+
/// This timeout is based on the following parameters, assuming we use asynchronous backing with no
127+
/// time budget within a relay block:
128+
/// - 500 Mbit/s networking speed
129+
/// - 10 MB PoV
130+
/// - 10 parallel executions
131+
const POV_REQUEST_TIMEOUT_CONNECTED: Duration = Duration::from_millis(2000);
130132

131133
/// We want timeout statement requests fast, so we don't waste time on slow nodes. Responders will
132134
/// try their best to either serve within that timeout or return an error immediately. (We need to

prdoc/pr_5924.prdoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
2+
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
3+
4+
title: Bump PoV request timeout
5+
6+
doc:
7+
- audience: Node Dev
8+
description: |
9+
With asynchronous backing and PoV size 10MB, we can increase the PoV request timeout from 1.2s to 2s.
10+
11+
crates:
12+
- name: polkadot-node-network-protocol
13+
bump: patch

0 commit comments

Comments
 (0)