What Is Sharding?
Sharding is a database partitioning technique that is used by blockchain companies with the purpose of scalability, enabling them to process more transactions per second. Sharding splits a blockchain company's entire network into smaller partitions, known as "shards." Each shard is comprised of its own data, making it distinctive and independent when compared to other shards.
- Sharding is a technique in blockchain that seeks to achieve scalability within a blockchain network.
- The process of sharding seeks to split a blockchain network into separate shards, that contain their own data, separate from other shards.
- The outcome of sharding is that transactional information is processed and stored in the nodes of only one shard, rather than having the information having to go through all the nodes in a network.
- The more users that blockchain networks take on the slower the network becomes, leading to significant latency. Sharding is a way to solve this problem by breaking apart the network.
- The main security concern with sharding is a shard takeover, where one shard attacks another, resulting in a loss of information.
- The validity of sharding is primarily being tested by the blockchain company Ethereum.
Cryptocurrencies are becoming more popular with their use being seen increasingly in areas such as supply chain management and various financial transactions. The distributed ledger of blockchain technology makes it attractive to many types of firms.
However, the problem with blockchain is that the more computers that are added to the network, the slower the process becomes. This is a hurdle to blockchain being adopted far and wide, particularly when compared to current electronic payment systems that work quickly and are more prevalent in society.
This scalability issue of blockchain is where sharding comes in. Sharding looks to spread out the workload of a network into single nodes, whereby each node is responsible for the data within it, removing the need for all nodes in a network to be part of a transaction.
Currently, each node on a blockchain network stores all states. This means that each node is responsible for storing critical information, such as account balances and transaction history. While it ensures a blockchain’s security, storing all states in all nodes considerably slows transaction processing. Slow speeds for processing transactions do not bode well for a future in which blockchain becomes responsible for millions of transactions.
There are three main traits that blockchain networks seek to employ: decentralized, scalable, and secure. No blockchain company has been able to achieve all three at once. Sharding, primarily implemented and tested by blockchain company, Ethereum, seeks to solve the issue, making all three traits possible at once.
How Sharding Is Accomplished
Sharding refers to the horizontal partitioning of databases through division into rows. Shards, as the rows are called, are conceptualized based on characteristics. For example, one shard might be responsible for storing the state and transaction history for a specific type of address. Or it might be possible to divide shards based on the type of digital asset stored in them.
Transactions involving that digital asset might be made possible through a combination of shards. As an example, consider a rental real estate transaction in which multiple shards are involved. These shards correspond to different entities involved in the transaction, from customer name to digital keys configured into a smart lock that is made available to the renter upon rent payment.
Each shard is still able to be shared amongst other shards. This characteristic keeps one of the most important parts of blockchain intact, a decentralized ledger that is accessible to every user and allows every user to see all the ledger transactions.
Sharding and Security
Ethereum, one of the most prominent blockchain companies, is on the front line of testing sharding as a possible solution to latency and scalability issues. One of the main issues in the practice that has arisen is security.
Though each shard is separate and only processes its own data, there is a security concern regarding the corruption of the shards, where one shard takes over another shard, resulting in a loss of information.
Ethereum has combated this by randomly assigning nodes to certain shards and constantly reassigning them at random intervals. This makes it difficult for hackers to know when and where to corrupt a shard.