A blockchain, put simply, is a chain of blocks that are secured to each other via cryptography. Cryptography hash pointers are used as references to link each block in the blockchain of the public ledger. Although this sounds very secure since no intruder would be able to break the blockchain and insert their own versions of the blocks, it's not completely secure. Since the ledger is entirely transparent and public, any node could insert their block to reproduce the entire blockchain and create their own version of it. Eventually, they could later propagate the block to every node in the network and prove that their blockchain is the legitimate one. This shows that immutability cannot be achieved just by connecting all the blocks and forming a secure ledger. Achieving immutability needs to be assisted by some kind of decentralized economic mechanism that gives a fair chance to each and every node in the network to vote on block creation, and also makes it harder to reconstruct blocks once they are appended.
Satoshi Nakamoto's proposed solution to this problem is the only reason that Bitcoin is implementable in a decentralized environment. The PoW consensus algorithm used in Bitcoin was the first – and is still the best known – solution. It promises a high degree of immutability to the public ledger and secures it, even in a trustless network. In terms of cryptocurrency, the nodes that perform PoW are called mining nodes. As the name suggests, mining is the act of forging new blocks to be appended to the blockchain. The amount of work that it takes to mine ensures that the blockchain is immutable and that tampering with any past transactions is nearly impossible.
This is because of the fact that any node that wants to tamper with past data should be able to reconstruct all the blocks by providing PoW and competing with all the other mining nodes. This is nearly impossible unless the node in question owns the majority of the computing power of the network, in which case, the attacker would stand a chance of beating all the nodes. This is why Bitcoin's consensus algorithm is widely used in public blockchain applications to achieve higher immutability of records.
However, immutability is not the only characteristic exhibited by blockchain technology. Due to the decentralized nature of the blockchain, every single transaction in the blockchain is replicated across all the nodes of a network. The replication of information provides greater robustness to the blockchain. Replicated transactions must be validated by every node to achieve consensus. This ensures that the transactions are publicly visible and all the blockchain data is transparent to the network. The transparency provided by the blockchain can be a boon for some use cases and a curse for others. This is why variants of blockchain were created, as described in a later section of this chapter.
All these characteristics of the blockchain make it a perfect public ledger, or an effective instance of distributed ledger technology (DLT). Bitcoin's blockchain, along with its consensus mechanism, is the most resilient DLT to date.