Requirements to follow this post:
In the previous part, we discussed how the blockchain chains each block by hashing. Whenever a new block is created, the hash (SHA-256) of the previous block is calculated and added to the contents of the new block. This way we can ensure a strong connection between the data, which makes it difficult to modify a transaction from a previous block. Besides this characteristic of the blockchain that makes it impossible or very difficult to change its data, it can also count on the fact that it is a distributed ledger. In this distributed ledger we have multiple participants, spread globally, which validate the transactions through a consensus algorithm. This makes the blockchain a practically infallible system in terms of security and data persistence. Therefore, we can say that blockchain is an immutable ledger.
In this tutorial, we will cover more detail about blockchain immutable and distributed ledger.

Immutable ledger
Immutability is characterised by the blockchain ledger remaining unchanged, unaltered and indelible. Each block contains a hash value (SHA-256) for itself and for the previous block as well.
This ensures that blocks are retroactively coupled together and unrelenting. This makes it impossible to modify one block without modifying the entire chain. This factor along with the cryptography and consensus algorithm makes the blockchain an immutable ledger, i.e. it is impossible to modify, create or delete transactions on past blocks. The only way to reverse a transaction is to make a new transaction agreed by both parties. For example, if Alice transfers 1 bitcoin to Bob, then for Alice to get her money back, Bob has to create a new transaction where he sends 1 bitcoin back to Alice. The security and transparency factor in the blockchain is what makes this technology really unique and different from conventional databases.
Although blockchain is practically unbreakable there are some barriers to overcome. Let us understand the challenges in detail.
- 51 Percent attack. The blockchain is a decentralised network in which no entity, not even states or large financial institutions, is in control. But miners, in charge of processing the network’s transactions, can compromise blockchain immutability. The 51 per cent attack consists of an attacker or group of organised attackers, appropriating huge hashing power, controlling more than 51 per cent of the network’s total computing power. Thus, the attacker controls the distributed network consensus and can do things like reverse high-value transactions and double-spending. This threat is especially worrisome for blockchains with few participants in the network, where it is relatively easy to acquire the hashing power needed to control the network. However, on very large blockchains, such as bitcoin, it would now require 5 times Google’s entire computing power to perform the attack. This makes a 51 per cent attack on the bitcoin network unfeasible, with the number of participants in the network rising over time. There has already been an attempt to control the bitcoin network executed by Russian Federation and China but without success. To mitigate the risk of the “51 per cent attack”, other consensus algorithms such as proof-of-stake (PoS) are not focused on computational power but on the number of tokens you stake. If you try to perform an attack on a PoS network, you run the risk of losing the staked tokens if your transactions are invalidated by other nodes in the network. Later on, we will discuss the different types of consensus algorithms used by blockchains and their advantages and disadvantages.
- Quantum computing. Another big threat to the blockchain, and cybersecurity in general, is quantum computing. Several studies from experts have concluded that quantum computing has the potential to reverse-engineer the public key of the blockchain network, in order to obtain the private key. The public key in the blockchain corresponds to the public identifier of any resource in the network, for example, each bitcoin wallet has a bitcoin address, which is what you have to enter when you want to send bitcoins to someone. To validate any transaction, besides indicating the public address (public key) of the sender and receiver, it is necessary to verify the sender. This validation is done through the private key, to which only the wallet owner has access. The algorithm used for the generation of the public and the private key is called RSA. This algorithm is considered very safe until today, because it is extremely complex to break, taking hundreds of years to find the private key from the public key, with good computing power. With the emergence of quantum computing, it will be possible to do tiny computations simultaneously. This gives quantum computers the ability to compute a problem of exponential complexity (ex) in linear time (x). We can have a problem, that classical computing takes thousands of years to compute, but quantum computing may take only a few seconds. So it becomes extremely easy to break the RSA of blockchains and find the private keys of any address, completely compromising the security of the network. When quantum computing starts to be commonly used, it will be necessary to reinvent all the mechanisms behind cybersecurity. Here you can read more about quantum computing and all its advantages and threats.
Distributed ledger
A decentralized ledger is a peer-to-peer (p2p) network supported by a group of devices called nodes. In this network the nodes participate cooperatively in the transaction processing and validation of data blocks. In a public blockchain, anyone can be a node in the p2p network, providing their computing equipment for transaction processing.
Unlike in a traditional client-server system, where servers are held on the same authority, in the blockchain p2p network the power over data and transaction processing is distributed over all nodes. Nodes use a consensus algorithm to validate the transactions that each node processes on the network. A “version” processed by one or more nodes is only accepted if it passes the consensus algorithm. In the next part we will address the most popular types of consensus in blockchains and what their advantages and disadvantages are.
The decentralisation of blockchain brings more threats, in the sense that it is impossible to control the people or identities participating in the network. However, this threat is practically unfeasible with the cryptographic mechanisms of the immutable ledger and the consensus mechanisms of the distributed ledger.