Closed ggutoski closed 3 months ago
In file vid/src/advz.rs in function assemble_shares we have the following code snippet:
vid/src/advz.rs
assemble_shares
https://github.com/EspressoSystems/jellyfish/blob/92714a4cc509fac07b8e8fc321fc0271c5dbe6b6/vid/src/advz.rs#L915-L932
Here evals, proofs are mutable Vecs and we use mem::take to initialize a Share struct. This seems unnecessarily complex and obfuscated to me.
evals
proofs
mem::take
Share
We should be able to eliminate evals, proofs and simply move the relevant data directly into Share::evals, Share::evals_proof something like
Share::evals
Share::evals_proof
evals: all_storage_node_evals[i], evals_proof: aggregate_proofs[i],
Probably need to loop over a more idiomatic iterator instead of using i to index into these Vecs.
i
In file
vid/src/advz.rs
in functionassemble_shares
we have the following code snippet:https://github.com/EspressoSystems/jellyfish/blob/92714a4cc509fac07b8e8fc321fc0271c5dbe6b6/vid/src/advz.rs#L915-L932
Here
evals
,proofs
are mutable Vecs and we usemem::take
to initialize aShare
struct. This seems unnecessarily complex and obfuscated to me.We should be able to eliminate
evals
,proofs
and simply move the relevant data directly intoShare::evals
,Share::evals_proof
something likeProbably need to loop over a more idiomatic iterator instead of using
i
to index into these Vecs.