#34. Cryptocurrencies and Blockchain
What Is Sharding in Blockchain
Sharding in Blockchain Projects
Sharding is a method for distributing the load on a network by dispensing it evenly between individual servers or network segments. This technology arose to solve one of the most significant constraints of the Ethereum network — the speed of transaction processing. This limitation stands in the way of Ethereum’s scalability, with a computing network capable of processing up to 20 transactions per second. By comparison, Visa’s payment system can process about 24,000 transactions per second.
How Sharding Works
The original Ethereum technology currently works on the Proof-of-Work protocol and assumes that all the nodes in the network have to confirm the entry of new information into the block. Given the scale of the network, this is what slows down transaction processing. When sharding is implemented, the computational and storage load is distributed so that each node only processes and stores data about its own shard.
What Is a Shard
A single blockchain is programmatically divided into several separate chains, and a shard is such a chain of blocks. The individual shards are combined within a common blockchain by means of a network of validators. This process can be based on the Proof-of-Work or Proof-of-Stake algorithms. Since the announcement of sharding technology in 2017, there have been rumors of a transition to Ethereum 2.0. The first phase should be the introduction of the Casper protocol, which will make it possible to use a hybrid PoW and PoS protocol and test the basic sharding model within 64 separate shards within the Beacon Chain blockchain (the main Ethereum 2.0 blockchain).
Weaknesses of Sharding
The technology has two primary problems:
- Security. The blockchain segmentation makes each shard vulnerable to hackers, requiring significantly fewer computing resources for a takeover. If a takeover is performed, the underlying blockchain begins to receive false data and the data in the taken-over shard can be destroyed.
- Communication. Additional software solutions will be needed to communicate between users and applications in different shards.
The third problem is the need for a hard fork to implement sharding. And while the first two problems can theoretically be solved by technical means, a hard fork may lead to a split within the community.
The Potential of Sharding
Sharding can potentially solve the blockchain trilemma coined by Vitalik Buterin. Blockchain involves three key features: security, decentralized operation, and scalability. But at the same time, blockchain can only preserve two of these three features. If we can put a flawless version of sharding into practice then scalability can be achieved without sacrificing decentralization or security.