diff --git a/beacon_chain/networking/eth2_network.nim b/beacon_chain/networking/eth2_network.nim index db6446c8e..793d5b792 100644 --- a/beacon_chain/networking/eth2_network.nim +++ b/beacon_chain/networking/eth2_network.nim @@ -1550,7 +1550,7 @@ proc getLowSubnets(node: Eth2Node, epoch: Epoch): findLowSubnets(getSyncCommitteeTopic, SyncSubcommitteeIndex, SYNC_COMMITTEE_SUBNET_COUNT) else: default(SyncnetBits), - findLowSubnets(getDataColumnSidecarTopic, uint64, DATA_COLUMN_SIDECAR_SUBNET_COUNT.int).countOnes.uint64 + findLowSubnets(getDataColumnSidecarTopic, uint64, DATA_COLUMN_SIDECAR_SUBNET_COUNT.int).countOnes.uint8 ) proc runDiscoveryLoop(node: Eth2Node) {.async.} = @@ -2598,7 +2598,7 @@ proc updateStabilitySubnetMetadata*(node: Eth2Node, attnets: AttnetBits) = else: debug "Stability subnets changed; updated ENR attnets", attnets -proc loadCscnetsMetadata*(node: Eth2Node, cscnets: uint64) = +proc loadCscnetsMetadata*(node: Eth2Node, cscnets: CscCount) = if node.metadata.custody_subnet_count == cscnets: return diff --git a/beacon_chain/nimbus_beacon_node.nim b/beacon_chain/nimbus_beacon_node.nim index f01864094..f64cfe4b1 100644 --- a/beacon_chain/nimbus_beacon_node.nim +++ b/beacon_chain/nimbus_beacon_node.nim @@ -1154,13 +1154,13 @@ proc addDenebMessageHandlers( node.network.subscribe(topic, basicParams) if node.config.subscribeAllSubnets: - node.network.loadCscnetsMetadata(DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint64) + node.network.loadCscnetsMetadata(DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint8) elif not node.config.subscribeAllSubnets: let csc = node.config.custodySubnetCount if csc.isSome and csc.get < DATA_COLUMN_SIDECAR_SUBNET_COUNT: - node.network.loadCscnetsMetadata(csc.get.uint64) + node.network.loadCscnetsMetadata(csc.get.uint8) else: - node.network.loadCscnetsMetadata(CUSTODY_REQUIREMENT.uint64) + node.network.loadCscnetsMetadata(CUSTODY_REQUIREMENT.uint8) proc addElectraMessageHandlers( node: BeaconNode, forkDigest: ForkDigest, slot: Slot) = diff --git a/beacon_chain/spec/datatypes/eip7594.nim b/beacon_chain/spec/datatypes/eip7594.nim index 4a6ac0e64..69769a082 100644 --- a/beacon_chain/spec/datatypes/eip7594.nim +++ b/beacon_chain/spec/datatypes/eip7594.nim @@ -77,7 +77,7 @@ type column_index*: ColumnIndex row_index*: RowIndex - CscCount* = uint64 + CscCount* = uint8 # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/_features/eip7594/p2p-interface.md#metadata MetaData* = object