Skip to content

Commit

Permalink
Correctly handle CosetEvals in compute_cells()
Browse files Browse the repository at this point in the history
  • Loading branch information
asn-d6 committed Apr 29, 2024
1 parent 7794766 commit 8ec433c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions specs/_features/eip7594/polynomial-commitments-sampling.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,12 +472,13 @@ def compute_cells(blob: Blob) -> Vector[Cell, CELLS_PER_EXT_BLOB]:
# ???
extended_data = fft_field(polynomial_coeff + [0] * FIELD_ELEMENTS_PER_BLOB,
compute_roots_of_unity(FIELD_ELEMENTS_PER_EXT_BLOB))
extended_data_rbo = CosetEvals(bit_reversal_permutation(extended_data))
extended_data_rbo = bit_reversal_permutation(extended_data)

cells = []
for cell_id in range(CELLS_PER_EXT_BLOB):
start = cell_id * FIELD_ELEMENTS_PER_CELL
end = (cell_id + 1) * FIELD_ELEMENTS_PER_CELL
cells.append(coset_evals_to_cell(extended_data_rbo[start:end]))
cells.append(coset_evals_to_cell(CosetEvals(extended_data_rbo[start:end])))
return cells
```

Expand Down

0 comments on commit 8ec433c

Please sign in to comment.