From 5f7b7fc60b9ceb4d0cfa6168ce578f2789225ad4 Mon Sep 17 00:00:00 2001 From: Karl Knutsson Date: Sun, 20 Nov 2022 11:06:15 +0000 Subject: [PATCH] Update SendFetchRequest trace The incomming and outgoing G (RTT) can decide if we attempt to fetch a given block from a peer. Adding PeerGSV to SendFetchRequest lets us track G for not only the first node we downloaded a block from, but for all other download attempts we initiated for that block. --- ouroboros-network/src/Ouroboros/Network/BlockFetch/Client.hs | 2 +- .../src/Ouroboros/Network/BlockFetch/ClientState.hs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ouroboros-network/src/Ouroboros/Network/BlockFetch/Client.hs b/ouroboros-network/src/Ouroboros/Network/BlockFetch/Client.hs index 168c7a653ba..7c7803b4627 100644 --- a/ouroboros-network/src/Ouroboros/Network/BlockFetch/Client.hs +++ b/ouroboros-network/src/Ouroboros/Network/BlockFetch/Client.hs @@ -186,7 +186,7 @@ blockFetchClient _version controlMessageSTM reportFetched Right lower = AF.last fragment Right upper = AF.head fragment - traceWith tracer (SendFetchRequest fragment) + traceWith tracer (SendFetchRequest fragment gsvs) return $ SenderPipeline (ClientAgency TokIdle) diff --git a/ouroboros-network/src/Ouroboros/Network/BlockFetch/ClientState.hs b/ouroboros-network/src/Ouroboros/Network/BlockFetch/ClientState.hs index 39639fc3565..9e083ddc80a 100644 --- a/ouroboros-network/src/Ouroboros/Network/BlockFetch/ClientState.hs +++ b/ouroboros-network/src/Ouroboros/Network/BlockFetch/ClientState.hs @@ -383,6 +383,7 @@ data TraceFetchClientState header = -- over the wire. | SendFetchRequest (AnchoredFragment header) + PeerGSV -- | Mark the start of receiving a streaming batch of blocks. This will -- be followed by one or more 'CompletedBlockFetch' and a final