From 66bf20e7f0f7774857713235c8a6e5225ac18d81 Mon Sep 17 00:00:00 2001 From: Agnish Ghosh Date: Wed, 28 Aug 2024 13:42:32 +0530 Subject: [PATCH] logging of subscription of topics --- beacon_chain/nimbus_beacon_node.nim | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/beacon_chain/nimbus_beacon_node.nim b/beacon_chain/nimbus_beacon_node.nim index ef518888d..49170c766 100644 --- a/beacon_chain/nimbus_beacon_node.nim +++ b/beacon_chain/nimbus_beacon_node.nim @@ -1153,9 +1153,17 @@ proc addDenebMessageHandlers( targetSubnets = node.fetchCustodySubnetCount() custody_subnets = node.network.nodeId.get_custody_column_subnet(targetSubnets) + debugEcho "Target Subnets" + debugEcho targetSubnets + debugEcho "Custody Subnets" + for cs in custody_subnets.get: + debugEcho cs + for i in 0'u64 ..< targetSubnets: if i in custody_subnets.get: let topic = getDataColumnSidecarTopic(forkDigest, i) + debugEcho "Topic" + debugEcho topic node.network.subscribe(topic, basicParams) if node.config.subscribeAllSubnets: @@ -2056,9 +2064,7 @@ proc installMessageValidators(node: BeaconNode) = for it in 0'u64 ..< DATA_COLUMN_SIDECAR_SUBNET_COUNT: closureScope: # Needed for inner `proc`; don't lift it out of loop. let subnet_id = it - if subnet_id notin dc_subnets.get: - discard - else: + if subnet_id in dc_subnets.get: node.network.addValidator( getDataColumnSidecarTopic(digest, subnet_id), proc ( dataColumnSidecar: DataColumnSidecar