Quantcast
Channel: Active questions tagged merkle-tree - Bitcoin Stack Exchange
Viewing all articles
Browse latest Browse all 94

What is the canonical way of creating merkle tree branches?

$
0
0

I'm currently looking into creating some compact merkle tree branches to prove that a given hash was included in a given merkle root. My initial thought was to list the leaf, the merkle root and all of the hashes that the given leaf was combined with to make the merkle root.

So in this example:

enter image description here

I would state

Leaf: 12c5Root: 2f9cNodes: [d187, a8b5, 1328, d063]

However, since the order of nodes matter for creating the merkle root, I would also need to list whether the node was on the left or right side.

I'm wondering - is there a canonical way of listing this information to create the merkle branches?


Viewing all articles
Browse latest Browse all 94

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>