Scalability of Blockchain
What is Sharding? The lack of scalability, only capable of processing a few transactions per second, is a major bottleneck for blockchain technology to garner mass adoption. So with only 5 transactions per second (tps) for Bitcoin and 12 transactions per second for Ethereum, existing blockchain solutions are not competitive to centralized solutions like Visa as a payments system and AWS as cloud computing service. For example, with the growing popularity of CryptoKitties in 2017, it slowed down the Ethereum network significantly with just a few thousand users. This is certainly a concern for companies using Ethereum to power their services.
Currently, every computer maintaining Bitcoin and Ethereum network are working on the same public ledger. In other words every node has to process every single transaction. Adding more computers into the network improves only security but not efficiency. A blockchain trilemma forms as none of the blockchains can currently achieve scalability, security, and decentralization at the same time.
Bitcoin and Ethereum are networks security comes from Proof-of-Work. Hundreds of thousands of computers and machines specializing in mining around the world process transactions. As a P2P cash system / a world computer, Bitcoin and Ethereum are both secure and decentralized. However, they are not immediately scalable. To improve scalability, a lot of solutions have been suggested. For example, BitcoinCash (fork of Bitcoin) increased block size to allow more transactions to be processed in each block, while Lightning Network (second layer) utilized off-chain payment channels to reduce the burden on the main chain. So Sharding is one of the most popular approaches in development by different blockchain projects including Ethereum, Zilliqa, Quarkchain, etc.
What is Sharding?
Sharding is a horizontal partitioning, a database design principle, that separates database servers to spread the load. The introduction of this technology is for blockchain to solve scalability issues and latency issues.
Implementing sharding in the blockchain, the network separates into different teams (shards). The shards can process transactions in parallel. Each node will have only part of the data on the blockchain, not the entire information. As a result, more transactions can be processed at the same time. For example, imagine a network of 1,000 nodes; one may divide the network into 10 shards each composed of 100 nodes. The speed should increase by 10-fold.
1000 nodes can divide into 10 shards (100 nodes each) to achieve 10x performance.
Single-Shard Takeover Attack
By implementing sharding, a new risk arises, the single-shard takeover attack.
Single Shard Attack means malicious nodes are controlling one shard and transactions may be modified.
To prevent a single-shard attack, it is important to prevent attackers from focusing their hash-power onto a single shard.
The way to assign nodes into different shards is the key. A random sampling of validators on each shard is suggested for Ethereum’s sharding solution. So sufficient randomness can ensure that validators will not know which shard they will get in advance. Also, it requires ⅔ of all validators on a shard to confirm the legitimacy of a block.
Apart from this, the minimum size of a shard should be limited to reduce the possibility that malicious nodes are assigned to the same shard. In conclusion, with the above strategies, the security of the network will not be sacrificed for the tremendous improvement on efficiency.
Privately owned systems commonly use Sharding. It can horizontally spread the load for a database or search engine. However, implementing it into a public blockchain is still a challenge. So the nature of decentralization and transparency makes it difficult to maintain security. Apart from single shard attacks, developers face further issues such as cross-shard communication.
If successful, sharding will greatly reduce transaction costs and allow developers to build more sophisticated dApps. It is considered one of the most feasible solutions for the blockchain trilemma.
Sharding FAQs – Ethereum
The Zilliqa Design Story Piece by Piece: Part 1 (Network Sharding)
Ethereum Sharding: Overview and Finality – Hsiao-Wei Wang
Written by Charlie Tsang, Trader at Genesis Block
For any queries please contact email@example.com / @GBCharlie
Thanks for reading our article on What is Sharding? – A Solution for Blockchain Scalability. If you found this article helpful don’t forget to subscribe to our newsletter.