Skip to content

Commit

Permalink
Add a cell_id range check in recover_all_cells()
Browse files Browse the repository at this point in the history
This is actually covered by test vectors
  • Loading branch information
asn-d6 committed May 14, 2024
1 parent 2abf4ce commit cd3b951
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions specs/_features/eip7594/polynomial-commitments-sampling.md
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,9 @@ def recover_all_cells(cell_ids: Sequence[CellID], cells: Sequence[Cell]) -> Sequ
# Check that each cell is the correct length
for cell in cells:
assert len(cell) == BYTES_PER_CELL
# Check that the cell ids are within bounds
for cell_id in cells_ids:
assert cell_id < CELLS_PER_EXT_BLOB

# Get the extended domain
roots_of_unity_extended = compute_roots_of_unity(FIELD_ELEMENTS_PER_EXT_BLOB)
Expand Down

0 comments on commit cd3b951

Please sign in to comment.