Skip to content

Commit

Permalink
Update POV_RESPONSE_SIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiEres committed Sep 18, 2024
1 parent 43cd6fd commit 5f02c93
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions polkadot/node/network/protocol/src/request_response/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,8 @@ pub const MAX_PARALLEL_ATTESTED_CANDIDATE_REQUESTS: u32 = 5;

/// Response size limit for responses of POV like data.
///
/// This is larger than `MAX_POV_SIZE` to account for protocol overhead and for additional data in
/// `CollationFetchingV1` or `AvailableDataFetchingV1` for example. We try to err on larger limits
/// here as a too large limit only allows an attacker to waste our bandwidth some more, a too low
/// limit might have more severe effects.
const POV_RESPONSE_SIZE: u64 = MAX_POV_SIZE as u64 + 10_000;
/// Same as what we use in substrate networking.
const POV_RESPONSE_SIZE: u64 = 16 * 1024 * 1024;

/// Maximum response sizes for `StatementFetchingV1`.
///
Expand Down Expand Up @@ -217,7 +214,7 @@ impl Protocol {
name,
legacy_names,
1_000,
POV_RESPONSE_SIZE as u64 * 3,
POV_RESPONSE_SIZE,
// We are connected to all validators:
CHUNK_REQUEST_TIMEOUT,
tx,
Expand Down

0 comments on commit 5f02c93

Please sign in to comment.