Image for post
Image for post

What Is a Block in the Blockchain?

Marko Vidrih
Dec 29, 2018 · 5 min read
Image for post
Image for post

Bitcoin is based on the blockchain, everyone knows that. But what is this blockchain? More precisely, how can one imagine the individual components of the blockchain, the blocks?

The blockchain is a chain of data blocks. Each block can be thought of as a page in a ledger. The individual blocks are composed of several components. Roughly these can be differentiated into the head of the block (block header) and his body (block body).

Block header

  1. the version number of the software
  2. the hash of the previous block
  3. the root hash of the Merkle tree
  4. the time in seconds since 1970–01–01 T00: 00 UTC
  5. the goal of the current difficulty
  6. the nonce

The version number of the software

The hash of the previous block

The root hash of the Merkle tree

The time in seconds since 1970–01–01 T00: 00 UTC

The goal of the current difficulty

The Nonce

The six components form the block header. The block header plays a fundamental role in Bitcoin because it connects all blocks together. You can imagine it like the cockpit of a truck. Here are the important papers with which the truck comes through the controls of the network.

Block Body

When a miner constructs a block, it validates the transactions. That is, he checks that the sender actually has enough money to spend. He can easily read this information from the blockchain. The miner looks in the past blocks to see if the sender has even gotten ten Bitcoins if he wants to send ten Bitcoins.

The transactions in a block are not just in a list, but in a so-called Merkle Tree.

What is a Merkle Tree?

Creating the root hash is quick and easy, as long as all branches and leaves are known. We remember the function of a hash function: it works clearly and quickly in one direction and is impossible to break down in the other direction. If the root hash is known, but the transactions are unknown, it is impossible to guess the transactions.

A root hash alone is therefore not enough, and the rest of the block must be saved. Thus, the miner can validate the root hash at any time by hashing the information contained in the block again. As long as the hash function is the same, the miners always get the same hash for a given input of data. This is very handy because they can only check if they are on the same level as the hash.

Mining: The search for a special hash

The variable is the nonce. A nonce is a number raised by one. Then the miner hashes the data and checks if the data results in a hash that is below the searched target value. If the hash value is greater than the target, the miner repeats the process; So it increases the nonce by one, hashes and checks again. It repeats this until it finds a hash below the target, or it gets another block from another networker whose hash is below the target. Then takes this new block and uses it as the basis for the next block (using the new hash as the “hash of the previous block”).

Mining is a hyper-repetitive process whose goal is to find a special hash. Once the hash is found, the game starts again. The probability of finding a special hash depends on the difficulty. On average Bitcoin finds a new block every ten minutes. The difficulty keeps adapting, so this average stays the same.

The special feature of this process is that the special hash can only be found by guessing. This rate costs computing power and therefore energy. A look at the special hash is enough to see that it is special because it begins with zeros.

Here is an example of such a hash from the Bitcoin blockchain:

000000000000000000094bfa4edb1245c347e42452e4418e9fe5a1d24e335b16

Hashes: The matryoshka of the blockchain

Author: Marko Vidrih

Image via Pixabay

Data Driven Investor

empower you with data, knowledge, and expertise

Sign up for DDIntel

By Data Driven Investor

In each issue we share the best stories from the Data-Driven Investor's expert community. Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Marko Vidrih

Written by

Most writers waste tremendous words to say nothing. I’m not one of them.

Data Driven Investor

empower you with data, knowledge, and expertise

Marko Vidrih

Written by

Most writers waste tremendous words to say nothing. I’m not one of them.

Data Driven Investor

empower you with data, knowledge, and expertise

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store