Author

Topic: Merkle tree and Bitcoin block (Read 158 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
January 15, 2020, 12:18:34 PM
#2
That's because blocks don't contain the hashes. If it did, then you'd lose the transaction data itself which means you can't validate the transactions themselves.

The merkle tree is used for proving to clients that don't have the full block that a given transaction is in that block. A full node can provide such a client the block header and the path of merkle branches to a particular transaction so the client can be sure that that transaction was in the block.
member
Activity: 138
Merit: 25
January 15, 2020, 12:11:47 PM
#1
Merkle tree has a big adavantage compared to simple hash list: if we have 1000 transactions and must test one transaction, we compute only 10 hashes, not 1000.
But is problem - I analysed Bitcoin block and there is no hashes stored, there are transactions with inputs and outputs, hashes of transactions are computed, I don't see hashes of highest level, only merkleRoot.
Jump to: