From e5237d19a382340d0fa83c3ead00dec006e50405 Mon Sep 17 00:00:00 2001 From: Agnish Ghosh Date: Sun, 7 Jul 2024 02:06:13 +0530 Subject: [PATCH] cell and proof extraction --- beacon_chain/spec/eip7594_helpers.nim | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/beacon_chain/spec/eip7594_helpers.nim b/beacon_chain/spec/eip7594_helpers.nim index 84bc5ff0d..6bce81c24 100644 --- a/beacon_chain/spec/eip7594_helpers.nim +++ b/beacon_chain/spec/eip7594_helpers.nim @@ -23,6 +23,10 @@ import ./datatypes/[eip7594, deneb] +type + CellBytes = array[eip7594.CELLS_PER_EXT_BLOB, Cell] + ProofBytes = array[eip7594.CELLS_PER_EXT_BLOB, KzgProof] + proc sortedColumnIndices*(columnsPerSubnet: ColumnIndex, subnetIds: HashSet[uint64]): seq[ColumnIndex] = var res: seq[ColumnIndex] = @[] for i in 0 ..< columnsPerSubnet: @@ -238,16 +242,15 @@ proc get_data_column_sidecars*(signed_block: deneb.SignedBeaconBlock | let blobCount = blobs.len var - cells = newSeqOfCap[seq[Cell]](blobs.len) - proofs = newSeqOfCap[seq[KzgProof]](blobs.len) + cells = newSeqOfCap[CellBytes](blobs.len) + proofs = newSeqOfCap[ProofBytes](blobs.len) for i in 0..