Scaling Blockchain Processing
#web3, #Decentralization, #Scalability, #Security, #Layer 1, #Forking, #Sharding, #Layer 2, #State Channels, #Nested Chains, #SideChains, #RollUps, #Optimistic RollUps, #Zero-knowledge Roll Ups
The widespread adoption of blockchain technology across various ecosystems is hindered by its core process: the block writing part. A blockchain platform can be summarized as follows: transactions and data. However, the on-chain storage of transaction information and the on-chain processing can be heavy for the network. This results in major network congestion and capability limitations across the most famous ecosystems (such as Ethereum, Bitcoin, etc.). Hence, the community has seen tremendous efforts towards scalability. By scalability, we mean scaling the blockchain processing in terms of performance, effectiveness, costs, and various other metrics, such that the platform’s ability to support increasing loads of transactions is improved. Ideally, faster blockchain means cheaper costs, wider onboard, faster bureaucracy, and a decentralized world. There are multiple solutions being researched, tested, and implemented that take different approaches to improve scalability on a given blockchain. So far, all attempts have necessitated compromises in either the system’s decentralization, or its security. The term ’blockchain trilemma’ (alternatively referred to as the “scalability trilemma”) encapsulates the process of addressing these competing considerations.
Decentralization: A fundamental design tenet of blockchain networks. To ensure the integrity of a newly generated block (ie. transaction verification), a robust, decentralized blockchain would have an extensive network of autonomously operated nodes ( geographical dispersed collection of computers ) undertake the task of verifying the block’s authenticity ( synthétisation of some processing ) before it can be appended to the blockchain. Decentralization ensures that the control of the block’s integrity ( plus the added distribution of oversight and decision-making authority ) is dispersed among individuals rather than concentrated in the hands of a particular individual or corporation.
Scalability: in the context of blockchain networks, this refers to the platform’s capacity to effectively process a higher volume of transactions, typically via an increase in the number of processing nodes. Scalability solutions aim to boost transaction throughput while preserving decentralization and security.
Security: in the context of blockchain, it involves the implementation of a comprehensive risk management system. The foundational tenets of a blockchain security framework are consensus, cryptography, and decentralization, which foster trust in transactions. Transactions are linked in a cryptographic chain to their preceding transactions, and validation is carried out via a decentralized consensus mechanism.
Various strategies are being developed to alleviate the tensions among decentralization, security, and scalability. Here, the community differentiates between two things:
Layer 1
What can be done on the base layer, the actual blockchain platform? This layer only handles two functions: creating a block and adding it to the main blockchain. Scalability solutions will usually display terms like forking or sharding.
Forking: Scaling solutions on Layer 1 networks are typically introduced by the project’s development team (or sometimes unhappy users dissatisfied with functionalities offered by existing blockchain implementations). These proposals are usually radical changes to some foundational characteristics of a network’s protocol. Depending on the solution, the supporting community (network operating nodes) may need to upgrade to the latest version of the protocol software.
Sharding solution: Sharding, the primary scaling solution for Layer-1, operates on the principle of “divide and conquer.” The main blockchain is partitioned into several shards, which are then individually assigned to pools of processors/validators to reduce the burden on any one central entity. Hence the blockchain becomes, in the best-case scenario, a horizontally partitioned composite of its original structure.
Layer 2
What can be done with additional/adjacent layers (not on the base layer, i.e., not the main chain, therefore titled “off-chain”)? What can we do to decongest the central processing? To scale Layer-1, the initial step would be to redefine the perimeter of concerns of Layer-1, and potentially migrate processes to some alternative, satellite processing layer entity (authentication, processing, bundling, etc.), titled Layer-2, constructed atop Layer-1. The “off-chain” concept emerged shortly after blockchain inception (mainly as a result of “path-to-least-resistance” due to the difficulty of sharding). It is currently reshaping the blockchain technological landscape, with ecosystems, products, and technologies solely focused on off-chain / layer 2 processing, leaving the main-chain, or layer 1, to simply act as source of truth. It, therefore, becomes critical to understand what we mean by off-chain (Layer 2) when discussing some products. To regroup, let’s discuss what interesting concepts support a plethora of market solutions: The most common solutions are state channels, sidechains, optimistic Rollups, and Zero-Knowledge roll-ups.
Let’s go one by one:
State Channels: State channels are like opening a private room for some participants off the main blockchain (Layer 1). In this room, they can conduct multiple transactions amongst themselves quickly and without fees. Once they’re done, they settle the final result on the main blockchain. It’s similar to tabulating all your orders on a bar tab and settling the bill at the end, rather than paying for each drink individually. By enabling two or more parties to engage in a multitude of off-chain transactions, the state channel mechanism only requires the broadcast of two on-chain transactions to initiate and conclude the channel.This helps in making blockchain transactions faster and reduces congestion on the main blockchain.
Nested Chains: Imagine the main blockchain (Layer 1) as a central tree trunk. Now, think of nested chains as smaller branches growing from this trunk. These branches can have their own mini-blockchains, but they’re still connected to and derive their security and validity from the central trunk. The trunk chain defines the parameters and rules of the nested blockchain operation. However, the execution of the transaction is performed solely by the branches chain, while the main chain’s role is limited to dispute resolution when necessary. That is, the day-to-day work is delegated to the nested chain that returns the processed transactions to the main chain upon completion. Here again, nested chains allow for more transactions and activities without burdening the main trunk, ensuring the system remains efficient and scalable.
SideChains: A sidechain is a distinct blockchain that originates from and runs concurrently with the main blockchain. It is an independent network that remains connected to the main blockchain. Think of the main blockchain (Layer 1) as a busy highway. Sidechains are like parallel roads that run alongside this highway. They allow vehicles (transactions) to move without crowding the main highway. While these side roads are separate, there are checkpoints where vehicles can enter or exit back to the main highway. Effectively it is a blockchain that connects with the Layer-1 through a two-way peg system. Sidechains operate independently but can still transfer assets to and from the main blockchain, offering a way to manage more activities without slowing down the primary network. The scalability and speed of the chain are regulated by a separate consensus protocol in a sidechain.
RollUps: The idea of roll-ups is to consolidate a bunch of transactions through various mathematical or cryptographic means, in order to post a minimal summary of that processing in a single translation on the main chain, Layer-1. So far, the crypto community has come up with two major paradigm to run this in a secure manner:
-
Optimistic RollUps: The rollup mechanism operates on the assumption that all transactions are valid and provides a window of opportunity, known as the “challenge period,” during which any entity may challenge the legitimacy of the transactions.
-
Zero-knowledge Roll Ups: The (not so new) cool kids on the block. Compared to the optimistic version, it verifies the validity of up to thousands of transactions (no retraction period needed). The Zero Knowledge part is the fancy bit: it allows one party (the prover) to prove to another party (the verifier) that a statement is true without revealing any information about the statement itself. It allows for trustworthiness of the bundle and potentially the privacy of data submitted.
All of these solutions target the same pains. The entire blockchain community works to sustain computation integrity (CI), faster, cheaper blockchain technologies, with ever more security and privacy. Think of the above like different techniques for a single purpose: the wide onboarding of transparency and privacy across all socio-economic interactions. As citizens, we want to trust the state of our social bureaucracy