fix: get_data_column_sidecars

This commit is contained in:
Agnish Ghosh 2024-07-04 13:55:51 +05:30
parent 3bea5742f2
commit b927ddd65a
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
2 changed files with 7 additions and 5 deletions

View File

@ -241,8 +241,8 @@ proc get_data_column_sidecars*(signed_block: deneb.SignedBeaconBlock | electra.S
column: column, column: column,
kzgCommitments: blck.body.blob_kzg_commitments, kzgCommitments: blck.body.blob_kzg_commitments,
kzgProofs: kzgProofOfColumn, kzgProofs: kzgProofOfColumn,
signed_block_header: signed_block_header signed_block_header: signed_block_header,
kzg_commitments_inclusion_proof: kzg_incl_proof
) )
ok(sidecars) ok(sidecars)

View File

@ -31,11 +31,13 @@ const
## `beaconBlocksByRoot` invocation. ## `beaconBlocksByRoot` invocation.
PARALLEL_REQUESTS* = 8 PARALLEL_REQUESTS* = 8
## Number of peers we using to resolve our request. ## Number of peers we using to resolve our request.
PARALLEL_REQUESTS_DATA_COLUMNS* = 50
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* = 8 * 1_000_000_000 DATA_COLUMN_GOSSIP_WAIT_TIME_NS* = 500_000_000
POLL_INTERVAL = 1.seconds POLL_INTERVAL = 1.seconds
@ -563,8 +565,8 @@ proc requestManagerDataColumnLoop(
debug "Requesting detected missing data columns", columns = shortLog(columnIds) debug "Requesting detected missing data columns", columns = shortLog(columnIds)
let start = SyncMoment.now(0) let start = SyncMoment.now(0)
var workers: var workers:
array[PARALLEL_REQUESTS, Future[void].Raising([CancelledError])] array[PARALLEL_REQUESTS_DATA_COLUMNS, Future[void].Raising([CancelledError])]
for i in 0..<PARALLEL_REQUESTS: for i in 0..<PARALLEL_REQUESTS_DATA_COLUMNS:
workers[i] = rman.fetchDataColumnsFromNetwork(columnIds) workers[i] = rman.fetchDataColumnsFromNetwork(columnIds)
await allFutures(workers) await allFutures(workers)