As per title. When constructing a Merkle tree we pass in &[LeafType] which is then cloned and stored in the struct, never to be accessed again (it is used internally to generate proofs and multiproofs).
Often, when you want to generate a proof you also want to send along the Leaf associated to it, and currently there is no easy way to do this (other than carrying the full leaves around, effectively doubling your mem consumption).
As per title. When constructing a Merkle tree we pass in
&[LeafType]
which is then cloned and stored in the struct, never to be accessed again (it is used internally to generate proofs and multiproofs). Often, when you want to generate a proof you also want to send along the Leaf associated to it, and currently there is no easy way to do this (other than carrying the full leaves around, effectively doubling your mem consumption).See, for example, https://github.com/WizardOfMenlo/stir/blob/2e95b1a6b42a827508d7d8d9e14a48e4af375380/src/stir/prover.rs#L23 and https://github.com/WizardOfMenlo/stir/blob/2e95b1a6b42a827508d7d8d9e14a48e4af375380/src/stir/prover.rs#L150