From 463bde0b0b0d161afe48b21e0ebde11603ee8057 Mon Sep 17 00:00:00 2001 From: Alexandru Gheorghe Date: Thu, 2 Nov 2023 19:28:19 +0200 Subject: [PATCH 1/3] Add warning when peer_id is not available when building topology ... see https://github.com/paritytech/polkadot-sdk/issues/2138 for why is not good, until we fix it let's add a warning to understand if this is happening in the wild. Signed-off-by: Alexandru Gheorghe --- polkadot/node/network/bridge/src/rx/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/polkadot/node/network/bridge/src/rx/mod.rs b/polkadot/node/network/bridge/src/rx/mod.rs index 7e86b46a7e039..4d53c47c1438a 100644 --- a/polkadot/node/network/bridge/src/rx/mod.rs +++ b/polkadot/node/network/bridge/src/rx/mod.rs @@ -551,6 +551,14 @@ where let mut peers = Vec::with_capacity(neighbors.len()); for (discovery_id, validator_index) in neighbors { let addr = get_peer_id_by_authority_id(ads, discovery_id.clone()).await; + if addr.is_none() { + // See on why is not good in https://github.com/paritytech/polkadot-sdk/issues/2138 + gum::warn!( + target: LOG_TARGET, + ?validator_index, + "Could not determine peer_id for validator" + ) + } peers.push(TopologyPeerInfo { peer_ids: addr.into_iter().collect(), validator_index, From 3a348de22b161ab6a55294f42f99c12123c309f3 Mon Sep 17 00:00:00 2001 From: Alexandru Gheorghe Date: Fri, 3 Nov 2023 15:03:13 +0200 Subject: [PATCH 2/3] Add issue in log Signed-off-by: Alexandru Gheorghe --- polkadot/node/network/bridge/src/rx/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/polkadot/node/network/bridge/src/rx/mod.rs b/polkadot/node/network/bridge/src/rx/mod.rs index 4d53c47c1438a..13554df39f0fd 100644 --- a/polkadot/node/network/bridge/src/rx/mod.rs +++ b/polkadot/node/network/bridge/src/rx/mod.rs @@ -556,7 +556,8 @@ where gum::warn!( target: LOG_TARGET, ?validator_index, - "Could not determine peer_id for validator" + "Could not determine peer_id for validator, let the team know in \n + https://github.com/paritytech/polkadot-sdk/issues/2138" ) } peers.push(TopologyPeerInfo { From b311278f96c16384998aaf4c86408bab8bcb1bfa Mon Sep 17 00:00:00 2001 From: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Date: Sun, 5 Nov 2023 12:58:33 +0200 Subject: [PATCH 3/3] Update polkadot/node/network/bridge/src/rx/mod.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bastian Köcher --- polkadot/node/network/bridge/src/rx/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polkadot/node/network/bridge/src/rx/mod.rs b/polkadot/node/network/bridge/src/rx/mod.rs index 13554df39f0fd..f64410c1353d2 100644 --- a/polkadot/node/network/bridge/src/rx/mod.rs +++ b/polkadot/node/network/bridge/src/rx/mod.rs @@ -553,7 +553,7 @@ where let addr = get_peer_id_by_authority_id(ads, discovery_id.clone()).await; if addr.is_none() { // See on why is not good in https://github.com/paritytech/polkadot-sdk/issues/2138 - gum::warn!( + gum::debug!( target: LOG_TARGET, ?validator_index, "Could not determine peer_id for validator, let the team know in \n