Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .leaves() to MerkleTree #144

Open
WizardOfMenlo opened this issue Jun 6, 2024 · 2 comments · May be fixed by #155
Open

Add .leaves() to MerkleTree #144

WizardOfMenlo opened this issue Jun 6, 2024 · 2 comments · May be fixed by #155

Comments

@WizardOfMenlo
Copy link
Contributor

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

@mahmudsudo
Copy link

please can i take on this ?

@Pratyush
Copy link
Member

Sure, go ahead!

@mahmudsudo mahmudsudo linked a pull request Oct 28, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants