<< Go back to Posts

Blockchain learning I - The network

30 minutes to learn blockchain related concepts



Introduction

The goal of this article is to introduce blockchain and Bitcoin protocol, to get an idea of how it works and how it is constructed.

We will process one definition after another, so each section will be short and focused.

Vocabulary

Hash Function

Function transforming any input into a hash, which is a string that looks random and is of finite size.

Text input MD5 Hash
Dog c935d187f0b998ef720390f85014ed1e
dog 06d80eb0c50b49a509b49f2424e8c805
dogs d28d2d3560fa76f0dbb1a452f8c38169

Several properties:

  • The function is deterministic, the same input always leads to the same output (try it there)
  • The output size does not depend on the input size. A function as a predefined output length
  • Output format is often a hexadecimal string, so the binary word is representable using ASCII characters ( 0123456789qbcdef)
  • One simple change in the input makes a big difference in the output hash
  • There are several “reference” hash functions. MD5 is well known for checking if downloaded software is correct, SHA-256 for Bitcoin, Ethereum uses Keccak-256.

Graph

A graph is an abstract object consisting of two elements:

  • Nodes: any entity.
  • Edges/Links: connections between the entities.

Network

A Network is a graph dedicated to communication.

In Bitcoin, a node is a miner, i.e., a machine + software + hardware + DB which follows the Bitcoin protocol. The edges are the communication channels between the miners.

Decentralized Network

In graph theory, we have the concept of “centrality”. Centrality is a measure of “how dominant / how useful is a node / how easy it is to reach it”.

  • A node is central if we cannot ignore it.
  • A node is peripheral if its deletion has almost no impact on the connectivity of the others.

Look at the left schema: Node A is highly central as if we were to remove it, the network would be split into disconnected parts. However, D and E are not central, as they are not necessary. Nevertheless, D is more central than E as it is closer to A (centrality is contagious)

Note that centrality is for nodes. Let’s talk about the network.

By construction, you cannot avoid centralization. Look at social networks: some people are more popular than other. For computer, that is the same: some computer will have fiber connection, more bandwidth, strategically located, more reliable, …

The idea of centralized VS decentralized is more about who control the network. In a centralized network, only a few entities will control the network and specify the rules (Visa or Mastercard, for instance). And most of the time, the so-called centralized networks are closed networks: only specific nodes can join; the network is private.

In a decentralized network, anyone can join and leave. This means that bad actors can join. This is why we have proof of work: to discourage bad actors from misbehaving by adding financial rewards.

Blockchain

The blockchain is the structure of the transaction history. A “block” is a batch of transactions processed simultaneously. The block structure provides several advantages:

  • You cannot overwrite the past; it is immutable once written.
  • It is easy to look back to get the reference of a transaction.
  • It helps synchronize the network: it prevents conflicting writes (thanks to proof of work).
  • It reduces the number of messages exchanged: a miner communicates only valid blocks (instead of individual transactions), reducing message frequency.

Participants & Users

In the network, we have two kind of people:

  • Participants, also called the Miners: These are people maintaining the network, nodes, trying to follow the protocol. They are incentivized by the protocol which rewards them financially
  • End Users: These are people just making transactions on the network. They send the transactions they wish to do to participants. They are not rewarded in any way.

Proof of Work

In a blockchain network, the protocol is open, and anyone can join it. Some will play nice; some will not. You need to ensure that people act as expected, to guarantee stability. The first thing is avoiding a fork. We want a single block history; there should be no branching, there should be no choice of the branch to select.

To do that, there is the “game” of proof of work, which is the choice of Bitcoin. A participant of the network can only publish a block if it is able to find a solution to the following problem:

  • You are given a hash function (the same for the whole network).
  • You are given the previous hash of the last block.

Your goal is to find a string such that hash_x = SHA256(last_hash + guess_string) has at least d leading zeros (the difficulty).

This task is difficult, so participants need to invest a lot of effort to get a solution. This will prevent people from publishing blocks too frequently.

Hash Rate

The number of hashes computed per second. This could be a spec for a device (GPU, ASIC), or the overall number of hashes computed by all the Bitcoin participants.

