I understood how the Merlke tree is built. I also understood that and why it is needed to check if a transaction belongs to the Merkle tree. Thanks to the tree structure, it is possible to check this with O(log n) operations instead of n.

I assume that the check starts from the Merkle root, and iteratively goes down to the leafs/transaction. Is it right?

Ok, but how do I know which hash pointer I should use? For instance, if I'm on a specific Merkle node and my transaction belongs to the left branch, how do I know I should surf the left branch, only having the hash (pointer) as input? Do I use other inputs or what?

  • This should be helpful for you: cs.stackexchange.com/questions/61019/… – renlord Dec 22 '16 at 23:07
  • Thanks, but it seems related to the opposite process. Changing the title from "How to surf the Merkle tree?" to "How to check if a transaction is included in the Merkle tree in practice?" – auino Dec 23 '16 at 8:56

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.