apply column subnet filtering only in Deneb message handlers
This commit is contained in:
parent
6796b19883
commit
84da290669
|
@ -1160,10 +1160,11 @@ proc addDenebMessageHandlers(
|
||||||
debugEcho cs
|
debugEcho cs
|
||||||
|
|
||||||
for i in 0'u64 ..< targetSubnets:
|
for i in 0'u64 ..< targetSubnets:
|
||||||
let topic = getDataColumnSidecarTopic(forkDigest, i)
|
if i in custody_subnets.get:
|
||||||
debugEcho "Topic"
|
let topic = getDataColumnSidecarTopic(forkDigest, i)
|
||||||
debugEcho topic
|
debugEcho "Topic"
|
||||||
node.network.subscribe(topic, basicParams)
|
debugEcho topic
|
||||||
|
node.network.subscribe(topic, basicParams)
|
||||||
|
|
||||||
if node.config.subscribeAllSubnets:
|
if node.config.subscribeAllSubnets:
|
||||||
node.network.loadCscnetsMetadata(DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint8)
|
node.network.loadCscnetsMetadata(DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint8)
|
||||||
|
@ -2053,24 +2054,23 @@ 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
|
): ValidationResult =
|
||||||
): ValidationResult =
|
toValidationResult(
|
||||||
toValidationResult(
|
node.processor[].processDataColumnSidecar(
|
||||||
node.processor[].processDataColumnSidecar(
|
MsgSource.gossip, dataColumnSidecar, subnet_id)))
|
||||||
MsgSource.gossip, dataColumnSidecar, subnet_id)))
|
|
||||||
|
|
||||||
node.installLightClientMessageValidators()
|
node.installLightClientMessageValidators()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue