only persist data columns after block validity

This commit is contained in:
Agnish Ghosh 2024-08-28 18:03:21 +05:30
parent b573caccc7
commit 66cb3ff54e
2 changed files with 7 additions and 7 deletions

View File

@ -700,12 +700,12 @@ proc storeBlock(
for b in blobs: for b in blobs:
self.consensusManager.dag.db.putBlobSidecar(b[]) self.consensusManager.dag.db.putBlobSidecar(b[])
# write data columns now that block has been written. # # write data columns now that block has been written.
let data_columns = dataColumnsOpt.valueOr: DataColumnSidecars @[] # let data_columns = dataColumnsOpt.valueOr: DataColumnSidecars @[]
for c in data_columns: # for c in data_columns:
self.consensusManager.dag.db.putDataColumnSidecar(c[]) # self.consensusManager.dag.db.putDataColumnSidecar(c[])
debug "Data column written to database!", # debug "Data column written to database!",
data_column = shortLog(c[]) # data_column = shortLog(c[])
let addHeadBlockTick = Moment.now() let addHeadBlockTick = Moment.now()

View File

@ -33,7 +33,7 @@ const
PARALLEL_REQUESTS* = 2 PARALLEL_REQUESTS* = 2
## Number of peers we using to resolve our request. ## 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 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.