What is Blockchain?

As the name indicates, a blockchain is simply a chain of blocks that contains information. Each block in a chain contains:
1. Data
2. Hash
3. Hash of the previous block
The data in the blocks depends upon the type of the blockchain. The bitcoin blockchain, for instance, contains the transaction information including the sender, receiver and the amount transferred.
Hash is simply a random number. You can consider a hash as a fingerprint. This hash contains all the information about the data stored in the block and it’s always unique, like a fingerprint. A hash is formed with the formation of a block. Changing anything inside the block will change the hash. So the hashes are useful to detect changes in the blocks. If the hash of a block changes, it’s no more the same block.
Hash of the previous block
Each block contains the hash of the previous block, which makes the chain even stronger. Let’s see it with an example.
Imagine a chain containing 3 blocks. Now the 3rd block contains the hash of the 2nd block, and so, the 2nd contains the hash of the 1st block. Now if someone makes any changes in the 3rd block, it’s hash changes, and so the same hash in the 2nd block also changes. In this way, the hash in 1st block changes too. So, the whole chain goes invalid.

Was this article helpful?

Related Articles