Layer 1 Blockchain and scaling solutions (Part 15- Blockchain Series)
Welcome to the 15th part of the 100 part series on Blockchain.
Previous parts: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 and 14.
Decentralization, security, and scalability represent the core features of Blockchain technology. The Blockchain developers and engineers can only choose two features to have in the network while compromising the third one. For instance, if the Blockchain system excels in providing decentralization and security, it lags when it comes to scalability. So, this is called Blockchain Trilemma, a term that Ethereum founder Vitalik Buterin coined. In other words, Blockchain Trilemma means a trade-off between these three features: decentralization, scalability, and security.
(i) Decentralization: Rather than being managed by a single central entity, Blockchains distribute control over the network equally to all participants. However, obtaining optimum decentralization tends to decrease the network throughput. Furthermore, as more nodes secure the network through consensus mechanisms, transaction speeds slow, which is considered a hurdle to wider adoption of Blockchain technology.
(ii) Security: Blockchain networks should have the ability to withstand frauds and attacks like 51% attacks. Therefore, Blockchain security is an essential component of the Blockchain network that must never be compromised.
(iii) Scalability: Blockchains, such as Bitcoin (BTC) and Ethereum (ETH), process a huge amount of information to store, process, and verify transactions in a secure manner. Blockchain has outgrown its cryptocurrency roots and is now ready to reshape the supply chain, Fintech, real estate, and many other industries. To achieve its full potential, Blockchain has to grow exponentially without getting slower, congested or crashing the computers on which it runs. That means making Blockchain scalable is the need of the hour! It’s because as the Blockchain grows, so does the amount of data stored on each node/computer in the peer-to-peer network, and more information needs to be managed. According to the Blockchain Trilemma, more scalability is feasible, but security, decentralization, or both would suffer as a result.
While many Blockchain systems have achieved decentralization and security, scalability remains a crucial problem for today’s leading decentralized networks. So to solve the Blockchain trilemma and simultaneously achieve decentralization, security, and scalability, Blockchain scalability solutions are designed.
The scalability solutions can be divided into two types: Layer 1 and Layer 2 solutions.
Layer 1 Blockchain
Layer 1 Blockchain term is used to describe the parent or base layer Blockchain network. Bitcoin, Ethereum, Solana, and Litecoin are a few examples of layer 1 Blockchain networks. On the other hand, Layer 2 is an overlaying network that lies on top of the underlying Blockchain. So, with layer 1, the scaling solution is directly on the main Blockchain.
The scaling solutions can be divided into two categories: consensus mechanisms and sharding.
Consensus mechanism improvements
Some consensus mechanisms are more efficient than others. For instance, the Proof of Work (PoW) consensus mechanism used by Bitcoin and Ethereum 1.0 Blockchains is secure but highly computing-intensive, making it slow. For instance, Bitcoin can process up to 4–7 transactions per second, and Ethereum 1.0 Blockchain can process 15–30 transactions per second. But the processing of transactions is too slow compared to the electronic payment network Visa, which can process around 1700 transactions per second. In order to compete with the existing centralized systems, Blockchain technology must match or exceed these high levels of scalability. On the other hand, in the case of the Proof of Stake (POS) consensus mechanism, instead of requiring miners to solve mathematical puzzles using substantial computing power, POS systems allow the nodes to process and validate new blocks of transaction data on the basis of their stake in the network.
The transaction speed is better with POS than POW. That’s why many newer Blockchain networks favor the POS consensus mechanism. Ethereum 1.0 is also transiting to Ethereum 2.0, which utilizes a POS consensus mechanism. This can increase the scalability of the Ethereum network while maintaining decentralization and network security.
The workload on Layer 1 Blockchain has increased with the increase in the number of users. Because of this, processing speeds and capacities have dipped. The scaling solution for this problem is Sharding, adopted from distributed databases sector. It is the process of splitting a database horizontally to spread the load, which allows data from a single database to be stored across multiple servers.
Similarly, in the Blockchain context, sharding is meant to split the computing and storage workload from the Blockchain network by creating new chains called “shards” or “subnetworks.” Simply put, sharding breaks the work of validating transactions into small, manageable pieces.
How does sharding work?
In a traditional Blockchain approach, the ledger is distributed across multiple nodes, with each node maintaining a complete copy. Every time a new transaction needs to be processed, the information is updated on all nodes of the network, making it transparent and verifiable across all nodes. Any transaction is added to the ledger only when the nodes come to an agreement on it. Therefore, as the number of transactions grows, so, does the ledger’s size, resulting in more data to be processed and stored on each node. Deploying additional nodes worsens the problem because more time is needed for verification. Because of this, the following issues arise:
· decrease in transaction throughput,
· increased network congestion,
· increased transaction fees,
· and high storage costs.
Sharding is done to reduce network congestion and lighten the workload for each node who will no longer be required to process and verify every transaction across the entire Blockchain network. Furthermore, nodes are assigned to individual shards in order to verify transactions. Let’s assume there are 100 nodes on the network, and the Blockchain data is divided into 10 shards. 10 nodes are assigned randomly to each shard that validates transactions. Each node only maintains the information related to its specific partition or shard instead of being responsible for storing and processing the entire network’s transactional load. In this way, each node processes and stores only one-tenth of the data. Additionally, the block containing verified transactions is broadcasted on the assigned shard instead of the whole Blockchain network.
Also, by breaking the Blockchain network into shards, each shard will have a unique set of smart contracts and transactions. The basic idea behind sharding is to process multiple non-conflicting transactions in parallel simultaneously, then after running consensus, the global state of the Blockchain is updated.
Benefits of sharding
(i) Speed up transactions: Fewer nodes have to process transactions; therefore, more transactions can be processed in parallel. It also reduces the number of times computation is run for a single transaction.
(ii) Reduced storage requirements: The size of each shard is only a percentage of the total Blockchain, meaning that storage requirements for node operators drastically decrease to only the size of the shard because each node has to handle a fraction of the data. Therefore, this also lowers the barrier of entry to becoming a node. Thus, the more shards you have, the more information you can process in parallel.
(iii) Decentralized and secure: Sharding allows the Blockchain to remain decentralized and secure. The information contained in a shard can be shared among other nodes. It keeps the ledger decentralized and secure because everyone can see all the ledger data; they simply don’t process and store all the information. In addition, since the location of data is mapped on the Blockchain, it is easier to find and verify by the interested node.
Examples: A Blockchain that uses sharding relies on the Proof of Stake consensus mechanism. Sharding has been implemented in different projects like Ethereum 2.0, Zilliqa, and MultiVAC.
Challenges of sharding
While sharding could be the key to scale Blockchain securely, hurdles remain.
(i) With sharding, it is possible to attempt a single-shard takeover attack, in which the majority of nodes are corrupted in a single shard. Single-shard takeover attack is easier to launch than the 51% Attack, which requires more than 50% of the network’s computing power or staking.
(ii) Ethereum 2.0 tackles this issue by randomly assigning a node to a shard and after the block is produced, nodes are then reshuffled and randomly assigned to other shards.
If you liked this article and want to know more about Blockchain, NFTs, Metaverse, and their applications, click the below link.
50+ Real World Applications of Blockchain: A beginner’s complete guide to Blockchain Fundamentals…
50+ Real World Applications of Blockchain: A beginner’s complete guide to Blockchain Fundamentals, Consensus…