-
Notifications
You must be signed in to change notification settings - Fork 42
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
VerifyInclusion over the subtree roots #178
Comments
+1, for now, we went with the approach that fetches all the leaves to optimize later. Once the Blob module lands, it will become blocking. |
to check my understanding of what is needed: if we know which nodes and leaves are needed, then the only remaining thing is to stick them in the |
Yes, so |
Which parameter does the argument Lines 301 to 305 in be509c3
|
Meant that this is the second implementation of VerifyInclusion. Sorry for the confusion 😅 |
I have a clarifying question. I interpret the diagram for an NMT like so:
where |
Previously my idea was to calculate over |
@vgonkivs, so should we close this one? |
why? The idea is the same: we should be able to reconstruct the tree using subtree roots. @rootulp suggested a better approach. |
From our private discussion, I had an impression that the approach is already implemented. But if not, then nvm |
No, I meant it will be easier to implement it than my |
@vgonkivs If what is described in this proposal is sufficient for your use-case, then we already have a private method verifyLeafHashes in the nmt lib that can take the hash of leaves, instead of the leaves, and can verify their inclusion, however, there is a constraint and that is all the leaf hashes should belong to the same namespace ID. We just need to make that method public. |
@staheri14, all leaf hashes will belong to the same nID.
yeah, I had the same thoughts. |
Currently, the node team is implementing a Blob Module that requires proof verification. We have
Included
method that ensures that the requested blob was included in the DAH at a certain height. As our light nodes do not store leaves, itwill be very complicated for them because they will have to request all leaves from other nodes and verify the inclusion.
In fact,
verifyInclusion
reconstructs the Merkle tree root from leaves andNodes
and compares it with the passed one.It will be very helpful for us if we could verify the inclusion using subtree roots(built from leaves). These subtree roots will be constructed on 1 level above the leaves.
For example, we want to reconstruct the tree using
f
andg
subtree roots(b will be stored inNodes
in the nmt.Proof)The text was updated successfully, but these errors were encountered: