Skip to content

Commit

Permalink
[no ci] add explanatory comment to address #385 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggutoski committed Oct 16, 2023
1 parent 6da991e commit 044e82c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion primitives/src/vid/advz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,13 @@ where
let mut coeffs: Vec<_> = coeffs_iter.collect();

This comment has been minimized.

Copy link
@chancharles92

chancharles92 Oct 16, 2023

Contributor

Is the set of values in elems_iter[i * payload_chunk_size...(i+1) * payload_chunk_size] the same as the poly evaluations computed in line 341? If so, do we need to re-compute the polynomial evaluations in line 341?

let pre_fft_len = coeffs.len();
self.eval_domain.fft_in_place(&mut coeffs);

// sanity check: the fft did not resize coeffs.
// If pre_fft_len != self.payload_chunk_size then we must be in the final chunk.
// In that case coeffs.len() could be anything, so there's nothing to sanity
// check.
if pre_fft_len == self.payload_chunk_size {
assert_eq!(coeffs.len(), pre_fft_len); // sanity
assert_eq!(coeffs.len(), pre_fft_len);
}

elems_len += pre_fft_len;
Expand Down

0 comments on commit 044e82c

Please sign in to comment.