@@ -186,54 +186,6 @@ proc recover_cells_and_proofs_parallel*(
186186 res[i] = futRes.get
187187 ok (res)
188188
189- proc recover_cells_and_proofs * (
190- data_columns: seq [ref fulu.DataColumnSidecar ]):
191- Result [seq [CellsAndProofs ], cstring ] =
192- # # This helper recovers blobs from the data column sidecars
193- if data_columns.len == 0 :
194- return err (" DataColumnSidecar: Length should not be 0" )
195-
196- let start = Moment .now ()
197-
198- let
199- columnCount = data_columns.len
200- blobCount = data_columns[0 ].column.len
201-
202- for data_column in data_columns:
203- if not (blobCount == data_column.column.len):
204- return err (" DataColumns do not have the same length" )
205-
206- var
207- recovered_cps =
208- newSeq [CellsAndProofs ](blobCount)
209-
210- for blobIdx in 0 ..< blobCount:
211- var
212- bIdx = blobIdx
213- cell_ids = newSeqOfCap [CellIndex ](columnCount)
214- ckzgCells = newSeqOfCap [KzgCell ](columnCount)
215-
216- for col in data_columns:
217- cell_ids.add col[].index
218-
219- let
220- column = col[].column
221- cell = column[bIdx]
222-
223- ckzgCells.add cell
224-
225- # Recovering the cells and proofs
226- let recovered_cells_and_proofs =
227- recoverCellsAndKzgProofs (cell_ids, ckzgCells)
228- if not recovered_cells_and_proofs.isOk:
229- return err (" Failed to compute cells and proofs" )
230-
231- recovered_cps[bIdx] =
232- recovered_cells_and_proofs.get
233- let finish = Moment .now ()
234- debug " Time taken to reconstruct sequentially" , time = finish- start
235- ok (recovered_cps)
236-
237189proc assemble_data_column_sidecars * (
238190 signed_beacon_block: fulu.SignedBeaconBlock | gloas.SignedBeaconBlock ,
239191 blobs: seq [KzgBlob ], cell_proofs: seq [KzgProof ]): seq [fulu.DataColumnSidecar ] =
0 commit comments