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

Explore if we want to store inner nodes (in memory) too #17

Open
liamsi opened this issue Jan 19, 2021 · 5 comments
Open

Explore if we want to store inner nodes (in memory) too #17

liamsi opened this issue Jan 19, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@liamsi
Copy link
Member

liamsi commented Jan 19, 2021

See discussion: #16 (comment)

@liamsi
Copy link
Member Author

liamsi commented Mar 20, 2021

Revisiting this issue: we are already able to store the inner nodes on ipfs/the ipld merkle dag via that visitor I've added (see for instance the PRs that Evan added to lazyledger-core: celestiaorg/celestia-core#178 and specifically this visitor allows us to create a batch of ipld nodes, that on calling Commit on the batch are persisted locally and can be requested.

Of course, this is not in memory but storing the nodes in memory would simply be an optimization that would allow not to recompute the inner hashes each time. This is not really urgent and could be done in combination with #15 .

@musalbas
Copy link
Member

musalbas commented Sep 12, 2023

This is probably more important now in the context of celestia-node's storage optimizations roadmap. As we don't want to store proofs on-disk, we will want to cache them in-memory. cc @Wondertan

@Wondertan
Copy link
Member

For some reason I assumed that is already the case. We will definitely need NMT proofs caching to be provided by nmt lib once we start moving away from IPLDv0 based proofs and caching.

@musalbas
Copy link
Member

Right now NMT caches the leaf hashes, but not inner nodes.

@Wondertan
Copy link
Member

Related: celestiaorg/rsmt2d#260 (comment)

We would need to ensure that rsmt2d.Tree and NMT wrapper are compatible with proofs caching, as we don't interact with NMT directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: TODO
Development

No branches or pull requests

3 participants