From 986e1f5d838938409623a85888cbf8fd2e680f93 Mon Sep 17 00:00:00 2001 From: Agnish Ghosh Date: Thu, 17 Oct 2024 19:27:58 +0530 Subject: [PATCH] response cost --- beacon_chain/sync/sync_manager.nim | 5 +++-- beacon_chain/sync/sync_protocol.nim | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/beacon_chain/sync/sync_manager.nim b/beacon_chain/sync/sync_manager.nim index 3c8bbe9de..008a97ebf 100644 --- a/beacon_chain/sync/sync_manager.nim +++ b/beacon_chain/sync/sync_manager.nim @@ -712,8 +712,9 @@ proc syncWorker[A, B](man: SyncManager[A, B], index: int) {.async: (raises: [Can await man.syncStep(index, peer) man.pool.release(peer) peer = nil - man.pool.release(peer) - peer = nil + else: + man.pool.release(peer) + peer = nil finally: if not(isNil(peer)): man.pool.release(peer) diff --git a/beacon_chain/sync/sync_protocol.nim b/beacon_chain/sync/sync_protocol.nim index 51843f1bd..f89a715c4 100644 --- a/beacon_chain/sync/sync_protocol.nim +++ b/beacon_chain/sync/sync_protocol.nim @@ -24,7 +24,7 @@ const ## Allow syncing ~64 blocks/sec (minus request costs) blobResponseCost = allowedOpsPerSecondCost(1000) ## Multiple can exist per block, they are much smaller than blocks - dataColumnResponseCost = allowedOpsPerSecondCost(32000) + dataColumnResponseCost = allowedOpsPerSecondCost(1000) ## 1 blob has an equivalent memory of 8 data columns type