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 fae1537
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions polkadot/node/network/protocol/src/request_response/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

use std::{collections::HashMap, time::Duration, u64};

use polkadot_primitives::{MAX_CODE_SIZE, MAX_POV_SIZE};
use polkadot_primitives::MAX_CODE_SIZE;
use sc_network::NetworkBackend;
use sp_runtime::traits::Block;
use strum::{EnumIter, IntoEnumIterator};
Expand Down 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 fae1537

Please sign in to comment.