Rid result from `get_custody_column_subnets` (#6543)

* ditch results in get custody column subnets

* fix other part
This commit is contained in:
Agnish Ghosh 2024-09-11 16:19:01 +05:30 committed by GitHub
parent 1503c7dffe
commit a2a7cab76d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 7 deletions

View File

@ -40,15 +40,12 @@ func sortedColumnIndexList*(columnsPerSubnet: ColumnIndex,
func get_custody_column_subnets*(node_id: NodeId,
custody_subnet_count: uint64):
Result[HashSet[uint64], cstring] =
HashSet[uint64] =
# Decouples the custody subnet computation part from
# `get_custody_columns`, in order to later use this subnet list
# in order to maintain subscription to specific column subnets.
if not (custody_subnet_count <= DATA_COLUMN_SIDECAR_SUBNET_COUNT):
return err("Eip7594: Custody subnet count exceeds the DATA_COLUMN_SIDECAR_SUBNET_COUNT")
var
subnet_ids: HashSet[uint64]
current_id = node_id
@ -72,7 +69,7 @@ func get_custody_column_subnets*(node_id: NodeId,
current_id = NodeId(StUint[256].zero)
current_id += NodeId(StUint[256].one)
ok(subnet_ids)
subnet_ids
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/_features/eip7594/das-core.md#get_custody_columns
func get_custody_columns*(node_id: NodeId,
@ -80,7 +77,7 @@ func get_custody_columns*(node_id: NodeId,
seq[ColumnIndex] =
let
subnet_ids =
get_custody_column_subnets(node_id, custody_subnet_count).get
get_custody_column_subnets(node_id, custody_subnet_count)
const
columns_per_subnet =
NUMBER_OF_COLUMNS div DATA_COLUMN_SIDECAR_SUBNET_COUNT
@ -95,7 +92,7 @@ func get_custody_column_list*(node_id: NodeId,
# before sending, data_column_sidecars_by_range requests
let
subnet_ids =
get_custody_column_subnets(node_id, custody_subnet_count).get
get_custody_column_subnets(node_id, custody_subnet_count)
const
columns_per_subnet =
NUMBER_OF_COLUMNS div DATA_COLUMN_SIDECAR_SUBNET_COUNT