Lack of scalability is one of the major obstacles to broader adoption of blockchain technology in many sectors. Sharding can help blockchains improve their scalability and efficiency, which would make them more competitive compared to the incumbent centralized solutions.
Public, permission less blockchains are distributed ledgers that can store any kind of data in a decentralized and secure way. The lack of a central authority in the network means that all the data should be processed by every node in the system, and any new piece of information is added to the ledger only when the nodes come to an agreement on it. This way, the network ensures that the stored data is correct and cannot be corrupted by one or more malicious nodes.
Its decentralized nature gives blockchain technology its attractive quality – resilience to malicious data modifications, but also creates one of the major hurdles on the way to broader adoption of blockchain technology – lack of scalability.
When more nodes are added to the system, and the amount of data in the ledger grows, the latency, or slowness, of the network significantly increases. Think of a decentralized payment system. Every time a new transaction needs to be processed, the information should be updated on all nodes of the network, and it takes time. Centralized networks have a significant advantage here. For instance, the Visa payment system claims to be able to process more than 65,000 transactions per second.
Sharding is one of the solutions to the problem of blockchain scalability. It implies partitioning of the database into so-called “shards”, where each shard is responsible for processing only part of the data stored in the network. This way, the processing time can be significantly reduced.
How Does it work?
Sharding is done by dividing the network nodes into groups and splitting the information stored in the network between these groups, i.e., “slicing” the database into smaller pieces (shards). Each shard stores data with certain characteristics so that the shards can be distinguished from each other.
One way to do sharding is to partition the database horizontally, i.e., divide it into rows. This way, the rows comprise the shards that can store specific types of information. For example, shards can be separated based on the types of digital assets or smart contracts that they host.
The other way to do sharding is to organize network nodes so that there is a central relay network through which all the other “side networks”, or shards, can communicate with each other. This way shards can store and process any kind of information that their functions require while this information can be available to other shards when needed through a relay. It is important that shards can communicate with each other in one way or another so that any user of the network could get access to all the information stored in the blockchain.
Where it is used?
One of the most talked about use cases of sharding in the blockchain industry is arguably the sharding of Ethereum. Ether, the native currency of the Ethereum network, is the second largest cryptocurrency to date, after Bitcoin, with the number of daily transactions exceeding 1 million. The deployment of shard chains on Ethereum is a part of its upgrade to Ethereum 2. According to the roadmap, the Ethereum shards will be organized around a coordination layer – the Beacon Chain – which was launched in December 2020. The Beacon Chain is a proof of stake blockchain, so it plays a role in another important change on Ethereum – the introduction of staking. Ethereum shards will employ proof-of-stake to operate securely. It is expected that Ethereum will be able to accommodate 64 blockchains, or shards, which will significantly expand its capacity and improve efficiency. The shards will be coordinated through the Beacon Chain. Currently, the Beacon Chain is separated from the Ethereum mainnet and cannot handle smart contracts. In the future, it is planned that the two become connected.
Another case of sharding used to improve scalability is Polkadot, a blockchain project aiming to create an interconnected ecosystem of blockchains. Conceptually, Polkadot is planned as a network with shards organized around the main network called the Relay Chain. The shards are called parachains. In the beginning, Polkadot is planning to accommodate around 20 parachains, with the number eventually growing to 100. In addition to parachains, the Relay Chain will have so-called “parathreads”, slots that can be dynamically shared by several blockchains. To date, Polkadot does not yet operate active parachains. In August 2020, a testnet for the inter-shard communication protocol – Rococo – was launched. The first parachain slot on this testnet was awarded to the DeFi platform Acala Network.
What are the benefits?
The major benefit of sharding applied to a blockchain is improved scalability. Sharding allows a blockchain to connect more nodes and store more information without slowing transactions too much. This can accelerate the adoption of blockchain technology in many sectors, not the least in finance. Faster transactions can help blockchain-based fintech companies to compete with centralized payment applications.
Additional benefits of sharding include better accessibility to users and higher network participation. In Ethereum, sharding is expected to lower the hardware requirements to run a client, so that it would become possible to do it on a personal computer or phone. This way, more people will be able to participate in the network.
Sharding does not bring unconditional benefits, it might also increase some risks. One of the security concerns is the takeover of a shard or collisions between shards. This can result in a partial or complete information loss, or injection of corrupted data into the network through a malicious shard. On Ethereum 2, this security risk is addressed by randomly assigning nodes to shards and reassigning them at random intervals
List of Sharding Cryptocurrencies
Get started with Spydra
Spydra is a next-generation API driven Decentralization-as-a-Service platform to enable business and developers to leverage the full potential of Blockchain and the Decentralized Web Infrastructure.