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

For a block containing 'x' number of unverified transactions, how many SHA256d hashes are performed to obtain the hashmerkleroot?

$
0
0

I've been trying to understand this for a few days now.

I understand that the hashmerkleroot is the root node of a fully perfect binary tree. I also understand that the sha256d hashes would be the non-leaf/parent nodes of the tree and the sha256d hashes of the transactions would be the leaf nodes.

I also know that a fully perfect binary tree with 'x' leaves has 2x-1 nodes.

The question I'm trying to answer is what is the formula for the number of SHA256d hashes required to obtain the hashmerkleroot if the number of transactions to be hashed is 'x'? Is any of my understanding above incorrect?


Viewing all articles
Browse latest Browse all 94

Trending Articles



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