How do we compute the hash rate of the network? Bitcoin participants are not sending their electricity bills.

We can estimate it given the current difficulty of getting a valid proof.

At the date of writing, the hash rate was 620 Exahash/sec (10^18). The difficulty is set so that a solution is found every 10 minutes. So, if we want to find the number of leading zeros in the solution, this is easy:

difficulty = log2(hash_rate x 60 x 10)

difficulty = log2(620 x 10^18 x 60 x 10) = 78 bits

78 bits correspond to 19 zeros in hexadecimal. One recent solution was:

0000000000000000000256491fdd7cc579979b0b3f2397a73aac597ffebe8237

See for live data here

Proof of X

Bitcoin was the first decentralized network. Proof of work has its drawbacks: you need a lot of computing power to win a block, so there is an arms race, leading to high power demand.

Other networks have emerged after that, with alternative consensus mechanisms.

But in most, the more money you have, the better at some point, as you are able to control more of the fundamentals of the network.

Proof-of-stake: The more you own (and invest) in the network, the more power you have. This is similar to traditional exchanges where, when you have shares in a company, you get coupons every X and you have the right to vote. This system is very similar to stocks and shares, where the more you own, the more you get as a reward, and the more power you have to vote on changes in the network.

Proof-of-authority:

Proof-of-space

Proof-of-location:

Proof-of-ownership:

MemPool

When an end user sends a transaction, it sends it to the “mempool”, which is the temporary memory, the buffer, the RAM of the network.

The mempool is the place where all the non-processed transactions are stored until they are added to a block.

When a miner wants to create a new block, it picks up the transactions in the mempool and runs the proof-of-work algorithm.

Miner Incentives

The miner is rewarded by:

  • If it created the block (predefined amount, fixed for all miners).
  • The amount of transaction fees.

Transaction selection strategy

Because of the second point, a miner will select transactions where fees are high.

An end user can customize the amount of transaction fees it is willing to pay.

  • If they set a high price, the transaction will be processed quickly.
  • If they set a price close to (or equal to) 0, the miners will have no incentive to select their transaction.

So, possibly, the transaction can stay unconfirmed for a very long time. And normally, you cannot roll back a transaction once you have signed it. So your funds might be blocked until all mempools forget your transaction.

MemPool Size

The mempool is not of infinite size. For Bitcoin Core, it is limited to 300 MB.

We can see that in early 2026, very few transactions are waiting, while in early 2024, we reached high congestion.

During high congestion periods, the fees were very high to be prioritized.

These days (February 2026), the number of unprocessed transactions is equivalent to 2–3 blocks.

Mempool chart

Halving

Miners are rewarded by mining blocks. Bitcoin is set to have a finite number of bitcoins (21 million).

At the beginning of the network (2009), a miner would get 50 bitcoins per mined block. Every approximately 4 years, the reward is halved (exactly, the halving happens every 210,000 blocks). In 2012, a miner was rewarded with 25 BTC per block.

The halving is likely to stop around the year 2140.

The halving has a big impact on the Bitcoin economy. Miners are in fierce competition against each other for mining blocks, so they can pay for electricity, hardware, offices… Mining requires some investment; it is not that easy to get a margin. So, if the block does not pay with bitcoin, it should pay with fees. Fees would need to align with the real cost of mining.

Numbers

It is good to have big numbers in mind

  • 31st of october 2008: Bitcoin paper
  • 3rd of January 2009: First bitcoin block
  • 864,877 bitcoin blocks (9th of October 2024)
  • Size of a block 1.5 MByte (on average)
  • Blockchain size: 600GB
  • Number of transaction in a block: 6400 (when 1.4MB)

  • 0000000000000000000256491fdd7cc579979b0b3f2397a73aac597ffebe8237
  • Current difficulty: 92 049 594 548 485,47
  • Evaluation of difficulty: every 2016 blocks
  • Hash Rate: 620 EH (Giga: 10^9, Tera: 10^12, Peta: 10^15, Exa: 10^18)


>> You can subscribe to my mailing list here for a monthly update. <<