Differences: to what extent do L1 and L2 differ?
Scalability of blockchain
While the benefits of blockchain technology are many and varied, including improved security, simplified transactions and record-keeping, a number of issues have emerged as it becomes more widely used.
One of the concerns about blockchain is scalability. Scalability is the ability of a blockchain network to accommodate high transaction throughput and future expansion. Simply put, scalability is the ability of a system to manage increasing workloads.
To validate a transaction using standard algorithms, a series of blocks in a blockchain must pass all block verifications. Therefore, as the chain grows, this process becomes more time-consuming and costly, requiring the payment of significant fees. To make blockchain systems scalable in the future, additional computer power, servers and bandwidth will need to be linked.
Every transaction in a decentralised system must go through multiple blockchain processes. This approach requires considerable time and computing power. This is where Layer 2 comes in.
Blockchain trilemma
'Decentralised networks can only provide two out of three functions: decentralisation, security and scalability.' Vitalik Buterin calls this the 'blockchain trilemma'.
In 1999, scientists proposed the Consistency, Availability and Partition Tolerance Theorem (CAP), which asserts that decentralised data storage, such as blockchain, can only satisfy two of the above three properties simultaneously.
In the context of current decentralised networks, this theorem has evolved into the blockchain trilemma. The understanding is that public blockchain infrastructure must forego security, decentralisation or scalability. As a result, the holy grail of blockchain technology is to build a widely distributed and secure network while processing Internet-scale transaction volumes.
For example, two blockchains employing the same proof-of-work (PoW) method, with the same degree of decentralisation, determine their security by reference to the hash rate of the blockchain. As the hash rate increases, the confirmation time decreases, increasing security and scalability. The result is that continuous decentralisation is proportional to scalability and security.
Blockchain layer
Scaling solutions are implemented at several levels on the blockchain, depending on whether they are implemented directly on the blockchain or as a separate but dependent protocol or network.
Layer 1 blockchain networks are built for scalability, speed and security. Layer 2 scalability refers to technological advances and products that can be used to increase the scalability of existing blockchain networks Finding the ideal balance between the two layers will be a breakthrough discovery for blockchain acceptance and the growth of distributed networks It will be.
The layered approach has the advantage that multiple parts of the functionality can be stacked on top of each other, making it easier to update, modify or change one layer without affecting the other. These layers typically comprise the architecture, consensus, network and applications of the blockchain.
Layer 1 Blockchain
The main chain of blockchains, also known as the original blockchain architecture, is called the Layer 1 blockchain.
The first Layer 1 blockchain was developed with Bitcoin, which is currently used primarily as a wealth store due to its volatility and scalability concerns. In addition, as a method of consensus building, Bitcoin uses proof of work (PoW), which limits the number of transactions that can be recorded in a block and takes around an hour to confirm a block, making it unsuitable for numerous transactions.
Here are some of the shortcomings of Layer 1
The main layer 1 of the blockchain still uses the PoW consensus algorithm. This method is more secure than others, but requires more CPU resources and slows down the system.
As the number of users increases, the workload of the Layer 1 blockchain also increases, which tends to slow down the processing speed and capacity.
Scaling of the Layer 1 blockchain can be done in the following ways
Layer 1 can be scaled by PoS consensus. This is also the consensus mechanism used in Ethereum 2.0. This mechanism speeds up the process by authorising new blocks of transaction data based on the staking of network stakeholders.
Sharding is a scalable solution for overloaded workloads. Simply put, sharding breaks the transaction validation and verification work into small, manageable chunks and distributes them across the network so that more nodes can benefit from the processing power. The network handles sharding in parallel, so that multiple transactions can be executed simultaneously and sequentially.
Increase the data storage capacity of blocks
Combining these scaling options increases the throughput of the network, but appears to be moving away from its original purpose as Layer 1 as the number of blockchain users expands.
Layer 2 blockchain
As mentioned above, Layer 2 blockchains are mechanisms that build on top of existing blockchains to provide features such as scalability and speed.
Layer 2 solutions were originally developed to solve the scalability problems of Bitcoin. The Lightning Network is an essential example of this, as it utilises micropayment channels to allow Bitcoin transactions to take place off-chain. In this case, only the opening and closing of the channel is recorded in the Layer 1 chain.
Other layer 2 scaling solutions include
Nested blockchains
A nested blockchain is a layer 2 blockchain that runs on top of a layer 1 blockchain. In other words, Layer 1 defines the parameters and Layer 2 arranges the execution of the process. There can be many layers of blockchains on the main chain.
For example, the OMG Plasma project acts as a layer 2 blockchain for the layer 1 protocol of Ethereum, allowing cheaper and faster transactions.
State channels
Statechannels enable bi-directional communication between the layers of the blockchain. State channels work by excluding miners and acting according to smart contracts. Miners are not involved in the operation, thus reducing latency. An example of a state channel is the Bitcoin Lightning Network. The Lightning Network allows users to complete a series of microtransactions within a certain amount of time.
Sidechain
Layer 2 blockchain technology uses sidechains as a scalability option. Side chains are chains that are independent of the main blockchain and feature a unique consensus method dedicated to scalability and processing speed. The main chain needs to verify transaction data, maintain security and resolve disputes in the context of the side chain.
ZK-Rollups
A layer 2 solution, which guarantees the legitimacy of transactions through mathematical proofs using the Zero Knowledge (ZK) protocol, ZK-Rollups improves scalability by combining large volumes of money transfer transactions into a single transaction.