0 votes
1 view
in Blockchain by (12.8k points)

I was trying to understand how Merkle tree works in SPV and many other scenarios in blockchain technologies and couldn't get my head around this one question: how the Merkle path is generated in validating a transaction.

In the graph below, suppose I'd like to validate the transaction 2, I understand the hashes of 3, 01, 4567 and the root are needed, however, I'm wondering how this Merkel path is generated at the first place.

When the transaction 2 is given to the server/node, how does the server/node know which path to return for validating 2? If the server already knew this path, why doesn't the server validate it and why bother to return this path?

Thanks

1 Answer

0 votes
by (29.8k points)

Hi, so, in a Merkle tree, transaction IDs (txid) are checked to place the incoming transaction at the right location at the bottom of the Merkle tree, and the Merkle path is returned to the SPV for checking the content. It's easier for the servers to return the Merkle path than to check very transaction to reduce the work-load. Hope this made things clearer

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...