disable peer quota
This commit is contained in:
parent
1b5e9cf891
commit
4bd6ead294
|
@ -66,6 +66,8 @@ type
|
||||||
|
|
||||||
DataColumnSidecars* = seq[ref DataColumnSidecar]
|
DataColumnSidecars* = seq[ref DataColumnSidecar]
|
||||||
|
|
||||||
|
DataColumnSidecarList* = List[ColumnIndex, NUMBER_OF_COLUMNS]
|
||||||
|
|
||||||
DataColumnIdentifier* = object
|
DataColumnIdentifier* = object
|
||||||
block_root*: Eth2Digest
|
block_root*: Eth2Digest
|
||||||
index*: ColumnIndex
|
index*: ColumnIndex
|
||||||
|
|
|
@ -336,7 +336,6 @@ proc getDataColumnSidecars[A, B](man: SyncManager[A, B], peer: A,
|
||||||
localNodeId.get_custody_column_list(max(SAMPLES_PER_SLOT.uint64,
|
localNodeId.get_custody_column_list(max(SAMPLES_PER_SLOT.uint64,
|
||||||
localCustodySubnetCount))
|
localCustodySubnetCount))
|
||||||
|
|
||||||
debug "Checking valid custody peers before range request", request = req
|
|
||||||
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
|
||||||
|
@ -372,6 +371,9 @@ func groupDataColumns*[T](req: SyncRequest[T],
|
||||||
grouped[block_idx].add(data_column_sidecar)
|
grouped[block_idx].add(data_column_sidecar)
|
||||||
inc column_cursor
|
inc column_cursor
|
||||||
|
|
||||||
|
debugEcho "Column Cursor"
|
||||||
|
debugEcho column_cursor
|
||||||
|
|
||||||
if column_cursor != len(data_columns):
|
if column_cursor != len(data_columns):
|
||||||
# we reached end of blocks without consuming all data columns so either
|
# we reached end of blocks without consuming all data columns so either
|
||||||
# the peer we got too few blocks in the paired request, or the
|
# the peer we got too few blocks in the paired request, or the
|
||||||
|
@ -642,7 +644,7 @@ proc syncStep[A, B](man: SyncManager[A, B], index: int, peer: A)
|
||||||
let groupedDataColumns = groupDataColumns(req, blockData, dataColumnData)
|
let groupedDataColumns = groupDataColumns(req, blockData, dataColumnData)
|
||||||
if groupedDataColumns.isErr():
|
if groupedDataColumns.isErr():
|
||||||
# peer.updateScore(PeerScoreNoValues)
|
# peer.updateScore(PeerScoreNoValues)
|
||||||
man.queue.push(req)
|
# man.queue.push(req)
|
||||||
# warn "Received data columns is inconsistent",
|
# warn "Received data columns is inconsistent",
|
||||||
# data_columns_map = getShortMap(req, dataColumnData), request = req, msg=groupedDataColumns.error()
|
# data_columns_map = getShortMap(req, dataColumnData), request = req, msg=groupedDataColumns.error()
|
||||||
return
|
return
|
||||||
|
|
|
@ -24,7 +24,7 @@ const
|
||||||
## Allow syncing ~64 blocks/sec (minus request costs)
|
## Allow syncing ~64 blocks/sec (minus request costs)
|
||||||
blobResponseCost = allowedOpsPerSecondCost(1000)
|
blobResponseCost = allowedOpsPerSecondCost(1000)
|
||||||
## Multiple can exist per block, they are much smaller than blocks
|
## Multiple can exist per block, they are much smaller than blocks
|
||||||
dataColumnResponseCost = allowedOpsPerSecondCost(1000)
|
dataColumnResponseCost = allowedOpsPerSecondCost(8000)
|
||||||
## 1 blob has an equivalent memory of 8 data columns
|
## 1 blob has an equivalent memory of 8 data columns
|
||||||
|
|
||||||
type
|
type
|
||||||
|
@ -484,12 +484,15 @@ p2pProtocol BeaconSync(version = 1,
|
||||||
if blockIds[i].slot.epoch >= dag.cfg.DENEB_FORK_EPOCH and
|
if blockIds[i].slot.epoch >= dag.cfg.DENEB_FORK_EPOCH and
|
||||||
not dag.head.executionValid:
|
not dag.head.executionValid:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
let uncompressedLen = uncompressedLenFramed(bytes).valueOr:
|
let uncompressedLen = uncompressedLenFramed(bytes).valueOr:
|
||||||
warn "Cannot read data column sidecar size, database, corrupt",
|
warn "Cannot read data column sidecar size, database, corrupt",
|
||||||
bytes = bytes.len(), blck = shortLog(blockIds[i])
|
bytes = bytes.len(), blck = shortLog(blockIds[i])
|
||||||
continue
|
continue
|
||||||
peer.awaitQuota(dataColumnResponseCost, "data_column_sidecars_by_range/1")
|
|
||||||
peer.network.awaitQuota(dataColumnResponseCost, "data_column_sidecars_by_range/1")
|
# peer.awaitQuota(dataColumnResponseCost, "data_column_sidecars_by_range/1")
|
||||||
|
# peer.network.awaitQuota(dataColumnResponseCost, "data_column_sidecars_by_range/1")
|
||||||
|
|
||||||
await response.writeBytesSZ(
|
await response.writeBytesSZ(
|
||||||
uncompressedLen, bytes,
|
uncompressedLen, bytes,
|
||||||
peer.network.forkDigestAtEpoch(blockIds[i].slot.epoch).data)
|
peer.network.forkDigestAtEpoch(blockIds[i].slot.epoch).data)
|
||||||
|
|
Loading…
Reference in New Issue