When you have A
, HB and HAB you may clearly examine whether or not A
suits. As Jestin famous that is primarily a full Merkle tree with two leaves.
Nonetheless, as a skinny consumer, you solely have available the Merkle root (which is within the block header) and get advised about A
. The intermediate ranges of the Merkle tree usually are not supplied, due to this fact, to calculate them, you’d want the block’s full set of transactions.
Picture by way of Mastering Bitcoin
So, for a skinny consumer, we calculate the Merkle department as a substitute. For the Merkle department, we simply want the transaction’s place within the block’s transaction listing and the hashing companions at every degree, as a substitute of the entire set of transactions. A Merkle department is impractical to faux as a result of it might require discovering of a hash collision (which isn’t doable, or mining would not work). So by going up the tree and mixing our outcome with the respective hashing associate at every degree, we lastly get the Merkle root. Thus we will show membership of the transaction within the block.
Within the instance picture, you solely want to offer the blue data to hyperlink HOkay to the Merkle root, whereas checking the entire Merkle tree would require all transactions from A to P and the Merkle root.