IT Consultant and Digital Innovator – From code to business strategies.
Always looking for the next big idea.
CONTACTS

Blockchain technology

How it works and why it's revolutionary

In 2018, for my high school thesis, I decided to delve deeper into one of the technologies
most discussed in recent years: the blockchain, born with Bitcoin
and then taken up again in many other contexts.

In this article, I review the fundamental concepts: what is a blockchain, how it works "behind the scenes"“
and why it is considered so safe and revolutionary.

What is blockchain?

Blockchain can be seen as a distributed public ledger:

  • it's a register because it contains the list of all transactions (in the case of Bitcoin, the movements of the cryptocurrency);
  • è public because anyone can download the blockchain and read its contents;
  • è distributed because there is no central server: the copy of the registry is present on many nodes in the network.

This network is a peer-to-peer (P2P) network: each connected computer participates in sharing
of information, without the need for a central authority.

Blocks chained together

The data is not saved in a single continuous file, but in blocks.
Each block contains:

  • a set of transactions,
  • a reference to the previous block,
  • a control value (the’hash) calculated on all data in the block.

The blocks are concatenated because each contains the hash of the previous block.
In this way a real blockchain: blockchain.

If someone were to modify even just one piece of data within a block, it would change its hash and consequently
all the hashes of subsequent blocks would have to be recalculated. It is precisely this mechanism that makes
the changes so difficult.

Hash, nonce, and computational work

The “glue” between the blocks is a cryptographic hash function.
This is a function that:

  • takes block data as input (transactions, timestamp, reference to the previous block, etc.);
  • returns a long alphanumeric string (the hash);
  • è easy to be calculated in one sense, but impossible to be reversed
    (The hash cannot be traced back to the original data).

In the case of Bitcoin, calculating the hash just once is not enough to consider a block valid:
the generated hash must start with a certain number of leading zeros.

To obtain a hash with these characteristics, a variable number called nonce.
The process is this:

  1. take the block data,
  2. a nonce value is added,
  3. the hash is calculated,
  4. If the hash does not have the required number of leading zeros, change the nonce and try again.

This process continues by trial and error, until a nonce is found that produces a valid hash.
All this research is the famous computational work: it takes time and energy,
because you have to try so many combinations.

Who does this job? The miners.

The nonce lookup work is done by the miner.

  • In theory, whoever in the network can become a miner.
  • In practice, today we need machines with extremely high computing power to compete with others.

Miners compete to be the first to find the correct nonce for a new block.
Who can validate the block:

  • communicates it to the network,
  • he comes rewarded with new cryptocurrency (in the case of Bitcoin, with newly issued bitcoins).

This mechanism is called Proof of Work:
proof that some computational work has been done to add a block to the chain.

Why blockchain is considered secure

Blockchain security arises from a combination of several factors:

  • Dependency between blocks
    Each block contains the hash of the previous one. Altering one block would force all subsequent blocks to be recalculated.
  • Distributed network
    The blockchain is stored on many nodes in the network. There is no single point of attack or corruption.
  • Longest chain rule
    The network accepts the longer chain (the one that represents the largest quantity
    of computational work done). An altered version of the blockchain, shorter or with less work, is discarded.
  • 51% of honesty
    The system is safe as long as at least the 51% of computing power is controlled by honest nodes.
    To truly attack the blockchain, one would need to control the majority of the total computing power:
    an extremely expensive and difficult undertaking.

Why blockchain is revolutionary

The real revolution is not just the cryptocurrency itself, but the fact that the blockchain allows:

  • have a public register that no one controls alone;
  • guarantee data integrity without trusting a single central entity;
  • coordinate financial transactions between strangers, using mathematics and cryptography
    instead of personal trust.

In the case of Bitcoin, this translates into a digital currency which does not depend on central banks
or traditional intermediaries. But the same idea of a "distributed ledger" can be applied to many other areas:
contracts, traceability, digital asset management and much more.

Author

Enzo Mattia Ruocco

Leave a comment

Your email address will not be published. Required fields are marked *