feat: higher FRI arity - #2
Conversation
b6e61ae to
b299ada
Compare
| cur_folded_len /= 2; | ||
| } | ||
|
|
||
| let folded_matrix = RowMajorMatrix::new(folded.clone(), arity); |
There was a problem hiding this comment.
it would be best to avoid this folded.clone() since that's an entire matrix. below, can you use leaves in place of folded? it would make the code a little more readable too
There was a problem hiding this comment.
it actually makes the code uglier since leaves gives you only a reference, so the first fold will be a bit special. I'll also need to figure out how to pass that matrix reference to g.fold_matrix but with the width changed (to 2). do you know how to do that?
There was a problem hiding this comment.
at least for now, DenseMatrix has pub width so you could just do folded_matrix.width = 2 since the underlying storage is row major vector.
There was a problem hiding this comment.
leaves only give us an immutable reference
There was a problem hiding this comment.
noting we're leaving for now, but could probably use .as_view()
jonathanpwang
left a comment
There was a problem hiding this comment.
Mostly looks good to me but:
- there is an assumptions that two matrices don't have the same height, which is not necessarily true
- avoid clone of matrices
- add example in the code
One last thing I'm not sure about: if arity is 4 and we start with max height of 8, what happens? it will fold down to 2 and then stop? do we need the final poly height to equal 2?
c396e2c to
9908231
Compare
697ec61 to
90d461d
Compare
90d461d to
64639b0
Compare
* Another take on expanding Serializing Hasher. If we add methods to fields letting us decompose them in u8's/u32's we can have those decompositions work with the hashes. * Add Hashing trait to field * Adding comments and impls for all our fields * Added Comments * Comment improvements * Removing Undefined Behaviour * Implementing our own ArrayChunks * fmt * Adding tests * Fixing a big. (Turns out testing things can be useful...) * Using macro's to avoid duplicated implementations. * Minor comments and improving IntoRawBytes for extension fields. * comment fixes.
No description provided.