The issue of scalability is one many blockchains have been suffering from for years now. A solution called ‘sharding’ has recently gained traction in the crypto world. Creating shards of blockchains and letting them work on adding a separate group of transactions each to the main blockchain are becoming popular. There are different sharding types, and learning about them will give you an idea of how to scale blockchain technology. Let’s find out about sharded blockchain types in this post!
Table of Contents
Sharding is a relatively new approach taken by the developers of various blockchains to facilitate better scalability. The concept here is to make a team of nodes, called shards, to process several transactions.
Let’s understand it this way, what if your computer is put through multiple rigorous tasks? Wouldn’t it be better if these tasks were assigned to multiple threads in the processor? Similarly, scaling a blockchain means increasing the number of blocks, which means more transactions.
Multiple types of sharding blockchain focus on adding transactions to a ledger efficiently and faster. Shards synchronize with each other to create a unified ledger which provides a stronghold to the blockchain. With the help of multiple sharded blockchain types, the true goal of making blockchain technology global and processing large amounts of transactions can be achieved. Now, there are multiple sharding types involved in the crypto world. Understanding them will hopefully help you understand blockchain structures as a whole better.
To execute blockchain sharding, larger databases and their rows and columns are split into the smaller ones. Similarly, larger data tables are broken down to small ones and added to sharded tables. Whenever each added table has the same schema but every row is unique, it is called horizontal sharding. More machines are added to the existing stack to increase the processing speed, share the load and support more traffic.
As opposed to horizontal sharding, vertical sharding includes addition of different schema to each new table. This new schema is a faithful subset of the original one. Vertical sharding is done when queries return only a subset of the columns of the data.
Network sharding is one of the types of sharded blockchains that creates better communication between the nodes. This means that the shards process transactions while properly syncing with each other. Even though consensus is performed in each shard with parallel processing of transactions, nodes still store a local copy of the whole ledger. It improves the ledger’s throughput but it runs into the typical problem of vertical scaling over time where the cost of operating the network is still high resulting in increasing gas fees once maximum throughput is throttled. Also to be noted, with vertical scaling, a sybil attack by a bad actor increases.
Amongst various types of sharding blockchain, transaction sharding means that the ledger is stored in all the nodes but what gets distributed in shards is the addresses structure. This helps in improving the transaction speeds in the same shard. Practically, it is more or less the same as that of network sharding in terms of achieving increased throughput or TPS without sharding the global state. Further, transaction sharding mostly allows for atomic and cross shard composability which is beneficial for developers deploying smart contracts and building applications on the sharded platforms for a great UX and UI.
Amongst all the types of sharded blockchain, the state-sharded one was considered the most challenging until recently. So let’s spend a bit of time understanding it. Here the complete state is divided into different shards. It helps in making the verification and processing of transactions faster, secure and more accurate compared to network sharding. State sharding, in a nutshell, helps to utilize network resources way more efficiently reducing the storage overhead for node operators. State sharding, in general, allows for higher scalability and reasonable bandwidth requirement.
However, it requires the shards to constantly stay in touch and be faster with their functions because each shard here will store only a portion of the state ledger. A constant rotation of validator nodes mitigates sybil or 51% attack however rotating the nodes results in relatively high latency as new nodes introduced in the transaction validation process would take some time to download and sync to the state of the shards they are involved in. This also means transactions are processed sequentially as the blockchain will have wait for minimum number of nodes to create and join a new shard. Further, state sharding, in and itself, does not guarantee atomic and cross shard composability making it less reliable for developers building their applications on such blockchain networks unless there are specific atomic and cross-shard composability protocols integrated to address those incapabilities.
Static state sharding is similar to state sharding. It is a type of sharding where the partitioning of the state into shards, is done in a static, predefined manner. It evidently does not change dynamically based on the current state or load of the network. Although static state sharding is less complex to implement when compared to dynamic state sharding, it also means the overall scalability and efficiency are limited since available resources cannot be adjusted in response to changes in network conditions. Transactions, in this type of sharding, can only be processed sequentially after a minimum number of nodes join the network to create a new shard. Further, if a blockchain network using static state sharding does consensus at a block level, sequential processing of transactions is the most likely outcome. Like state sharding, static state sharding also does not guarantee atomic and cross-shard composability.
Adaptive state sharding is more advanced than static state sharding where the shards are adapted to the current state of the network. This is done by changing the number of shards or the size of the shards based on factors such as the number of nodes in the network and the amount of data being processed. For example, if there is a sudden increase in the number of transactions, the network deploying adaptive state sharding can automatically create more shards to handle the increased load. This helps to ensure that transactions are processed quickly and efficiently, even during periods of high traffic with parallel transaction execution. Essentially, this type of sharding aims to combine the benefits of state, network, and transactions sharding. That being said, adaptive state sharding renders load balancing on a reactive basis (and not on a proactive basis like dynamic state sharding) because the distribution of load happens based on the current state of the network and not on the historical state of the network.
Dynamic state sharding is the most advanced version of all the sharding types. It allows validator nodes on a network to be assigned dynamic address ranges across multiple shards. Unlike static state sharding where all the nodes in a shard cover the same address range of an account, dynamic state sharding requires each node to hold a different address range with significant overlap. If combined with transaction level consensus, as opposed to block level consensus, a transaction that affects multiple shards can be processed simultaneously/parallelly by these shards rather than sequentially. This not only reduces the time to process the transaction even if it affects multiple shards, but also ensures atomic and cross shard composability.
Another key advantage of dynamic state sharding is that it takes adaptive state sharding to another level by helping a network to distribute the load more efficiently and on a pro-active basis. It shards the state, network and transactions evenly based on not just the current state of the network but also based on the historical states of the blockchain (which includes latest state, and transaction history). For example, a dynamic state sharding algorithm might track the average number of transactions processed by each shard over time. This information could then be used to predict which shards are likely to become overloaded in the future. The algorithm could then take steps to pre-emptively balance the load across the shards. Another example is, the algorithm might notice that certain types of transactions are typically processed by specific shards. This information could then be used to proactively route new transactions to the appropriate shards.
Through dynamic state sharding, every node added to the blockchain network will increase the transaction throughput instantly to enable true linear scalability. And this is the main X factor that impacts every other outcome on a blockchain network favorably including throughput, decentralization, security and constant transaction fees irrespective of the demand in the network.
When it comes to operations using a blockchain, every user wants their transactions to be completed faster and in the most efficient manner. But due to high traffic congestion, bandwidth and network latency can take a serious hit. This is where different blockchain sharding types help the users. The scalability of a blockchain network improves with the help of sharding.
Partitioned sharding and state sharding are two great examples of sharding currently. Partitioned sharding is applicable where the shards do not communicate directly. On the other hand, state sharding brings direct communication between the shards with a central or state relay.
NEAR sharding is a good example of a real time sharding experience for the clients. It focused on developing the first ever experience to run real-time cross shard transactions without increasing the load on the clients. This type of sharded blockchain focused on enabling any low end device to work as a node for the network. Proof of validity is another feature of the NEAR sharded blockchain network. Blocks must have a proof of validity, and the network validators are responsible for ensuring the proof if available.
For the new Casper proof of stake system of the Ethereum network, the Ethereum beacon chain turns out to be the master chain. It is another example of blockchain sharding types. Beacon chain is an integral part of the roadmap to Ethereum 2.0. Tasks like processing crosslinks, adding storage to the network, and the maintenance of validators are given to the Beacon chain. The whole chain supports the processing of Ethereum block by block consensus right beside the finality gadget. It also manages other small sharded chains that support the Ethereum network.
Another classic example of different blockchain sharding types is the Polkadot Parachain. It is a different approach taken for the distributed database sharding type. It is a simple iteration of the original blockchain and associates with the security offered by a relay chain. Parachain can help with facilitating efficient transaction operations alongside efficient data storage for the blockchain.
Zilliqa uses network-level dynamic sharding to scale its blockchain. In network-level dynamic sharding, the network automatically adjusts the number of shards based on the current network load. Transactions on Zilliqa are divided into microblocks, which are then processed in parallel by different shards. Once the microblocks have been validated by each shard, they are merged into a single block and added to the blockchain. This allows for high scalability and performance. Although parallel processing is enabled across shards on Zilliqa, it is not enabled across individual transactions due to its block level consensus limiting its scalability.
Adaptive state sharding is used by MultiversX blockchain (formerly Elrond). It is a high-performance, scalable, and secure blockchain platform designed to power the decentralized ecosystem. MultiversX’s adaptive state sharding technology apparently allows the network to process thousands of transactions per second parallely without sacrificing security or decentralization. Adaptive state sharding here works by dividing the network into shards, each of which is responsible for processing a subset of the network’s transactions. The number of shards is dynamic and can be adjusted based on the load on the network i.e. the current state. For example, if there is a sudden increase in the number of transactions, the network can automatically create more shards to handle the increased load.
Shardeum deploys sharding from the ground up. It uses dynamic state sharding to assign dynamic account spaces to the nodes across shards on the network. Unlike static state sharding where all the nodes in a shard cover the same address range of an account, dynamic state sharding requires each node to hold a different address range, but there is significant overlap between the addresses covered by nodes in respective shards. With transaction level consensus, the network will allow for simultaneous/parallel processing of transaction across shards with atomic composability. Every node added to the network will increase the transaction throughput instantly that helps the network to scale linearly.
Dynamic state sharding, further, advances adaptive state sharding by distributing network load proactively and efficiently. It balances state, network, and transactions using both current and historical states of the network. By analyzing transaction trends over time, it can anticipate and manage shard overloads and route transactions to optimal shards.
Now that you understand all the sharding types, you must know how it can help with scaling blockchain technology. Sharding is now becoming huge by the day among blocking developers. Improving the blockchain technology requires faster transactions and efficient data storage, both of which can be managed with various types of sharding blockchain.
Considering blockchain is a type of a large database system, sharding in blockchain refers to the partitioning of large tables of data into smaller tables. Smaller tables of a blockchain data are called shards in simple terms. The word in itself means ‘a small part of a whole.’
Sharding can be called a kind of scaling called horizontal scaling since more nodes are added to share the network load. Horizontal scaling allows almost limitless scalability so aa to handle large sets of data and immense workloads.
Different components of sharding are the shards, the data sets and configuration servers. A larger blockchain is broken down and the data entries are done into smaller tables, so different blockchain sharding types are formed. The whole process consists of different data type components as well, which are used to make the blockchain shards more efficient.
Ethereum Bitcoin Difference | What is Decentralized Application | Testnet Vs Mainnet | What is Mastercoin | API Vs Blockchain | What is the Best Software Wallet | CBDC Blockchain | What is the Graph | Stablecoin Vs CBDC | What is Staking in Crypto | How Does Proof of Authority Work | Blockchain Waves Platform | Hyperledger Fabric Blockchain | What is a Blockchain Transaction | Hard Fork vs Soft Fork | Proof of Stake Sharding PPOSS | What is Crypto Lending | Decentralized vs Centralized Crypto | What is Zcash | How Lisk Works