Blockchain Sharding

Blockchain technology has fundamentally changed how we value and think about money since the invention of Bitcoin. Blockchain has emerged as one of the fascinating technological developments of the 21st century and a highly valued infrastructure, capturing the attention of many and generating significant interest in various industries.

This feeling is primarily motivated by the innate desire to create and participate in a revolution on the scale of the Internet’s inception in the 1980s and 1990s. While the Internet kickstarted the realm of online communication, Blockchain is a pioneer in new forms of wealth creation through data networks and digital assets.

To provide registry services and smart contracts to applications, also known as decentralized applications, these networks are their own strict decentralized technical ecosystem. And also, to facilitate the development of these apps and ultimately give users more control over their finances and data online, Ethereum, the second most valuable cryptocurrency, was created.

The worst nightmare for any distributed ledger is the lack of scalability. Many decentralized networks aim to present a single answer to a delicate problem. Sharding is an innovative idea that might finally solve the scalability issue while preserving the decentralized nature of Blockchains. 

This article will explain Blockchain sharding, how it works, its importance, uses and examples for readers to have an in-depth knowledge of the subject.

What is a Blockchain Sharding?

Sharding is the method of partitioning databases utilized by Blockchain organizations to increase scalability and enable such organizations to carry out a large number of transactions in seconds.

It is simply the process of separating or splitting a whole network of a Blockchain organization into smaller components known as “shards“. Each of these shards is unique and independent of the other because it contains unique data.

How does Blockchain sharding work

Using the Ethereum network as an example, a full node stores the Blockchain’s state, including account balances, storage, and contract code.

Unfortunately, consensus only grows linearly as the network grows exponentially. This restriction results from the interaction between the nodes required to reach a consensus.

Each network node stores and processes every transaction without any additional privileges. As a result, when the network is overloaded, the size of Ethereum, problems like high gas costs and extended transaction confirmation times manifest as noticeable issues. It is not as fast as the sum of its parts but only as fast as the individual nodes.

Sharding offers an intriguing but challenging solution that helps to solve these issues. The idea is to divide different nodes into shards, each of which processes transactions unique to that shard. It enables the system to process numerous transactions concurrently, significantly enhancing performance.

Imagine how the United States would be divided into states to make the statement more understandable.

Despite being a part of the larger United States (the Ethereum network), each state (or shard in this case) has its laws, restrictions, and distinct population subsets. But as part of the more extensive network that comprises the nation, they are united by a common language and culture.

Consider a division of Ethereum into thousands of islands. Every island can pursue its own goals. Each island has unique features, and all accounts associated with that island are free to use all of its features and interact with one another. They must follow protocol if they want to communicate with other islands.

As can be seen, segmenting the network into more effective parts enables the network to operate as a whole than being constrained by the speed of each node.

Why is Blockchain Sharding important

Since Ethereum developers are implementing what is known as “state sharding“, we will make use of it as an example in this discussion because it is the most well-known and challenging sharding attempt in the Blockchain space.

The “global state” of the Ethereum Blockchain, which is what everyone can see when looking at the Blockchain in a particular instance, is the current state of the Blockchain.

The challenging aspect of implementing sharding on Ethereum is that by splitting up nodes into smaller groups, these groups must be able to process particular sets of transactions, update the network’s state, and ensure that these transactions are valid.

Sharding on Ethereum is planned to launch in two phases, probably following the launch of Proof-of-Stake. The data layer, which will include a consensus on what data is in the shards, will be phase one. The state layer is the second phase. Below is a general explanation of how it can function because it is very simple.

The network is split up into different shards by Ethereum. By combining particular accounts (including smart contracts) into shards, a specific group of transactions is assigned to each shard. The following are the contents of each transaction group’s header and body;

  • The fragment ID of the transaction group;
  • Assignment of validators via random sampling (verify transactions in the snippet)  
  • All transactions are a part of the particular shard’s group of transactions;

Each shard’s specific transactions occur between accounts native to that shard.

The network’s state changes, and account balances, storage, and other information are updated when transactions are verified. The default root of the transaction group must coincide with the root of the shard in the global state for it to be verified as valid. The transaction group is verified if they do, and the specific fragment ID state root updates the global state.

On the Ethereum Blockchain, each block includes the transaction group’s root and the state’s root instead of the state’s. The transaction group root is the Merkle root of all transaction groups of the particular shards for that transaction block.

In essence, the updated and verified transaction groups are contained in a Merkle root of all the various shards. This root and the updated state root are both kept on the Blockchain.

This framework must incorporate Merkle tree concepts to guarantee the Blockchain’s validity. You can comprehend these ideas much more quickly and easily if you comprehend how a Merkle tree and, more specifically, a Merkle root operate.

Merkle Tree used in Blockchain Sharding
Merkle tree: Wikipedia credits

A proof-of-stake consensus is reached within a shard by randomly chosen nodes applying to the shard for a particular consensus round.

This not only offers finality to consensus, which is required within shards but also offers a specific defence against an attack that, in this scenario, a Proof-of-Work Blockchain would be vulnerable.

