Blockchain scalability was a big problem which quickly caught the attention of engineers and scientists. A couple of years ago, it felt like a real threat to the crypto industry and, fast forward to today, we’re getting more and more confident that blockchains can scale. In fact, most of the current debate concerns with scalability solution will win.
So what actually means “scaling” the blockchain?
Scalability just means that the blockchain can process a lot of transactions, measured in transactions per second (TPS).
We can’t talk about scalability without mentioning the famous “scalability trilemma.” The term was coined by the founder of Ethereum Vitalik to explain the three properties that a blockchain aims to have: scalability, decentralization, and security.
It’s clear, so far, that we can achieve two of these properties at once. But getting all three is really, really difficult. That is how the Layer 2 comes into role. Lets get trilemma terms clear:
Is it Scalable?
means that the blockchain can process a lot of transactions, measured in transactions per second (TPS).
Is it actually Decentralized?
Decentralization means the blockchain is run by many “trustless” nodes across the world — not run by a small group of centralized “trusted” nodes.
Is it really Secure?
Security of a blockchain means that the blockchain is resistant to attack even if a certain percent of the nodes in the network are malicious. Ideally, it should be able to handle up to 40- 50% of malicious nodes.
There have been many different attempts at scaling blockchains, but it almost always comes at the cost of one of these three properties. A blockchain can either be scalable and decentralized (not secure), or secure and scalable (decentralization compromised) or decentralized and secure (not scalable)
So what is Layer 1 and Layer 2:
At the highest level, layer 1 scaling refers to scaling the core blockchain itself. In contrast, layer 2 scaling refers to moving transactions off the main blockchain layer into a separate layer that can communicate with the mainchain.
Ethereum hopes to use both layer 1 and layer 2 solutions to solve the scalability trilemma. Sharding is Ethereum’s layer 1 solution, while rollups are Ethereum’s layer 2 solution.
In Ethereum Rollups (Ethereum layer 2), we do the transaction processing off-chain, but we post transaction data on-chain. The amount of data we post on-chain is the minimum amount required to locally validate the rollups transaction. By putting data on-chain, anyone can detect fraud, initiate withdrawals, or personally start producing transaction batches. Therefore, rollups give us much higher security guarantees than other solutions such as sidechains and Plasma (but that’s for another post).