As of February 2018, Bitcoin blockchain could handle 3–7 transactions per second, while the corresponding figure for Ethereum blockchain was 12–30. When we compare this with Visa or MasterCard, it’s obvious that Bitcoin and Ethereum aren’t processing transactions fast enough to be considered as viable alternatives for day-to-day transactions. There are several ways in which blockchain and cryptocurrency developers are trying to improve transaction speed in the blockchain, and sharding is one such method.
The promise of decentralization and immutable record make blockchain possibly one of the most profoundly powerful technological innovation in recent years. While cryptocurrencies such as Bitcoin and Ethereum are its most famous applications, financial technology (FinTech) companies were quick to understand the value it can offer outside cryptocurrencies. In recent months, multiple companies even outside of FinTech have understood the promise of the blockchain and working on disrupting the industry verticals they are in, with the help of this technology. For e.g.:
- LockChain.co is building a zero-commission travel marketplace with the potential of disrupting giants like Booking.com and Airbnb.com.
- Sia network enables anyone with excess storage to put up their computer for rent on the cloud, which can potentially disrupt cloud computing giants like Amazon, Microsoft, or IBM.
- Nebula Genomics, Encrypgen, Luna DNA, and Zenome are giving the consumers the control of their DNA testing data, something that the current healthcare providers don’t allow.
For blockchain to be ubiquitous, the following need to be addressed:
- Scalability issues
- Latency issues
- Low throughput
Public permission-less blockchains have nodes, i.e. computers on the network, maintaining a shared version of the information. Each node has complete information on the blockchain. This ensures the permanence of the blockchain, i.e. a cyber attacker can’t destroy it just by taking out a central server.
Most public blockchain also has very secured means of ensuring data integrity. No existing block can be deleted or modified. Blockchain can be updated only be adding a new block, and in a permission-less public blockchain, any node can do so. Hence, there’s a need to maintain the sanctity of the order of transactions. Blockchain does that with the help of consensus mechanism.
Most widely used consensus mechanism uses proof of work (POW) algorithm. Here, a ‘miner’, i.e. the combination of special-purpose software, powerfully designed hardware, and their user, can add a new block only after solving a complex cryptographical puzzle. The miner must complete very large number-crunching operation at high-speed, in a competitive environment, and the POW algorithm requires that the majority of the participating nodes approve the transaction. In a decentralized network, no one can hijack the computing power of the majority of the node, making hacking blockchain economically non-viable.
While every node having the entire information on the blockchain, and the POW consensus algorithm make blockchain very secure and permanent, the design principles also impact scalability and transaction throughput adversely. As the blockchain grows, with more users and a higher number of transactions, there is increasing node on each node. Participation of every participating node in transaction validation makes the transaction process slower.
Sharding: a solution to the scalability, latency and transaction throughput issues
Sharding is a concept that’s widely used in databases, to make them more efficient. A shard is a horizontal portion of a database, with each shard stored in a separate server instance. This spreads the load and makes the database more efficient.
In case of the blockchain, each node will have only a part of the data on the blockchain, and not the entire information, when sharding is implemented. Nodes that maintain a shard maintain information only on that shard in a shared manner, so within a shard, the decentralization is still maintained. However, each node doesn’t load the information on the entire blockchain, thus helping in scalability.
As you can see by now, POW consensus algorithm can’t be used in conjunction with sharding, for, after all, how can all the participating nodes be involved in transaction validation where the nodes have information for only one shard, i.e. the one it belongs to? Blockchains that implement sharding use proof of stake (PoS) consensus algorithm.
PoS algorithm has specific, designated nodes that take transaction validation responsibility. These nodes are called ‘stakers’, for, they stake some of their crypto tokens for transaction validation. Upon successfully validating a transaction, the staker may earn part or whole of the transaction fees. The more crypto token a staker stakes for transaction validation purpose, and the longer the duration of the stake, the higher is the number of transactions the node gets to validate. PoS algorithm has some advantages over POW, and these are:
- Only designated nodes validate the transaction, and not the entire network;
- Since there’s no mining, expensive special-purpose hardware isn’t needed, besides the energy requirements are lower;
- It’s easy to identify validators with high loyalty, simply pick the ones who have staked a higher number of crypto tokens and a longer duration.
A blockchain that implements sharding identifies stakers in each shard, who take the transaction validation responsibility. Since transaction validation is being done by loyal stakers, security of the blockchain is still very high.
Usage of sharding in the blockchain, and what’s next:
Sharding is a relatively new concept in the blockchain. Some projects have incorporated this concept, for e.g. Shard Coin (SHARD). Telegram Open Network (TON), a potentially very important project, currently in private token sale phase, has plans of using sharding to ensure speedy transactions. TON is being developed by Telegram, the well-known encrypted messaging app, and their cryptocurrency GRAM will enable users to send funds across borders without worrying about remittance fees.
Wider adoption of sharding requires the blockchain and crypto developers to work on an important area. While communication between nodes within a shard is smooth, inter-shard communication is currently not easy and requires the development of a separate protocol. Addressing this key requirement will potentially result into a wider adoption of sharding, and that’ll help blockchain more scalable with higher transaction throughput.
Learn more about edChain: An open-source, decentralized library that enables sharing of educational content across apps and organizations. The system allows full attribution to the content creator. Their Stellar blockchain platform facilitates governing the relationship and payment transactions between the service provider and consumer with smart contracts.
We’ve just launched the edChain Telegram to channel before our ICO Pre-sale. Join to learn more about how we are about to democratize education and how you can earn some edcoin. https://t.me/edChain_io