Blockchain Explained: Blocks, Nodes and Consensus

Blocks, hashes, nodes, consensus: a simple explanation of how a blockchain records transactions with no bank and no central server.

Basics · Débutant · 9 min read · Publié le

The essentials

The problem the blockchain solves

When you make a bank transfer, your bank keeps the ledger: it checks that you have the money, debits your account and credits the recipient's. Everything rests on trust in that intermediary.

With a digital currency that has no intermediary, a difficulty appears: a digital file is easy to copy. What stops someone from spending the same unit twice? This is the double-spending problem.

In October 2008, a person or group using the pseudonym Satoshi Nakamoto published the Bitcoin white paper (a "whitepaper", a document describing a protocol). Its proposal: replace the bank with a public ledger, copied across all participants, and with a consensus rule that lets everyone agree on a single transaction history. That ledger is the blockchain.

What is a block?

A block is a packet of transactions grouped together, a bit like a page in an accounting book. Each block has two parts:

  • The header: a small technical summary of the block (the previous block's fingerprint, a summary of the transactions, a timestamp, etc.).
  • The body: the list of the transactions themselves (Alice sends 0.01 BTC to Bob, etc.).

On Bitcoin, a new block is added on average roughly every ten minutes. On Ethereum, time is divided into 12-second "slots", and a block can be proposed in each slot.

The hash, the fingerprint of data

To understand what follows, you need to know the notion of a hash (or cryptographic fingerprint). A hash function, like the SHA-256 used by Bitcoin, turns any data into a string of characters of fixed length. Two properties matter:

  • the same data always gives the same hash;
  • changing even a single character of the data produces a completely different hash.

The hash therefore acts as a seal: if someone modifies the content, it shows immediately.

Why we say "chain"

Each block contains in its header the hash of the previous block. Bitcoin's developer documentation sums it up this way: each block stores the hash of the previous block's header, which chains the blocks to one another.

Consequence: if someone tries to modify an old transaction, that block's hash changes, so the link to the next block is broken, and so on up to the last block. To falsify the history, you'd have to recompute all the following blocks, and convince the rest of the network to accept that version. That's what makes a blockchain very hard to rewrite.

The transactions in a block are also summarized in a single fingerprint called the Merkle root, obtained by hashing the transactions in pairs until only one remains. It sits in the header: altering a single transaction therefore also changes the block's header.

Nodes: the computers that keep the network alive

A node is a computer that runs a blockchain's software and is connected to other computers doing the same. Together, they form a peer-to-peer network, with no central server.

A node's role:

  • receive new transactions and new blocks;
  • verify that they follow the protocol's rules (valid signature, sufficient balance, correct format...);
  • reject whatever doesn't comply;
  • pass on what's valid to the other nodes.

The key point: a node trusts no one. It rechecks everything itself. If an actor tries to broadcast an invalid block, honest nodes simply ignore it.

The different types of nodes

Ethereum's documentation distinguishes several families, and the logic is similar on other networks:

  • Full node: downloads and validates every block. It may prune some of the oldest data to save space, but it verifies everything.
  • Archive node: a full node that keeps the entire history of the network's state since the first block. Useful in particular for block explorers and analytics.
  • Light node: downloads only block headers and asks full nodes for the rest. It uses few resources, but depends more on others.

On Ethereum, a node runs two pieces of software (called "clients"): an execution client (for example Geth, Nethermind, Besu, Erigon or Reth) that processes transactions, and a consensus client (for example Lighthouse, Prysm, Teku, Nimbus or Lodestar) that applies the proof-of-stake rules. This diversity of software, written by different teams, limits the risk of a single bug bringing down the entire network.

You don't need to run a node to use crypto: your wallet generally connects to nodes run by others. Running one does, however, let you verify transactions yourself, without depending on a third party.

Consensus: agreeing without a boss

Thousands of nodes receive transactions in a different order, sometimes with delays. How do they agree on a single history? That's the job of the consensus mechanism: a set of rules that designates who has the right to add the next block and which version of the chain is the right one.

The two best-known families are:

  • Proof of work, used by Bitcoin: "miners" spend computing power to solve a mathematical problem. The first to find the solution proposes the block. Nodes follow the chain that has accumulated the most work.
  • Proof of stake, used by Ethereum since 2022: "validators" lock up crypto as collateral (32 ETH for an Ethereum validator). One of them is randomly selected to propose each block, a committee of other validators votes to approve it, and cheaters can lose part of their stake.

We compare these two approaches in detail in the guide on proof of work and proof of stake. For now, keep the shared idea: make cheating more expensive than honesty.

The economic incentive

Why do participants spend electricity or lock up funds? Because they're rewarded. The Bitcoin white paper provides that the first transaction in each block creates new units for whoever produced the block. This reward is cut in half every 210,000 blocks, roughly every four years: since the halving on April 20, 2024 (block 840,000), it is 3.125 BTC per block, plus the transaction fees paid by users.

A concrete example

Let's say you send 0.01 BTC from your wallet to a friend's. Here's what happens, step by step:

  1. Signing: your wallet signs the transaction with your private key. This signature proves you really own the funds, without revealing the key.
  2. Broadcast: the transaction is sent to a node, which verifies it and then passes it to its neighbors. Within seconds, it's known to a large part of the network and waits in a queue (the "mempool").
  3. Inclusion in a block: a miner selects transactions, often prioritizing those that pay the most fees, and tries to produce a valid block.
  4. Validation: when a block containing your transaction is found, it's broadcast. Each node rechecks the block before adding it to its copy of the chain.
  5. Confirmations: your transaction now has one confirmation. Each new block added on top adds another. The more confirmations, the less likely it becomes that the transaction is reversed.

The white paper also shows that the probability of a minority attacker catching up with the honest chain falls exponentially with the number of blocks to catch up. That's why some platforms wait for several confirmations before crediting a deposit: the exact number depends on each platform.

What a blockchain guarantees... and what it doesn't

A public blockchain brings specific properties:

  • Transparency: transactions can be viewed by anyone through a block explorer.
  • Tamper resistance: rewriting the history would be extremely expensive.
  • No mandatory intermediary: you can send funds without asking a bank's permission.

But it doesn't guarantee everything:

  • No total anonymity: on Bitcoin or Ethereum, addresses don't carry your name, but all movements are public and can be linked to you, for example through a platform where you verified your identity. It's better described as pseudonymity.
  • No going back: a confirmed transaction to the wrong address can't be canceled by a customer service desk.
  • No real-world verification: the blockchain faithfully records what is submitted to it, including a transaction sent to a scammer.
  • No guarantee of value: a network's technical soundness says nothing about its token's price.

Mistakes to avoid

  • Confusing blockchain and cryptocurrency: the blockchain is the ledger technology; bitcoin or ether are assets that circulate on it.
  • Believing a "pending" transaction is done: until it's included in a block, it isn't confirmed. If the fees are too low, it can stay stuck for a long time.
  • Thinking you can cancel a send: check the address and network before confirming, because no one can reverse a confirmed transaction.
  • Assuming everything called a "blockchain" is decentralized: some chains rely on a small number of validators. Look at who produces the blocks and how many independent nodes exist.
  • Mixing up networks: a token can exist on several blockchains. Sending on the wrong network can make the funds hard, or even impossible, to recover.
  • Handing your private key to someone to "verify a transaction": no legitimate verification needs your key or your recovery phrase.

Key takeaways

  • A blockchain is a shared ledger, divided into blocks linked together by the previous block's hash, which makes any change to the history visible.
  • Nodes are the computers that keep a copy of the ledger and recheck every transaction and every block according to common rules.
  • The consensus mechanism (proof of work, proof of stake...) designates who adds the next block and lets the network agree without a central authority.
  • A transaction is only reliable once it's included in a block, and its security grows with the number of confirmations.
  • A public blockchain is transparent and hard to falsify, but it is neither anonymous, nor reversible, nor a guarantee of value.

Sources

Compare services related to this topic