Introduction to Blockchain for Complete Beginners

Introduction to Blockchain for Complete Beginners

·

6 min read

A Beginner-Friendly Overview Of Blockchain Technology and its possibilities

Let's rewind our clock to 2008. It was the stock market crash, and the world was crippled by a financial crisis. A year later, a gentleman named Satoshi Nakamoto published a paper named 'Bitcoin: A Peer-to-Peer Electronic Cash System', introducing a new type of digital currency that didn't require to trust of any 3rd party such as a bank for peer-to-peer transactions and was decentralized. Bitcoin was the first type of cryptocurrency based on Blockchain technology, which would allow the direct transfer of an asset(money in this case) from party A to B without any intermediate.

So let's start with the basics. Assume that A, B, C, and D are 4 friends who transfer money and make transactions on a day-to-day basis. Each transaction they make is recorded by a central authority such as a bank that holds and manages the records of all transactions and verifies the authenticity of each transaction before it is processed. You have to trust the central authority and also sometimes rely on the long time it takes for some transactions. Now, those friends shift to a new way of making transactions. Let's assume there is a list. Every transaction that happens shows up on the list and each of the friends is allowed to have a copy of the list. So every time a new transaction happens, the copy of the list is now updated for each friend. Since we now have removed the aspect of trust in this new technology, the first step would be to verify whether that transaction happened and is valid, before it becomes a part of that list. To validate that transaction, we have the concept of digital signatures. The person who initiated the transaction has a pair of keys, the public and the private key. With the private key, the person 'signs' the new transaction, which creates a unique digital signature that is linked to the transaction and the person who initiated it. The transaction is now validated and broadcast to the network of people involved. Now, for the other people in the network to verify that transaction, they would need to use the public key of the person who initiated the transaction.

In Blockchain, the people/entities/parties involved in the network are called nodes, and the transaction may involve the movement of any asset, not necessarily money. After a transaction is signed by the node that initiated it, it is broadcasted to the network. Now the other nodes in the network first verify the digital signature of the transaction with the help of the public key. The transaction is then added to the pool of unconfirmed transactions, also known as the memory pool. You must be wondering that If the transaction is now validated, why isn't being to the previous list we were talking about? Well hang on for a moment, that's where the entire concept of blocks and mining comes in. That transaction, along with other unconfirmed transactions that happened in the network, are now added to a new 'block' that has been created and the special nodes responsible for creating the block and adding those unconfirmed transactions to that block are called miners. I know you are confused about the block, we are getting into why it's needed. After the transaction is deemed valid, the miners now solve a computational problem that involves cryptography and using a hash function such as SHA256, which requires finding a nonce[a random number] which when combined with the data in the block and given as input to the function would produce an output that would be a 256-bit binary containing a certain number of zero bits in its starting, also known as the hash of the block. The miners compete among themselves and the one who finds the nonce first gets rewarded. This is known as the Proof Of Work(PoW) algorithm, which relies on the fact that if you use computational work as a basis for what to trust, the transactions that would be computationally infeasible would be regarded as fraudulent. The Proof of Work is just one of the many consensus algorithms that miners use to create a new block and add unconfirmed transactions to it. The primary purpose of a consensus algorithm is to get the other nodes to sort of agree on the fact that a new transaction happened and is valid, and this agreement is established not on trust but on a feasible algorithm. Once a block has been added to the blockchain, all transactions within it are considered to be confirmed, and it is now broadcasted to all other nodes.

In the context of Proof Of Work, just like a transaction is only considered valid if it is signed, a block of transactions is only considered valid if it has a Proof Of Work attached to it, which means having the nonce attached to it so that the 256-bit hash of the block contains a bunch of zeros in the start. This is the unique identity of each block. Also, the individual blocks are connected, with each block storing its hash along with the hash of the previous block. The data inside the block which is now part of the blockchain is immutable, which means that it cannot be easily altered or changed. If somehow though, the contents inside a block are manipulated, it would result in a new hash and the block would no longer be a part of the previous blockchain. So for an attacker to alter the contents of a block, it would have to recalculate the hash of that block(since it's changed now) and also update all subsequent blocks in the chain with the new hash. Doing so would require immense computing power and time, and so doing such an attack has an extremely low probability of success. This is where we get to true security and decentralization. The block has its digital fingerprint aka the hash, and each transaction has its digital signature, with all the work being done by the nodes themselves which eliminates the need for any intermediate, hence making it decentralized. Also, each node in the network is allowed to have a copy of the blockchain which is public, which makes it distributed and open. That's why blockchain is often referred to as an open and distributed ledger.

Bitcoin is based on PoW, and a new block is created every 10 minutes on average. Note that the PoW algorithm is just one of the many consensus algorithms,and is generally criticized due to the large computational energy, cost and power it requires which has a negative impact on the environment. Alternative consensus algorithms include Proof Of Stake(PoS), and Proof of Authority(PoA), which are more efficient and environmentally friendly. Newer blockchains like Solana use a Proof of History(PoH) algorithm which is much faster and cheaper. Ethereum recently transitioned from PoW to Proof of Stake in September 2022 also known as the "The Eth Merge".