celestiaorg / celestiaorg/nmt

New verify and create functions are needed for NamespaceMerkleTreeInclusionProof.

Open
#46 5 comments 3 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
122
Forks
53
Avg merge
1d 15h
Merged PRs (30d)
5

Description

A new verify function is needed to verify a single share via a [NamespaceMerkleTreeInclusionProof](https://github.com/celestiaorg/celestia-specs/blob/master/src/specs/data_structures.md#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](https://github.com/celestiaorg/celestia-specs/blob/master/src/specs/data_structures.md#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](https://github.com/celestiaorg/celestia-specs/blob/master/src/specs/data_structures.md#namespacemerkletreeinclusionproof). This function should take the index of the [Share](https://github.com/celestiaorg/celestia-specs/blob/master/src/specs/data_structures.md#share) inside the NMT and output the NamespaceMerkleTreeInclusionProof corresponding to the share.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.