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

Create a rsmt2d.Tree interface wrapper for NamespacedMerkleTree #24

Closed
evan-forbes opened this issue Mar 18, 2021 · 2 comments
Closed

Comments

@evan-forbes
Copy link
Member

We need a wrapper that fulfills the rsmt2d.Tree interface. That wrapper will need to be able to create nmt roots assuming that the namespaces are included in the data being pushed, but only for the first half of the tree. This means the wrapper should be aware of the square size ahead of time.

realted ll-core issue

@liamsi
Copy link
Member

liamsi commented Mar 19, 2021

That wrapper doesn't necessarily need to live in this repo, right? It could be in ll-core for instance. edit: NVM, just saw that you've already created a PR where the wrapper is in here 👍🏼 Let's not get blocked on this then. We can rip out the wrapper later then.

This means the wrapper should be aware of the square size ahead of time.

Another way to achieve the same could be to let ll-core prefix everything with namespace ID, even the parity bytes. Then the tree can differentiate between real shares and (second half) parity shares because the latter would carry the max. namespace.

@evan-forbes
Copy link
Member Author

I don't think it will be difficult to move the logic over to lazyledger-core, and it makes a lot of sense to keep all lazyledger-core logic in lazyledger-core, so I'll close this issue along with the PR.

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.

2 participants