gossip and polling fixes

This commit is contained in:
Agnish Ghosh 2024-10-05 02:03:50 +05:30
parent 445a1f249c
commit 49977242bd
2 changed files with 2 additions and 6 deletions

View File

@ -522,8 +522,6 @@ proc validateDataColumnSidecar*(
# (block_header.slot, block_header.proposer_index, blob_sidecar.index) # (block_header.slot, block_header.proposer_index, blob_sidecar.index)
# with valid header signature, sidecar inclusion proof, and kzg proof. # with valid header signature, sidecar inclusion proof, and kzg proof.
let block_root = hash_tree_root(block_header) let block_root = hash_tree_root(block_header)
if dag.getBlockRef(block_root).isSome():
return errIgnore("DataColumnSidecar: already have block")
if dataColumnQuarantine[].hasDataColumn( if dataColumnQuarantine[].hasDataColumn(
block_header.slot, block_header.proposer_index, data_column_sidecar.index): block_header.slot, block_header.proposer_index, data_column_sidecar.index):
return errIgnore("DataColumnSidecar: already have valid data column from same proposer") return errIgnore("DataColumnSidecar: already have valid data column from same proposer")

View File

@ -38,10 +38,9 @@ const
BLOB_GOSSIP_WAIT_TIME_NS* = 2 * 1_000_000_000 BLOB_GOSSIP_WAIT_TIME_NS* = 2 * 1_000_000_000
## How long to wait for blobs to arrive over gossip before fetching. ## How long to wait for blobs to arrive over gossip before fetching.
DATA_COLUMN_GOSSIP_WAIT_TIME_NS* = 5 * 1_000_000_000 DATA_COLUMN_GOSSIP_WAIT_TIME_NS* = 2 * 1_000_000_000
POLL_INTERVAL = 1.seconds POLL_INTERVAL = 1.seconds
POLL_INTERVAL_FOR_DATA_COLUMNS = 60.seconds
type type
@ -532,7 +531,6 @@ proc getMissingDataColumns(rman: RequestManager): seq[DataColumnIdentifier] =
fetches: seq[DataColumnIdentifier] fetches: seq[DataColumnIdentifier]
ready: seq[Eth2Digest] ready: seq[Eth2Digest]
return fetches
for columnless in rman.quarantine[].peekColumnless(): for columnless in rman.quarantine[].peekColumnless():
withBlck(columnless): withBlck(columnless):
when consensusFork >= ConsensusFork.Deneb: when consensusFork >= ConsensusFork.Deneb:
@ -577,7 +575,7 @@ proc requestManagerDataColumnLoop(
rman: RequestManager) {.async: (raises: [CancelledError]).} = rman: RequestManager) {.async: (raises: [CancelledError]).} =
while true: while true:
await sleepAsync(POLL_INTERVAL_FOR_DATA_COLUMNS) await sleepAsync(POLL_INTERVAL)
if rman.inhibit(): if rman.inhibit():
continue continue