apply column subnet filtering only in Deneb message handlers

This commit is contained in:
Agnish Ghosh 2024-08-28 20:38:19 +05:30
parent 6796b19883
commit 84da290669

View File

@ -1160,6 +1160,7 @@ proc addDenebMessageHandlers(
debugEcho cs debugEcho cs
for i in 0'u64 ..< targetSubnets: for i in 0'u64 ..< targetSubnets:
if i in custody_subnets.get:
let topic = getDataColumnSidecarTopic(forkDigest, i) let topic = getDataColumnSidecarTopic(forkDigest, i)
debugEcho "Topic" debugEcho "Topic"
debugEcho topic debugEcho topic
@ -2053,17 +2054,16 @@ proc installMessageValidators(node: BeaconNode) =
# data_column_sidecar_{subnet_id} # data_column_sidecar_{subnet_id}
# #
let subnetCount = # let subnetCount =
if node.config.subscribeAllSubnets: # if node.config.subscribeAllSubnets:
DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint64 # DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint64
else: # else:
CUSTODY_REQUIREMENT.uint64 # CUSTODY_REQUIREMENT.uint64
let dc_subnets = get_custody_column_subnet(node.network.nodeId, subnetCount) # let dc_subnets = get_custody_column_subnet(node.network.nodeId, subnetCount)
for it in 0'u64 ..< DATA_COLUMN_SIDECAR_SUBNET_COUNT: for it in 0'u64 ..< DATA_COLUMN_SIDECAR_SUBNET_COUNT:
closureScope: # Needed for inner `proc`; don't lift it out of loop. closureScope: # Needed for inner `proc`; don't lift it out of loop.
let subnet_id = it let subnet_id = it
if subnet_id in dc_subnets.get:
node.network.addValidator( node.network.addValidator(
getDataColumnSidecarTopic(digest, subnet_id), proc ( getDataColumnSidecarTopic(digest, subnet_id), proc (
dataColumnSidecar: DataColumnSidecar dataColumnSidecar: DataColumnSidecar