In a PoW sharded network, the amount of hash power needed to attack a particular shard is drastically reduced, making it possible for a malicious actor to take control of a shard using computational power.

One of the trickiest and most crucial aspects of sharding architecture, the communication protocol, could then be used by the malicious party to attack other shards.

This attack is prevented by randomly choosing samples from validators within a shard because a malicious actor won’t know which shard they’re landing on before doing so.

Additionally, from that random validation set, the validators who are validating will be chosen by random sampling.

The fragmentation architecture must function properly in the system for the communication protocol to be effective. The protocol for communication can be compared to the common language used by all the states that make up the larger United States.

It isn’t easy to design this protocol, though, and it must be done so that it is used only when necessary. It becomes necessary when a particular node needs information that isn’t kept in its shard and has to locate the shard that contains the needed data. Inter-fragment communication is the term used to describe this exchange.

Transaction receipts are used to implement inter-shard communication. A Merkle root, which is easily verifiable but is not a part of the state root, is where a transaction’s receipt is kept.

By checking the Merkle root, the shard receiving a transaction from another shard ensures that the receipt has not already been spent. The receipts are essentially kept in a shared memory that can be checked, but not changed, by other shards. Thus, the shards can communicate with one another through a distributed storage of receipts.

What is Blockchain Sharding used for

The primary purpose of sharding for a Blockchain is to increase scalability. Because transactions can be processed and validated more quickly, less time is needed. Because of this, the network will be able to handle more transactions per second.

Implementing sharding also lessens the possibility of network centralization. Currently, to support all the information processed in these networks, the Blockchains of Bitcoin and Ethereum require the use of equipment with high computing power. Equipment with high acquisition costs may only be affordable to a few users.

Due to the implementation of sharding, it won’t be necessary to store the entire Blockchain in a single node, negating the need to buy expensive hardware. This would ensure that the latter is decentralized by allowing many more people to use their conventional equipment to participate in the network.

Examples of Blockchain Sharding

  1. Polkadot Parachain
    Polkadot Parachain is one exciting entry among Sharding Blockchain projects. It is a practical approach to transmitted database sharding. And it provides a more specific point of view on the Blockchain. The parachain relates to a simplified version of Blockchain, which affiliates with the security provided by a relay chain. One of the significant characteristics of parachain refers to the independent nature of the computations. Turing-complete intelligent contracts’ generalized systems may have trouble spotting conflicts between transactions. Conversely, the formulation of defined limits between parachains might assist in successfully implementing them without struggles. Additionally, Polkadot’s Blockchain sharding with highly specialized parachains may aid in achieving an important goal. For instance, parachains can help resolve transaction activities and data storage effectively for a specific issue.
  2. Near Blockchain
    Near Blockchain is a perfect example of understanding what Blockchain sharding is. In addition to keeping the load on clients low, it concentrated on building the framework for real-time cross-shard transactions. Any low-end device can run a node and participate in the network thanks to the Blockchain. Therefore, a portion of the transactions can also be processed by the low-end device. The sharded Proof of Stake Blockchain features higher scalability and enables nodes to operate on low-end devices. As a result, sharding the network can make it accessible to numerous additional devices, enhancing the Blockchain’s speed. In addition to the advantages of sharding, NEAR Blockchain must deal with the problems of data validity and accessibility. Blocks must include valid proof that anyone can check to confirm the block’s integrity. The network’s validators assume responsibility for guaranteeing the proof’s accessibility. On the other hand, it is challenging to demonstrate a message delivery failure without an on-chain transfer of the message. To solve such issues, you can also research alternatives like centralized infrastructure and governance.
Near homepage
Near homepage
  1. Ethereum Beacon Chain

The uncertainties concerning “is sharding useful for Blockchain?” can find an appropriate response in the Beacon Chain of Ethereum. It’s interesting to note that the Beacon Chain is a key highlight of the Ethereum 2.0 roadmap.

The Casper Proof of Stake system of Ethereum’s newly developing Beacon network uses the Beacon Chain as its “master chain.” The Beacon Chain has been designed specifically for challenging tasks like processing crosslinks and keeping track of the active, queued, and inactive validators. Along with the finality device, it aids in processing Ethereum’s block-by-block consensus.

The Beacon Chain manages the other shard chains and the Proof of Stake protocol. The following are a few of the Beacon Chain’s noteworthy uses:

  • Application of consensus-based guidelines
  • Grouping of validators into various committees to vote on the suggested blocks
  • Allocating rewards and penalties to validators
  • Selection of the appropriate block proposer for each shard
  • Facilitates transactions between shards and acts as the anchor point where shards register their states.


Sharding provides some promising solutions to the scalability problem currently facing Blockchain platforms.

While the testing phase of Bitcoin’s lightning network has yielded very encouraging results, the Ethereum solution poses some unique difficulties because it is regarded as a Turing complete world computer.

Sharding will only function directly at the protocol level, so it may not be necessary for the end user or dapp developer to be aware of it.

Regardless, Ethereum’s attempt to split the state of a sizable, decentralized network is impressive and, if successful, will be quite a feat.

See you soon,

Scaling Parrots

Condividi questo articolo