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

Duplicate definition of nmt proof #1429

Open
rach-id opened this issue Jul 25, 2024 · 0 comments · May be fixed by #1432
Open

Duplicate definition of nmt proof #1429

rach-id opened this issue Jul 25, 2024 · 0 comments · May be fixed by #1432

Comments

@rach-id
Copy link
Member

rach-id commented Jul 25, 2024

Similar to celestiaorg/celestia-app#3734, we have a duplicate of NMT proof between the nmt library and here:
NMT: https://github.com/celestiaorg/nmt/blob/main/pb/proof.proto
core:

// NMTProof is a proof of a namespace.ID in an NMT.
// In case this proof proves the absence of a namespace.ID
// in a tree it also contains the leaf hashes of the range
// where that namespace would be.
message NMTProof {
// Start index of this proof.
int32 start = 1;
// End index of this proof.
int32 end = 2;
// Nodes that together with the corresponding leaf values can be used to
// recompute the root and verify this proof. Nodes should consist of the max
// and min namespaces along with the actual hash, resulting in each being 48
// bytes each
repeated bytes nodes = 3;
// leafHash are nil if the namespace is present in the NMT. In case the
// namespace to be proved is in the min/max range of the tree but absent, this
// will contain the leaf hash necessary to verify the proof of absence. Leaf
// hashes should consist of the namespace along with the actual hash,
// resulting 40 bytes total.
bytes leaf_hash = 4;
}

It would be better if we have the proof only defined in a single place so that we don't end up making unnecessary type conversions/

@Eoous Eoous linked a pull request Jul 26, 2024 that will close this issue
3 tasks
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.

1 participant