What’s inside a Block in Blockchain? — blocktrain.info

Geek Jayant
BlockTrain
Published in
3 min readJun 30, 2022

The Blockchain Anatomy

When I was a kid, it was one of my dream to become a doctor but computer science persuaded me more than anything. So, for a moment I thought of living the childhood dream along with my passion. I dissected a blockchain to look into it and here’s what I found.

Two Components

  1. Data
  2. Block header

Data

The Data part of the block consists information regarding the transaction like From, To and money. These are the same transaction details we see on a blockchain explorer like etherscan or bscscan

Block Header

A Block Header contain

  1. Block Number
  2. Version
  3. Timestamp
  4. Previous Hash
  5. Merkle Root
  6. Nonce

Block Number

It’s the identification number of the block, given to it when it’s added to the blockchain. You can look in a block if you know it’s block number.

Version

It stores the current version of the chain when the block was created. A different version might have more elements in the block, so it’s important to keep track of the version to update the components of the block.

Timestamp

It’s the time when the transactions are approved and the block was created. It’s in a unix time format and it helps in mining during nonce determination.

Previous Hash

It’s the hash of the previous block’s header.

Merkle Root

Also called Binary Hash Tree, it is a data structure that summarizes all the transactions in a block.

Nonce

Number Used Only Once (NONCE), is a number that help miners solve the mathematical problem of generating a hash. It starts from 0 until the number where the targeted hash is achieved. Let’s understand it with a simple equation

You are given,

X+Y=10

And asked to find the value of Y but you don’t know X as well, can you find Y? No, you can’t.

Now, if X is given as 4 then Y is 6, so

Let’s say X is the Nonce, Y is the hash that the miner needs to find and 10 is the targeted hash value. When X is know we can easily find Y, same way Nonce(X) helps find the hash(Y) that’s valid (10).

Hope it was worth your time.

We at Blocktrain are on a mission to teach Blockchain and Web3 in the most easiest language. Do check out our website for resources and roadmaps

Learn Solidity in Hindi

--

--

Geek Jayant
BlockTrain

A born geek, documenting my love story with Blockchain and Web 3