Commit d31eecf
committed
halo2_proofs: Fix oversized initialization of
If `commitment_data.point_indices` contains duplicate indices, then
`point_index_set` will be shorter. The old code initialized
`commitment_data.evals` to be the same size as `point_indices`, which
then left entries near the end without evaluations.
Before the bugfix to reject two queries with the same point and
commitment but different evaluations, this would have resulted in
`commitment_data.evals` being returned with invalid "default" entries at
the end. Fortunately this was not an observable bug as the code using
`commitment_data.evals` does not index it using
`commitment_data.point_indices`.
After the bugfix (which changed the default `commitment_data.evals`
entries to `None` internally), this would have resulted in a panic at
the end of `construct_intermediate_sets` (which expects all evaluations
to be provided).
We now directly initialize `commitment_data.evals` to the correct
length.commitment_data.evals
1 parent dfe9fc1 commit d31eecf
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
205 | | - | |
206 | 206 | | |
207 | | - | |
208 | | - | |
209 | | - | |
| 207 | + | |
210 | 208 | | |
211 | 209 | | |
212 | 210 | | |
| |||
0 commit comments