How a merkle tree is generated

+1 vote

I have heard that SPV nodes doesn't need the copy of entire blockchain for verification. It is said that Merkle trees are used by such nodes. I have a doubt that how Merkle tree path is generated and how does it help in validating transaction??

Apr 5, 2018 in Blockchain by Christine
• 15,790 points

edited Apr 5, 2018 by Christine 853 views

2 answers to this question.

+1 vote

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. Hence, the whole process works out.

The transactions at the bottom are sorted by txid, and the hashed values are calculated for the entire transaction block.

answered Apr 5, 2018 by Shashank
• 10,400 points
0 votes
Merkle trees are generated like this: The hash of leaf node pair is created and the parent hash is generated. Then these parent pair are hashed to generate their parent hash and this continues until there's only on parent left(the root node).
answered Aug 9, 2018 by Krishna

Related Questions In Blockchain

+4 votes
5 answers

How is Blockchain a distributed database?

Think of blockchain as a relatively slow, ...READ MORE

answered Mar 26, 2018 in Blockchain by Christine
• 15,790 points
1,238 views
+1 vote
1 answer

How does a miner get to know that a transaction is verified by all the nodes?

Contrary to the popular belief, it is ...READ MORE

answered Mar 27, 2018 in Blockchain by Johnathon
• 9,090 points
2,510 views
+1 vote
1 answer

How is a smart contract stored on a Blockchain?

Smart contract template and transaction events are ...READ MORE

answered Apr 4, 2018 in Blockchain by Christine
• 15,790 points
898 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,691 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,232 views
0 votes
1 answer

How can we decrypt a transaction payload when confidentiality is on?

You can try the following: you can only ...READ MORE

answered May 3, 2018 in Blockchain by Shashank
• 10,400 points
624 views
+1 vote
1 answer

How is Blockchain used for provenance purposes?

Let me tell you how Blockchain could ...READ MORE

answered Apr 4, 2018 in Blockchain by Shashank
• 10,400 points
463 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP