-
Notifications
You must be signed in to change notification settings - Fork 44
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
New verify and create functions are needed for NamespaceMerkleTreeInclusionProof. #46
Comments
What is wrong with the existing verify method? I think this was implemented even before the spec defined this. Line 209 in 1d72cff
Note that this type got removed as per #48.
Similarly, what is wrong with: Line 122 in 1d72cff
|
NamespaceMerkleTreeInclusionProof as defined in celestia-specs is different from the proof of type Proof that is currently defined. @evan-forbes and I were actually thinking that NamespaceMerkleTreeInclusionProof as defined in the specs should be changed to match the existing Proof struct rather than writing two new functions and defining a new proof struct matching the specs. This should be discussed with @adlerjohn who has written the spec. |
I think what is missing in the specs is a range proof for the whole namespace which is needed for what is called application proofs in the LL paper. This is also related: celestiaorg/celestia-specs#48 |
Is the requested modification in this issue still required? |
I don't think so. cc @evan-forbes for confirmation |
A new verify function is needed to verify a single share via a NamespaceMerkleTreeInclusionProof defined in celestia-specs.
This function should take (i) a NMT root of type namespace.IntervalDigest, (ii) a hash function of type hash.Hash, (iii) a proof of type NamespaceMerkleTreeInclusionProof and (iv) a share of type Share, and output a boolean and an error that is (true, nil) if the share is committed by the NMT root inside the NMT and the proof of type NamespaceMerkleTreeInclusionProof is correct.
Similarly, a new create function is needed to create a NamespaceMerkleTreeInclusionProof. This function should take the index of the Share inside the NMT and output the NamespaceMerkleTreeInclusionProof corresponding to the share.
The text was updated successfully, but these errors were encountered: