diff --git a/polkadot/node/network/availability-recovery/src/lib.rs b/polkadot/node/network/availability-recovery/src/lib.rs index 3121782517..20d564e540 100644 --- a/polkadot/node/network/availability-recovery/src/lib.rs +++ b/polkadot/node/network/availability-recovery/src/lib.rs @@ -304,7 +304,20 @@ impl RequestChunksFromValidators { sender: &mut impl SubsystemSender, ) { let num_requests = self.get_desired_request_count(params.threshold); - let mut requests = Vec::with_capacity(num_requests - self.requesting_chunks.len()); + let candidate_hash = ¶ms.candidate_hash; + let already_requesting_count = self.requesting_chunks.len(); + + gum::debug!( + target: LOG_TARGET, + ?candidate_hash, + ?num_requests, + error_count= ?self.error_count, + total_received = ?self.total_received_responses, + threshold = ?params.threshold, + ?already_requesting_count, + "Requesting availability chunks for a candidate", + ); + let mut requests = Vec::with_capacity(num_requests - already_requesting_count); while self.requesting_chunks.len() < num_requests { if let Some(validator_index) = self.shuffling.pop_back() { @@ -313,7 +326,7 @@ impl RequestChunksFromValidators { target: LOG_TARGET, ?validator, ?validator_index, - candidate_hash = ?params.candidate_hash, + ?candidate_hash, "Requesting chunk", ); @@ -447,6 +460,14 @@ impl RequestChunksFromValidators { // Stop waiting for requests when we either can already recover the data // or have gotten firm 'No' responses from enough validators. if self.can_conclude(params) { + gum::debug!( + target: LOG_TARGET, + candidate_hash = ?params.candidate_hash, + received_chunks_count = ?self.received_chunks.len(), + requested_chunks_count = ?self.requesting_chunks.len(), + threshold = ?params.threshold, + "Can conclude availability for a candidate", + ); break } }