The last chapter dealt with the concept of Blockchain its main features at a high level.
Do you ever wonder where the Blockchain’s name comes from and how does it work?
In the previous chapter, I tried to explain the Blockchain through a use case that involved the management of a library. In essence, it is no longer necessary to have a central role, but the library becomes decentralized and people can lend books to each other by updating the public ledger (register to which each user has access).
Why is it called Blockchain?
In the library example, a transaction is generated each time a book is lent. Since multiple transactions can occur at the same time, they are grouped together within a block.
Each new block refers to the last block created before him, thus generating a chain of blocks (Blockchain). Each user can decrypt and trace the chain of blocks, validating their truthfulness, in a completely transparent way.
But if someone wants to tamper existing blocks?
[Copyright free image – source Flickr]
Trust no one unless you have eaten much salt with him. (cit. Cicero)
The blocks added to the Blockchain can neither be deleted nor modified.
Since each block refers to the previous one, if a malicious user wants to modify a specific block, it should also change the previous and subsequent ones.
The computational power to modify these blocks is very high and it makes the operation impossible.
How do I know the new blocks have not tampered?
Whenever a user creates a new transaction, it must be validated by the majority of the network through a distributed consensus. In many Blockchains the threshold is 50%. If the 50% of the network credits the block containing the transaction, it is considered valid and added to the public ledger.
For simplicity, we will consider 50% of the nodes, but actually, this threshold refers to the computational power in the case of proof of work Blockchains. We will analyze these algorithms in another chapter.
How are blocks created?
In a Blockchain there are two types of nodes: those that have virtual coins and make transactions and those that deal with the creation of blocks. The latter are called miners and the operation they perform to create blocks is called mining.
These nodes have the task of validating transactions and storing them in a block which will then be added to the Blockchain (if validated).
A block contains more transactions and miners must demonstrate their work, solving computational puzzles through processors and GPUs. The expenditure of electricity is the evidence of their commitment.
It is very difficult to create new blocks, but very easy to read them
Exactly! This is the basic principle of the whole Blockchain. Creating new blocks must be complicated, in order to reduce malicious actions, but verifying them must be very easy.
In fact, each user must be able to trace the Blockchain and verify the number of coins that other users or themselves possess. This is true in Bitcoin and Ethereum Blockchain. There are some Blockchains, such as Monero one, where data is hidden and not traceable.