Categories
Bitcoin Cryptocurrency Mastering Development

How Does the SPV merkle path form of multiple transactions in Merkle block looks like?

While I’m studying about the Bitcoin, I’ve wondered how many merkle paths should be contained in merkle block.

From the point of view of Merkle path, it is generated as the form of containing hashes of counterpart stepping up from bottom to top.

For example, if I have 4 transactions(let me use tx1, tx2, tx3, and tx4) in a block, then the hashes of them(h1, h2, h3, and h4) will be located at the bottom as the leaves. The parents of them will be (h12 and h34), after all, the merkle roots will be (h1234). So, if a SPV node want to verify that the tx2 is in the block, the full node can offer h1, h34 as a merkle path (as well as block header), so that they can prove as the step of hashing will lead them to the merkle roots which is contained in block header.

However, If I requests to verify multiple transactions in a block (e.g. using Bloom filter), then what would be contained into the merkle block (which contains merkle path and block header)?

Does they have ultiple merkle paths for each transactions which are interested in, so that the transactions can be verified respectively? or adapted merkle path to be included which encompass all transactions related? (e.g. if we want to verify tx1, tx3 then generating h2, h3; though this exmample seems not to be guaranteed to show the order of transactions)

Leave a Reply

Your email address will not be published. Required fields are marked *