Skip to content

Commit 228752c

Browse files
committed
In batch cell verification, check if there are zero cells
1 parent 9be0529 commit 228752c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

specs/_features/eip7594/polynomial-commitments-sampling.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,10 @@ def verify_cell_kzg_proof_batch_impl(row_commitments: Sequence[KZGCommitment],
511511
n = FIELD_ELEMENTS_PER_CELL
512512
num_rows = len(row_commitments)
513513

514+
# Given zero cells, the result is true
515+
if num_cells == 0:
516+
return True
517+
514518
# Step 1: Compute a challenge r and its powers r^0, ..., r^{num_cells-1}
515519
r = compute_verify_cell_kzg_proof_batch_challenge(
516520
row_commitments,
@@ -567,7 +571,6 @@ def verify_cell_kzg_proof_batch_impl(row_commitments: Sequence[KZGCommitment],
567571
]))
568572
```
569573

570-
571574
### Cell cosets
572575

573576
#### `coset_shift_for_cell`

0 commit comments

Comments
 (0)