From 66cb3ff54e4c2d3158ac399d08b3a46fbf25c47c Mon Sep 17 00:00:00 2001 From: Agnish Ghosh Date: Wed, 28 Aug 2024 18:03:21 +0530 Subject: [PATCH] only persist data columns after block validity --- beacon_chain/gossip_processing/block_processor.nim | 12 ++++++------ beacon_chain/sync/request_manager.nim | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/beacon_chain/gossip_processing/block_processor.nim b/beacon_chain/gossip_processing/block_processor.nim index bf992b165..47308b51b 100644 --- a/beacon_chain/gossip_processing/block_processor.nim +++ b/beacon_chain/gossip_processing/block_processor.nim @@ -700,12 +700,12 @@ proc storeBlock( for b in blobs: self.consensusManager.dag.db.putBlobSidecar(b[]) - # write data columns now that block has been written. - let data_columns = dataColumnsOpt.valueOr: DataColumnSidecars @[] - for c in data_columns: - self.consensusManager.dag.db.putDataColumnSidecar(c[]) - debug "Data column written to database!", - data_column = shortLog(c[]) + # # write data columns now that block has been written. + # let data_columns = dataColumnsOpt.valueOr: DataColumnSidecars @[] + # for c in data_columns: + # self.consensusManager.dag.db.putDataColumnSidecar(c[]) + # debug "Data column written to database!", + # data_column = shortLog(c[]) let addHeadBlockTick = Moment.now() diff --git a/beacon_chain/sync/request_manager.nim b/beacon_chain/sync/request_manager.nim index c0ad1abcd..a60212b69 100644 --- a/beacon_chain/sync/request_manager.nim +++ b/beacon_chain/sync/request_manager.nim @@ -33,7 +33,7 @@ const PARALLEL_REQUESTS* = 2 ## Number of peers we using to resolve our request. - PARALLEL_REQUESTS_DATA_COLUMNS* = 32 + PARALLEL_REQUESTS_DATA_COLUMNS* = 16 BLOB_GOSSIP_WAIT_TIME_NS* = 2 * 1_000_000_000 ## How long to wait for blobs to arrive over gossip before fetching.