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
|
root = signed_block.root
|
||||||
custodiedColumnIndices = get_custody_columns(
|
custodiedColumnIndices = get_custody_columns(
|
||||||
self.network.nodeId,
|
self.network.nodeId,
|
||||||
localCustodySubnetCount)
|
max(SAMPLES_PER_SLOT.uint64, localCustodySubnetCount))
|
||||||
|
|
||||||
var
|
var
|
||||||
finalisedDataColumns: seq[DataColumnSidecar]
|
finalisedDataColumns: seq[DataColumnSidecar]
|
||||||
|
|
|
@ -282,7 +282,8 @@ proc constructValidCustodyPeers(rman: RequestManager,
|
||||||
let
|
let
|
||||||
localNodeId = rman.network.nodeId
|
localNodeId = rman.network.nodeId
|
||||||
localCustodyColumns =
|
localCustodyColumns =
|
||||||
localNodeId.get_custody_columns(localCustodySubnetCount)
|
localNodeId.get_custody_columns(max(SAMPLES_PER_SLOT.uint64,
|
||||||
|
localCustodySubnetCount))
|
||||||
|
|
||||||
var validPeers: seq[Peer]
|
var validPeers: seq[Peer]
|
||||||
|
|
||||||
|
@ -296,7 +297,8 @@ proc constructValidCustodyPeers(rman: RequestManager,
|
||||||
let
|
let
|
||||||
remoteNodeId = getNodeIdFromPeer(peer)
|
remoteNodeId = getNodeIdFromPeer(peer)
|
||||||
remoteCustodyColumns =
|
remoteCustodyColumns =
|
||||||
remoteNodeId.get_custody_columns(remoteCustodySubnetCount)
|
remoteNodeId.get_custody_columns(max(SAMPLES_PER_SLOT.uint64,
|
||||||
|
localCustodySubnetCount))
|
||||||
|
|
||||||
# If the remote peer custodies less columns than
|
# If the remote peer custodies less columns than
|
||||||
# our local node
|
# our local node
|
||||||
|
|
|
@ -286,7 +286,8 @@ proc getDataColumnSidecars[A, B](man: SyncManager[A, B], peer: A,
|
||||||
let
|
let
|
||||||
remoteNodeId = getNodeIdFromPeer(peer)
|
remoteNodeId = getNodeIdFromPeer(peer)
|
||||||
remoteCustodyColumns =
|
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!")
|
doAssert(not(req.isEmpty()), "Request must not be empty!")
|
||||||
debug "Requesting data column sidecars from peer", request = req
|
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])
|
notice "Data columns sent", data_column = shortLog(dataColumnsOpt[].get()[i])
|
||||||
let
|
let
|
||||||
metadata = router[].network.metadata.custody_subnet_count.uint64
|
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:
|
for dc in data_columns:
|
||||||
if dc.index in custody_columns:
|
if dc.index in custody_columns:
|
||||||
|
|
Loading…
Reference in New Issue