What is Sharding?
|— Sharding is a scaling solution for blockchains: it’s simply a method that allows networks to handle more users with faster transactions.|
— It involves splitting the network into smaller blockchains called shard chains, with each validating its own transactions.
— Sharding is one of the scaling solutions planned to come to the Ethereum network to help it increase its transaction speed and throughput. However, it has already been successfully implemented in other networks including Cardano, NEAR, Polkadot, and more.
Blockchain networks remain secure because both their data history and transactions are maintained by nodes. The more nodes in the system, the more decentralized and trustless it is. But with more users on a network and with the blockchain’s history constantly growing, the burden on its nodes is constantly increasing. Since every node stores an entire copy of the blockchain, there’s an increased strain on each node with each transaction processed on the chain.
Simply not all nodes are capable of bearing that computing and financial burden, and as a result, fewer users are willing to run validator nodes.
As a result, there are now a few methods that help blockchains grow while performing effectively. More specifically, they are referred to as scaling solutions. While there are plenty of scaling solutions today, one of the most promising for major chains is sharding. To explain, sharding allows proof-of-stake networks to process many more transactions much faster than ever before. It’s also one of the scaling solutions on the cards for the second most popular network, Ethereum.
But before we dive into the details, what is sharding exactly?
What is Sharding?
Put simply, sharding allows a single blockchain to split itself into several smaller and more manageable blockchains called shard chains, also known as data layers. You can think of a shard as a subset of the data and transactions from the original network. When all shards are put together, they form the entire database. However, instead of every node on the network maintaining the blockchain’s full transaction history, each node is assigned to just a few of these smaller shards.
This greatly reduces the data burden on each individual node, increasing the transaction speed. Plus, it allows the network to process multiple streams of transactions in parallel—greatly improving its scalability.
How Does Sharding Work?
The process of partitioning a huge and decentralized blockchain network is actually pretty complex. Of course, it’s not just about splitting these chains up, they must also have the ability to communicate with each other to make sure the network still operates as one.
Firstly, you already know that the network is split into several shard chains, also known as data layers. These layers work independently, and they each have their own group of nodes. These participants—often called a committee—validate and process transactions for their specific shard. Essentially, when you initiate a transaction using a shard chain, it will first go to that shard’s designated validators.
But that’s not the end of the story. Because although these separate shards work independently, they can also communicate with each other. This involves a specific layer that can verify each of the shard chain’s work and allow them to communicate with each other. This is known as the coordination layer.
To explain, a block is only broadcasted to the coordination layer once it’s validated by a shard chain’s nodes. At this point the coordination layer will check each block is valid. If it is, it will add the block to its records, and if it isn’t it will reject it. This helps the shard chains remain consistent with each other—essentially guaranteeing the security of the system. It also enables cross-shard communication, as this layer makes sure every shard is capable of reading the others’ data.
Benefits of Sharding
There are lots of benefits of sharding, however, the main two are increased TPS and transaction speed.
Since the network is divided into many shard chains and each shard chain has its own validators, the wider network can process a lot more transactions at the same time. This is a game-changer for extremely large and busy networks.
For example, Ethereum can process just 15-30 Transactions per second (TPS). Imagine how useful it could be if it could process 100 transactions per second. To put it into perspective, Visa processes roughly 1000-4000 transactions per second. Thus, blockchains still have a long way to go.
Increased Transaction Speed
Splitting the network into shards also means each shard is less burdened by the queue of transactions. Since each shard chain only receives a portion of the network’s blocks, nodes do not have to store as much data and there are fewer transactions in the queue. This means that validators can process your transactions much quicker than on traditional chains.
Risks of Sharding
So now you know that sharding enables scaling, which is important for any large blockchain. But like any new technology, it comes with its challenges. Let’s explore some of the drawbacks of sharding a blockchain network:
Since blockchain nodes are split between different chains, it leaves fewer nodes securing each shard. This makes it less decentralized and possibly opens up the door to validator centralization issues such as collusion or a 51% takeover. In short, sharding smaller networks could result in hackers targeting validators. The smaller the number of validators there are, the easier it is for bad actors to attack the system. However, sharding a busy enough network shouldn’t be an issue, as even in one shard, there should be enough validators to remain decentralized.
With sharding, there is also a data inconsistency risk. Since each shard chain is independent, there’s a possibility of one shard recording different data to another. In this case, the state of the network becomes inconsistent if there are discrepancies between shard chains. In use cases such as decentralized finance, data inconsistency is a huge issue since that could lead to loss of user funds.
Further, coordination and communication between different shard chains and the coordination layer is also an important aspect of a network’s functioning. Due to the added complexity introduced by shards, there is a higher chance of a system crash if any single component malfunctions.
Sharding on Ethereum
So now you know all about sharding, but did you know that Ethereum plans to implement this scalability solution? Well, it is! The aim is to improve the network’s ability to handle more transactions at once and at a faster speed.
But why does it even need sharding in the first place?
Ethereum’s Scalability Issue
Like all proof-of-stake networks, Ethereum uses validators to propose and process blocks in a queue. However, the more active users on the network, the longer the queue is. This significantly slows down transactions. Unfortunately, this counteracts its plan for crypto mass adoption.
Simply put, the Ethereum network architecture is incapable of scaling past a certain volume of transactions while maintaining its user experience. This is one of the main reasons for Its previous transition to a Proof of Stake consensus and why it’s now considering scaling solutions like sharding.
Ethereum’s Sharding Plans and the Surge
Ethereum plans to introduce this mechanism during the “Surge”, a network upgrade outlined in Vitalik Buterin’s blog. Once it undergoes this process, the beacon chain will take the role of the coordination layer, with 64 other shard chains working alongside it.
Plus, there are also plans to mitigate both the centralization and data inconsistency risks associated with its implementation. To avoid the former, Ethereum will use random sampling. This means validators are assigned shards randomly. Plus, they will also be constantly reassigned. This safeguards against hackers gaining control over a majority of the nodes in the same shard.
Then to address data inconsistencies, Ethereum plans to use methods such as transaction ordering and fraud proofs. These will essentially ensure that data is both consistent and protected against dishonest activity.
However, it’s important to note that during this upgrade phase, it’s not just sharding that will come into play. There are also plans to implement rollups to improve the network’s scalability. At the end of this upcoming phase, Ethereum aims to achieve a throughput of 100,000 transactions per second—a good deal more than it’s capable of today.
Sharding, Layer Twos, Rollups: What’s The Difference?
Alongside sharding, blockchain rollups also offer similar benefits. Rollups are generally referred to as layer two solutions, and they have the same aims but via a different method. In short, rollups involve a separate chain that processes many transactions together and then relays them back to the original chain. This saves the main chain from processing data-heavy transactions, improving congestion. They come in a few different types, but essentially all types of rollups reduce the data burden on nodes.
Sharding differs as it literally partitions the whole network into parts within the same chain and then processes transactions in parallel. This means that it focuses mainly on handling a large number of transactions at the same time, thereby improving transaction speed. Rollups focus more on reducing the amount of data per block by processing this heavy data away from the original chain.
While it’s still too early to tell which solution is best—or if a combination of them is more feasible—it’s clear that scalability is one of the most important challenges today’s blockchains face. If this technology is to achieve mass adoption, it must be able to technically support the activity. As such, scaling solutions will continue to develop. Watch this space!
Sharding: Just one of many scaling solutions.
While we are yet to see the effects of sharding on a major blockchain, it’s clearly an interesting solution for scaling large blockchains. To handle spikes in usage on networks as they become more popular, scaling is a necessity.
So, what are you waiting for? Sharding is just one example of the many developments aiming to provide a solution. And who knows what is to come? Perhaps the best scaling solution is just around the corner.
Want to get involved yourself? Start exploring sharded networks such as NEAR and Polkadot. With Ledger Live, all of these networks (and more) are just a few clicks away. Whether you want to save, stake, or even trade crypto, Ledger Live has an option for you. So what are you waiting for? Access the world of digital assets with Ledger Live, from within the security of your Ledger device.
With Ledger, you’re in control.