-
Notifications
You must be signed in to change notification settings - Fork 14
Remove statement fields from Merkle proofs #129
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All for removing the "statements" from the proof.
I'm also OK with explicitly stating the order of hashes but from @musalbas comment on discord he actually prefers to start from the root.
Maybe break out the uncontroversial changes (removing the statements) to get them merged quicker?
Since the NebulousLabs library starts from the leaf, I'm ok with starting from the leaf and being consistent there for all Merkle tees. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| --------------- | -------------------------------- | --------------------------------------------------------------- | | ||
| `siblingValues` | [HashDigest](#hashdigest)`[]` | Sibling hash values, ordered starting from the leaf's neighbor. | | ||
| `siblingMins` | [NamespaceID](#type-aliases)`[]` | Sibling min namespace IDs. | | ||
| `siblingMaxes` | [NamespaceID](#type-aliases)`[]` | Sibling max namespace IDs. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NamespaceMerkleTreeInclusionProof
is the inclusion proof for a single node right? Isn't siblingMins
and Maxes
implicitly included in siblingValues
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's only for the inclusion of a single leaf. The min and max sibling values are committed to in the hashes, but they're not known to a verifier. So they still need to be provided.
Fixes #67. Does not address #48.
Removes "statement" (i.e. what you're trying to prove) fields from Merkle proof structs. Also clarify ordering of hashes. Leaf-to-root order was chosen to conform to https://tools.ietf.org/html/rfc6962#section-2.1.1.
Thanks to @fubuloubu for the discussion that led to this clarification (https://twitter.com/jadler0/status/1362432558382936067).