Sharding is a scaling approach that enables splitting of blockchain states into partitions containing states and transaction history, so that each shard can be processed in parallel.

What Is Sharding?

Sharding is a technique to partition databases that can be used to scale blockchains. It allows blockchains to process more transactions per second, also known as higher throughput. Sharding splits the blockchain network into smaller partitions. These so-called shards only process a part of the data of the entire blockchain, which makes them independent from other shards and relieves them of unnecessary computing. 

Thanks to sharding, a network can compute more transactions and thus scale faster to transaction speeds known from centralized ledgers. On the other hand, critics point out that shards are liable to attacks and reduce network security. 

How Does Sharding Work?

Blockchain networks are made up of nodes that validate the transactions in a network. Nodes are independent of one another and store the historical data of a blockchain. All full nodes store the entire history of a blockchain, which increases a blockchain's security and decentralization but slows down its transaction speed. 

Sharding partitions the workload of nodes across different shards. In essence, not every node has to validate each transaction, which unnecessarily strains nodes and slows down the network. Instead, the work is compartmentalized across different shards. The blockchain databases are partitioned horizontally, meaning the different shards are split according to their characteristic. For instance, shards can be responsible for storing transactions of a specific type, while other shards can be divided based on the type of crypto asset they store. 

The result is that not each node confirms each transaction. This drastically reduces a blockchain's workload and increases its speed. 

How Secure Is Sharding?

Sharding has been criticized for potentially decreasing a blockchain's decentralization and security. Shards could be corrupted, with one shard taking over another shard, which could lead to a loss of information or data. For example, a hacking attack may take over a shard and introduce false transactions, which leads to confusion among other shards over the validity of the data. 

How Does Ethereum Use Sharding?

Ethereum plans to use sharding as part of its scaling approach to increase the blockchain's throughput. The network will introduce 64 new sharded chains in the future, which will have distinct responsibilities and will greatly reduce the workload of Ethereum's mainnet, called the Beacon Chain. This process will happen as part of Ethereum's scaling that sees the switch to proof-of-stake as a consensus mechanism. This switch is dubbed the Merge. Sharding will be one of the next steps for Ethereum in its scaling roadmap.