diff --git a/polkadot/node/core/approval-voting/src/lib.rs b/polkadot/node/core/approval-voting/src/lib.rs index aae4a630a3..86dbd71485 100644 --- a/polkadot/node/core/approval-voting/src/lib.rs +++ b/polkadot/node/core/approval-voting/src/lib.rs @@ -502,6 +502,8 @@ impl ApprovalState { } struct CurrentlyCheckingSet { + /// Invariant: The contained `Vec` needs to stay sorted as we are using `binary_search_by_key` + /// on it. candidate_hash_map: HashMap>, currently_checking: FuturesUnordered>, } diff --git a/polkadot/node/network/availability-recovery/src/lib.rs b/polkadot/node/network/availability-recovery/src/lib.rs index ea4d484a41..2f9696cdfa 100644 --- a/polkadot/node/network/availability-recovery/src/lib.rs +++ b/polkadot/node/network/availability-recovery/src/lib.rs @@ -300,12 +300,14 @@ impl RequestChunksPhase { if erasure_chunk_hash != anticipated_hash { tracing::debug!( target: LOG_TARGET, + candidate_hash = ?params.candidate_hash, ?validator_index, "Merkle proof mismatch", ); } else { tracing::trace!( target: LOG_TARGET, + candidate_hash = ?params.candidate_hash, ?validator_index, "Received valid chunk.", ); @@ -314,6 +316,7 @@ impl RequestChunksPhase { } else { tracing::debug!( target: LOG_TARGET, + candidate_hash = ?params.candidate_hash, ?validator_index, "Invalid Merkle proof", ); @@ -323,6 +326,7 @@ impl RequestChunksPhase { Err((validator_index, e)) => { tracing::debug!( target: LOG_TARGET, + candidate_hash= ?params.candidate_hash, err = ?e, ?validator_index, "Failure requesting chunk",