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!
What is Blockchain Sharding?
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.
Horizontal and Vertical Sharding
Horizontal Sharding
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.
Vertical Sharding
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.
Types of Sharding Blockchain
Network Sharding
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.
Transaction Sharding
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.
State Sharding
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
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.
Dynamic State Sharding
Dynamic state sharding is the most advanced version of all the sharding types. It combines the advantages of all the other sharding techniques but advances them further to enable the most important X factor, so to say, linear scalability! On the flip side, it is also the hardest form of sharding that can be deployed to a public blockchain network. Dynamic state sharding allows validator nodes 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 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. 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.
Examples Of Sharding
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.
1. NEAR Sharding
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.
2. Ethereum Beacon Chain
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.
3. Polkadot Parachain
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.
4. Sharding by Zilliqa
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.
5. Sharding by Shardeum
Shardeum deploys dynamic state sharding to assign the nodes 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, but there is significant overlap between the addresses covered by nodes in respective shards. With transaction level consensus, the network will allow for simultaneous 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. With linear scaling, Shardeum aims to be first Web3 network to solve blockchain/scalability trilemma maintaining low gas fees regardless of the load in the network at any given point in time.
Conclusion
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.
Frequently Asked Questions (FAQs)
1. What is Sharding in 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.’
2. Is horizontal scaling the same as Sharding?
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.
3. What are the Components of Sharding?
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.
Popular Searches
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