My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Blockchain101 - Block and Hash

Blockchain101 - Block and Hash

Helping you learn while I do the same:)

Mohanad Kandil's photo
Mohanad Kandil
·Jan 21, 2022·

2 min read

In this article, I will discuss the block and hash through some simple diagrams to keep it simple and effective for you. Wait for the rest of the blockchain series :)

Twitter thread

Blockchain:

A Blockchain is a chain of blocks that contain information. The data which is stored inside a block depends on the type of blockchain. For Instance, a Bitcoin (BTC) Block contains information about the Sender, Receiver, the number of bitcoins to be transferred.

Bitcoin-block.png

Hash:

A block also has a hash. it can be understood as a fingerprint that is unique to each block. It identifies a block and all of its contents. So once a block is created, any change inside the block will cause the Hash aka the unique fingerprint to change.

2.png

Block specs/inside the block:

  • Data
  • Hash
  • Hash of the previous block

In the diagram example, where we have a chain of 3 blocks. Indeed, the 1st block has no predecessor, that's why it doesn't contain the hash of any previous block. Imp: the first block in any chain called Genesis Block.

1.png

Why do all blocks are contained hashes of the previous ones?

This is the technique that makes a blockchain so secure.

Assume a hacker can modify the actual data present in the Middle (no 2) block. The Hash of the Block also changes. But Block 3 still contains the old Hash of Block 2. This makes Block 3, and all succeeding blocks invalid as they do not have the correct Hash of the previous block.

Twitter-.png

Stay tuned for the upcoming series of articles about blockchain and WEB 3.0.