Scaling has been one of the biggest debates in the blockchain and cryptocurrency space since it began to attract users. The popularity and application of blockchain has led to an issue of trying to remain efficient and fluid, while under increasingly greater strain.
One of the biggest debates about scaling, and how to go about scaling, came under Bitcoin's blockchain, and was dubbed ‘The Civil War’, eventually ending in a hard fork and the creation of Bitcoin Cash. That debate raged for a long time, split opinions, and eventually ended in a stalemate, with one side of the argument forming their own chain.
But there are hundreds of other debates floating around a range of different blockchains. As blockchains fill up, they need to be scaled, but because there are multiple ways in which blockchains can be scaled, and because they are decentralised, a debate often springs up.
For Ethereum – an important blockchain that introduced the idea of smart contracts to the ecosystem, and thus enticed many people to its blockchain, including other blockchain solutions – its scaling debate is a vital one, and it has emerged with three main solutions: state channels, Plasma and sharding.
Why Ethereum Needs to Scale
Ethereum is such a vast and widely used blockchain that it’s the basis for hundreds of ICOs and many other well-established coins – indeed, that was always its function: to be a decentralised super-computer for projects to run off with its smart contract system.
However, Ethereum is still very much in its infancy, the blockchain is coming to terms with its need to scale and, despite projects on the chain spouting how safe, secure and flawless it is, that is simply not the case – there is still a long way to go for Ethereum, and it starts with scaling.
“At present, public blockchains have a core limitation, in that every transaction on the chain needs to be processed by every single node, from major transactions to minor changes.”
At present, public blockchains have a core limitation, in that every transaction on the chain needs to be processed by every single node, from major transactions to minor changes. The effect of this has already been seen on Ethereum’s chain with the game of CryptoKitties, which slowed down the entire blockchain.
Proceeding Through Ethereum’s Layers
A busy blockchain means a slow and expensive one, ultimately scaring off more users and entirely blocking growth. To solve this issue, there are a couple of options. In the case of Ethereum, these options can be enacted at different stages, or layers.
The blockchain can be divided into two such layers: changes that happen on the chain itself – on-chain/in the first layer – and changes that happen off-chain/in the second layer. When it comes to on-chain solutions, the main premises are getting the most out of nodes.
One easy solution would be to ask nodes to do more work, effectively making the block size bigger. If you doubled the block size, then the nodes would work twice as hard and the chain would be half as busy. But this also means that decentralisation takes a rather big hit.
“Doubling the block size would mean less powerful devices… would drop off the network, leaving those in possession of vastly more powerful devices with a lot more control.”
Doubling the block size would mean less powerful devices, such as home PCs and other nodes and miners, would drop off the network, leaving those in possession of vastly more powerful devices with a lot more control.
Another on-chain alteration would be instructing the nodes to concentrate on more important tasks, so as to not burden them with every trivial transaction on the network. This would involve splitting the network into two sections that run semi-independently from each other, as theorized by Vitalik Buterin’s Ethereum research group and others as ‘sharding’.
Sharding is nothing new in terms of databases, and is a traditional technique that effectively breaks a database into pieces and puts each part on a different server. The goal of this is to move away from the idea of ‘full nodes’, meaning the full state of the network, including every transaction, is not required on every node.
“[Sharding nodes] store only a subset of data… But, therein lies the problem: the trustless nature of the blockchain can be compromised once nodes start relying on other nodes for data.”
Nodes then store only a subset of data, and deal only with the related transactions. If nodes need to know more about transactions or blocks they don’t hold, they can find another node with that information. This poses a problem however: the trustless nature of the blockchain can be compromised once nodes start relying on other nodes for data.
Moving to the second layer, or off-chain, there is an option to scale Ethereum with state channels. However, in order to move off the chain, and still maintain blockchain integrity, one has to maintain a core kernel of certainty as the anchor. Moving off-chain is possible as there is always a fixed attachment to the main chain.
These layers built ‘on top’ of Ethereum won’t always have the same guarantee as on-chain operations. But they can still be sufficiently final and secure.
“With the Lightning Network, and state channels, transactions and updates happen off-chain within their own system, and once the channel is completed, they are added to the chain.”
State channels can best be likened to the Lightning Network, which is also an off-chain solution and is being implemented on a host of other blockchains. With the Lightning Network, and state channels, transactions and updates happen off-chain within their own system. Once the channel is completed, they are added to the chain.
As an example, a game of dominos played between two parties involves a number of moves by each player. These moves are recorded by the actual dominos and the game, but when it comes to the final score, or the winner being declared, a contract is reached and an agreement made that player X won because they had more games.
If we look at this on an Ethereum network, it would usually require a smart contract that implements the rules of dominos, and keeps track of each player’s moves. Every time a player wants to make a move, they send a transaction to the contract. When one player wins, as determined by the rules, the contract is finalised.
However, with state channels, this game of dominos can be taken off-chain, where the moves of the game are not kept or verified by each node on the network, rather just between the two players. The contract now holds the rules, the prize and the contestants, and operates like a judge.
The moves of the game are sent only between the two contestants and are kept off the chain. However, they can be sent to the chain, as they are verifiable Ethereum transactions. But, in all reality, once the game is over, the channel is then closed when the final state is submitted. There is thus only one transaction on the main chain, which does not slow it down, and lowers the cost as well.
This scaling option has many positives, such as its usefulness when it comes to an extensive requirement for state updates between parties, and when the parties are set and defined, but it also relies on availability and can cause issues with something as simple as a lost internet connection.
Another off-chain option for scaling Ethereum came from Buterin, together with the Lightning Network creator Joseph Poon. While also an off-chain solution, Plasma allows for the creation of what is know as child blockchains that are attached to the main blockchain.
These child blockchains have the ability to spawn more chains, and those chains can in turn spawn more, and so on. As a result, the mesh of child blockchains can comprise many complex operations that encompass thousands of users under entire applications.
The child-blockchain grouping has very limited connection with the main Ethereum chain, but it can move faster and at a lower fee, because the operations on the child blockchain are not replicated across the entire Ethereum chain.
“The fact that both state channels and Plasma are off-chain often leads to comparisons being drawn between them. These comparisons are what push the scaling debate further and deeper.”
The fact that both state channels and Plasma are off-chain often leads to comparisons being drawn between them. These comparisons are what push the scaling debate further and deeper. For example, on state channels there is the option for an instant withdrawal once the channel is closed, and there is agreement between the parties, meaning the funds can be removed immediately. On Plasma, it requires the users to always go through a withdrawal process that involves a challenge period.
State channels are also usually cheaper, and faster, and they could also be built on Plasma child chains, which will lower the cost and time even more.
However, Plasma is still very much in its early phases, and there is a lot more work to be done and discoveries to be made. On state channels, in their similarity to the Lightning Network, that option is much further down the line.
No Getting Away From It
Scaling is something a lot of blockchains will have to face as they start to grow, if they want to ultimately succeed. But, if they are to make it to the next level, which Ethereum is on the cusp of doing, they will have to scale properly.
Making sure the blockchain runs as efficiently and as smoothly as possible is part of the attraction and, at the end of the day, that will all come down to its ability to scale.
CryptoKitties has been a breakthrough example of the flexibility of blockchain applications, especially when bringing the platform to a more mainstream audience. Its congestion on the Ethereum network is a perfect indication of its success.
Many forecasters are predicting dApps similar to CryptoKitties as being a key factor in bridging the gap between dedicated blockchain enthusiasts and the more casual consumer market. There are already other gaming-style dApps springing up, with impressive amounts of currency being traded within.
CryptoCountries is one such example. Currently, Japan costs the equivalent of $141,402 in-game. With players investing serious capital in these blockchain games, there is clearly a market for the recreational dApp user.
Illustrations by Kseniya Forbender
To contact the editor responsible for this story:
Margarita Khartanovich at [email protected]
- Artificial Intelligence Isn’t Ready to Take Over From Doctors and Nurses, Just Yet
- Machine Learning Vs. Analysts: Will AI Eventually Replace Data Scientists?
- Why The Danger of Deepfakes Is No Danger At All
- Sarcastic Robots? How Deep Convolutional Neural Networks Are Making AI Worryingly Human
- Traffic Lights in The Sky: Flying Cars Can Appear Sooner Than You Think