Sign in
Log inSign up
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.

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct