Blockchain Basics: Sharding Technique

Traditional Sharding

Traditional Sharding

Background

Scalability is one of the biggest problems that many blockchain platforms face today. Scalability is the sole reason why we haven’t seen a big breakthrough in the adoption of the blockchain. In fact, public blockchains like Ethereum handle only up to fourteen transactions per second on average, and this figure is far inferior in terms of real-world business transactions.

Slow transaction processing has the potential to choke up the network and take us far away from real-time sharing of information that is extremely vital in today’s competitive and data-driven world. The inconvenience factor increases by three with a minute-increase in confirmation time. Unless we solve the TPS problem, we will not be able to host complex DApps on the current network and pave way for the global adoption of the blockchain technology.

So in light of all these issues, what technique should we use in order to solve this TPS problem?

Solution?

One widely accepted solution is Sharding. A shard is basically the horizontal portion of the database which is stored on a separate instance on the server. This concept of sharding is taken from traditional databases in which the main idea is to distribute information in shards (smaller databases) to spread the data and process information more efficiently and quickly. Sharding also allows for faster data transactions because when you spread the information across multiple databases, each smaller database can process specific information at the same time as others. Therefore, the more shards you have, the more information you can process in parallel.

However, the process of sharding in Blockchain is comparatively complicated since basic consensus mechanisms like Proof of Work require every node on the network to carry all the information. The only reason PoW is still used in blockchain is because of its high security and accurate validity of the transactions. But this approach is not considered to be scalable.

On the other hand, most of the sharding techniques used are primarily in projects that employ the Proof of Stake consensus mechanism as opposed to the PoW consensus mechanism. PoS uses specific, designated nodes, with specific information that requires individual nodes to put tokens as stakes and take the responsibility of validating the transactions. Sharding has a big fan following in the Ethereum community but it remains unclear when an Ethereum sharding protocol might actually be implemented.

Benefits

That being said, sharding, in itself, has a very specific job description: blockchain sharding includes different nodes processing different transactions in parallel instead of involving all the nodes for information processing and validation. Sharding seems like a very practical solution for the blockchain scalability issue because the number of shards in the networks can scale infinitely without worrying about the scale of the network itself. This also means that the more nodes you have on the network, the higher your ability to distribute information across shards on the network and increase information processing speed without compromising the consensus ability.

Problems

Although sharding sounds very appealing and all-very-perfect, it is not without risks. Through extensive sharding, we run the risk of compromising decentralization and security. In a complete decentralized network, all nodes are involved in validating the transactions. However, when we shard the network, only specific nodes present on the shard are responsible for validating the transactions. Moreover, This increases the probability of invalid transactions recorded by a subset of malicious nodes and also increases the chances that a malicious node goes undetected thus compromising the network’s security.

Conclusion

In conclusion, sharding is definitely a promising solution to the scalability problem but can cause security and decentralization issues. Currently, there are several types of sharding techniques employed by many blockchain projects but no technique is adequate enough to solve the scalability issue. However, Dynamic Monitored and Distributed Sharding is one unique technique that is currently under-development but theoretically is the perfect solution for the scalability problem.