From c4457cc5a783f4ec18e0bcb7df56f2b917b180cc Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Fri, 12 Jan 2024 11:11:17 +0100 Subject: [PATCH 1/2] ouroboros-network: increased block-size in ingress size calculations This doesn't change the result, but we should keep it up-to date. --- ouroboros-network/src/Ouroboros/Network/NodeToNode.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ouroboros-network/src/Ouroboros/Network/NodeToNode.hs b/ouroboros-network/src/Ouroboros/Network/NodeToNode.hs index a83bb200728..0f83d249e81 100644 --- a/ouroboros-network/src/Ouroboros/Network/NodeToNode.hs +++ b/ouroboros-network/src/Ouroboros/Network/NodeToNode.hs @@ -335,14 +335,14 @@ blockFetchProtocolLimits MiniProtocolParameters { blockFetchPipeliningMax } = Mi -- overall queue limit must be: -- -- ``` - -- 100 * 64KB = 6.4MB + -- 100 * 88KB = 8.8MB -- ``` -- -- In the byron era this limit was set to `10 * 2MB`, we keep the more -- relaxed limit here. -- maximumIngressQueue = addSafetyMargin $ - max (10 * 2_097_154 :: Int) (fromIntegral blockFetchPipeliningMax * 65_535) + max (10 * 2_097_154 :: Int) (fromIntegral blockFetchPipeliningMax * 90_112) } txSubmissionProtocolLimits MiniProtocolParameters { txSubmissionMaxUnacked } = MiniProtocolLimits { From 7d63dfb0bc7825d2478000f9538c4c71481bb3dc Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Fri, 12 Jan 2024 11:20:59 +0100 Subject: [PATCH 2/2] ouroboros-network: use correct size prefixes --- ouroboros-network/src/Ouroboros/Network/NodeToNode.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ouroboros-network/src/Ouroboros/Network/NodeToNode.hs b/ouroboros-network/src/Ouroboros/Network/NodeToNode.hs index 0f83d249e81..9f34b52839e 100644 --- a/ouroboros-network/src/Ouroboros/Network/NodeToNode.hs +++ b/ouroboros-network/src/Ouroboros/Network/NodeToNode.hs @@ -330,15 +330,15 @@ blockFetchProtocolLimits MiniProtocolParameters { blockFetchPipeliningMax } = Mi -- @maxInFlightReqsPerPeer = 100@ is specified). In the future the -- block fetch client will count bytes rather than blocks. By far -- the largest (and the only pipelined message) in 'block-fetch' - -- protocol is 'MsgBlock'. Current block size limit is 64KB and + -- protocol is 'MsgBlock'. Current block size limit is 88kiB and -- `blockFetchPipeliningMax` below is set to `100`. This means that -- overall queue limit must be: -- -- ``` - -- 100 * 88KB = 8.8MB + -- 100 * 88kiB = 8.8MiB -- ``` -- - -- In the byron era this limit was set to `10 * 2MB`, we keep the more + -- In the byron era this limit was set to `10 * 2MiB`, we keep the more -- relaxed limit here. -- maximumIngressQueue = addSafetyMargin $ @@ -388,7 +388,7 @@ txSubmissionProtocolLimits MiniProtocolParameters { txSubmissionMaxUnacked } = M -- 1 -- encodeListLen 2 -- + 1 -- encodeWord 3 -- + 1 -- encodeListLenIndef - -- + 65_536 -- 64kb transaction + -- + 65_536 -- 64kiB transaction -- + 1 -- encodeBreak -- = 65_540 -- ```