subnet sampling part 2
This commit is contained in:
parent
53af511488
commit
e8b64d8dd2
|
@ -1514,7 +1514,7 @@ proc tryReconstructingDataColumns* (self: BeaconNode,
|
|||
root = signed_block.root
|
||||
custodiedColumnIndices = get_custody_columns(
|
||||
self.network.nodeId,
|
||||
localCustodySubnetCount)
|
||||
max(SAMPLES_PER_SLOT.uint64, localCustodySubnetCount))
|
||||
|
||||
var
|
||||
finalisedDataColumns: seq[DataColumnSidecar]
|
||||
|
|
|
@ -282,7 +282,8 @@ proc constructValidCustodyPeers(rman: RequestManager,
|
|||
let
|
||||
localNodeId = rman.network.nodeId
|
||||
localCustodyColumns =
|
||||
localNodeId.get_custody_columns(localCustodySubnetCount)
|
||||
localNodeId.get_custody_columns(max(SAMPLES_PER_SLOT.uint64,
|
||||
localCustodySubnetCount))
|
||||
|
||||
var validPeers: seq[Peer]
|
||||
|
||||
|
@ -296,8 +297,9 @@ proc constructValidCustodyPeers(rman: RequestManager,
|
|||
let
|
||||
remoteNodeId = getNodeIdFromPeer(peer)
|
||||
remoteCustodyColumns =
|
||||
remoteNodeId.get_custody_columns(remoteCustodySubnetCount)
|
||||
|
||||
remoteNodeId.get_custody_columns(max(SAMPLES_PER_SLOT.uint64,
|
||||
localCustodySubnetCount))
|
||||
|
||||
# If the remote peer custodies less columns than
|
||||
# our local node
|
||||
# We skip it
|
||||
|
|
|
@ -286,7 +286,8 @@ proc getDataColumnSidecars[A, B](man: SyncManager[A, B], peer: A,
|
|||
let
|
||||
remoteNodeId = getNodeIdFromPeer(peer)
|
||||
remoteCustodyColumns =
|
||||
remoteNodeId.get_custody_column_list(remoteCustodySubnetCount)
|
||||
remoteNodeId.get_custody_column_list(max(SAMPLES_PER_SLOT.uint64,
|
||||
remoteCustodySubnetCount))
|
||||
|
||||
doAssert(not(req.isEmpty()), "Request must not be empty!")
|
||||
debug "Requesting data column sidecars from peer", request = req
|
||||
|
|
|
@ -196,7 +196,8 @@ proc routeSignedBeaconBlock*(
|
|||
notice "Data columns sent", data_column = shortLog(dataColumnsOpt[].get()[i])
|
||||
let
|
||||
metadata = router[].network.metadata.custody_subnet_count.uint64
|
||||
custody_columns = router[].network.nodeId.get_custody_columns(metadata)
|
||||
custody_columns = router[].network.nodeId.get_custody_columns(max(SAMPLES_PER_SLOT.uint64,
|
||||
metadata))
|
||||
|
||||
for dc in data_columns:
|
||||
if dc.index in custody_columns:
|
||||
|
|
Loading…
Reference in New Issue