0

I've read the Nakamoto's paper "Bitcoin: a peer-to-peer electronic cash system". In paragraph Simplified Payment Verification he said that is possible to verify payments without running a full network node.

I don't understand how, having a Markle's Tree Root hash, verify payment. In fact, in order to check payment, I need to combine and hash all node of right or left branch, not just the root.

Moreover, how can choose which Root hash needs to get without see in all nodes?

2

You are right, in order to prove that a transaction is confirmed in a block you need more than only the Merkle root. The information needed is called the Merkle path and consists of the left/right leaf to your transaction node and the right/left parent, and so on up to the root.

Here is a graph depicting a Merkle path: http://chimera.labs.oreilly.com/books/1234000001802/ch07.html#merkle_tree_path

The Merkle root and path, and also the block headers of the blockchain, are requested from a selection of random Bitcoin nodes. Your SPV client cannot verify that the transaction is valid (not a double spend, correct signatures, etc.), but since it can verify that the transaction was included in a block with X confirmations, it can assume that the Bitcoin network accepted the transaction. Thus your SPV node will accept the transaction by trusting that the Bitcoin network only includes valid transactions to the blockchain.

| improve this answer | |
  • How can a node verify transaction? The node needs to run all blockchain blocks and Merkle's Tree is used only to proof the validity? – alessandro308 Mar 27 '16 at 14:22
  • The SPV node only uses the block headers, which do not contain all the many different transaction data, and are therefore only a few kilobytes in total. The Merkle root is in the header data. To check if a transaction has been confirmed by the network, the SPV client challenges a random selection of full nodes by asking for a Merkle path for the transaction. The path does not contain the total tree, since it only needs to follow up the transaction to the root, as can be seen from the graph. If the root is known, it is not feasible to construct a "fake" Merkle path for a transaction. – Bjarne Magnussen Mar 27 '16 at 17:03
0

I need to combine and hash all node of right or left branch

Or you can be given most of those values. If someone gives you the value for the right branch then you don't need any further info on that whole side of the tree. And if eventually you end up with the correct value for the root hash then you know they didn't lie to you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.