In this segment, you will learn about a different technique of managing the information with the help of a technique you have already learnt called hashes. Let's see what this technique is and how it makes use of hashes.
As you just learned from Shebin, to arrive at the Merkle root of “n” number of elements, you have to follow the below steps:
Compute the individual hashes of each element.
For this set of hash elements, form strings by concatenating each pair of consequent hashes. In case a consequent hash is not available for the last hash, it must be concatenated to itself.
Compute the individual hashes of the obtained strings.
If the number of hashes obtained is more than one, go back to step 2 and perform steps 2 and 3 till one single hash is obtained.
Even the smallest of the changes in any of the data points will change its hash and hence the root hash will also be changed. Thus root hash is the fingerprint representing all the datapoints.
Now that you have understood what Merkle trees are, it's time to hop onto the next video where Shebin tells you about the advantages of using the Merkle Tree for storing the information.
Great! This indeed is a quite useful technique. The Merkle tree allows verifying that a transaction exists in the block without having the entire block, by following its Merkle branch. You can visit this link to learn more about Merkle Trees.