Blockchain 101 - Block and Hash

Blockchain 101 - Block and Hash

ยท

2 min read

Hey everyone ๐Ÿ‘‹ , it's my first to post on Hashnode and I'm very excited ๐Ÿ˜….
In this blog post, I'm explaining some blockchain basic concepts (trying to make them easy as possible) and I'm preparing the rest for another blog post. So let's get started

Twitter thread

Let's start with the blockchain itself

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

What's inside the block?

Each block has

  • 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

That's it for this blog folks :). Meet y'all in the next blog post.

ย