add: fetch subnetCount for super node when subscribeAllSubnets flag passed
This commit is contained in:
parent
aa390e9ada
commit
81b55faee2
|
@ -13,11 +13,12 @@ import
|
||||||
stew/results,
|
stew/results,
|
||||||
ssz_serialization/proofs,
|
ssz_serialization/proofs,
|
||||||
chronicles,
|
chronicles,
|
||||||
|
../beacon_node,
|
||||||
./[beacon_time, crypto],
|
./[beacon_time, crypto],
|
||||||
kzg4844/kzg_ex,
|
kzg4844/kzg_ex,
|
||||||
eth/p2p/discoveryv5/[node],
|
eth/p2p/discoveryv5/[node],
|
||||||
./helpers,
|
./helpers,
|
||||||
|
|
||||||
./datatypes/[eip7594, deneb]
|
./datatypes/[eip7594, deneb]
|
||||||
|
|
||||||
proc sortedColumnIndices*(columnsPerSubnet: ColumnIndex, subnetIds: HashSet[uint64]): seq[ColumnIndex] =
|
proc sortedColumnIndices*(columnsPerSubnet: ColumnIndex, subnetIds: HashSet[uint64]): seq[ColumnIndex] =
|
||||||
|
@ -29,6 +30,11 @@ proc sortedColumnIndices*(columnsPerSubnet: ColumnIndex, subnetIds: HashSet[uint
|
||||||
res.sort()
|
res.sort()
|
||||||
res
|
res
|
||||||
|
|
||||||
|
proc fetchCustodySubnetCount* (res: var uint64, conf: BeaconNode) =
|
||||||
|
res = CUSTODY_REQUIREMENT
|
||||||
|
if node.config.subscribeAllSubnets:
|
||||||
|
res = DATA_COLUMN_SIDECAR_SUBNET_COUNT
|
||||||
|
|
||||||
proc get_custody_column_subnet*(node_id: NodeId, custody_subnet_count: uint64): Result[HashSet[uint64], cstring] =
|
proc get_custody_column_subnet*(node_id: NodeId, custody_subnet_count: uint64): Result[HashSet[uint64], cstring] =
|
||||||
# fetches the subnets for custody column for the current node
|
# fetches the subnets for custody column for the current node
|
||||||
# assert custody_subnet_count <= DATA_COLUMN_SIDECAR_SUBNET_COUNT
|
# assert custody_subnet_count <= DATA_COLUMN_SIDECAR_SUBNET_COUNT
|
||||||
|
|
Loading…
Reference in New Issue