What is Sharding?-banner-imageAcademy

What is Sharding?

In general, sharding can be defined as a type of database partitioning that divides large databases into smaller, faster and easier to manage parts. Interest in the crypto money industry and blockchain technology is increasing day by day. Accordingly, the transaction volume and the workload processed by the network increase. Let's consider a blockchain as a shared database. More and more data is added day by day, requiring the network to find new ways to process all this data efficiently and quickly. At this point, sharding emerges as a method that offers a solution.

Fragmentation breaks up a blockchain company's entire network into smaller segments known as "shards". Each piece consists of its own data and makes it different and independent compared to other pieces.

Why is Sharding Important?

  • The more users that blockchain networks take on, the slower the network becomes, leading to significant latency.

  • Sharding can improve network latency by splitting a blockchain network into separate shards—each with its own data, separate from other shards.

  • One of the solutions considered to create scalability is sharding.

How Is Sharding Made?

  • Blockchain Validators

Validators in a blockchain are independent and responsible for protecting and storing all data in a decentralized network. In other words, every validator must store critical information such as account balances and transaction history. This operating model ensures the security of a blockchain by storing every transaction in all validators, while significantly slowing down the processing of transactions. This causes low speed when processing transactions and creates a negative situation considering that blockchains are responsible for millions of transactions.

Sharding is the solution here as it divides and distributes the transactional workload in a blockchain network. Thus, since there is a division of labor, each validator does not have to store and process the entire workload of the blockchain.

  • Horizontal Partitioning

Sharding can be accomplished by horizontally partitioning databases into rows. A shard is responsible for storing a particular state or transaction history. It can also repartition the digital information or assets stored in Sharding with a new shard combination according to its type.

For example, consider the state with a high information and storage load. Let's imagine that a state has a database of 100,000 personal records. Finding information for a person requires calculating about 100,000 transactions; this is a costly and time consuming workload. The management of this state of the people living here; It has to store all data such as place of residence, home and work address, date of birth, health information, sector, number of children, marital status, monthly economic income in a system. This huge amount of data has grown over the years and will slow down as the population grows and immigration takes over. So what happens if we split this large database into smaller databases? It will become more efficient if all data can be managed by dividing it into smaller and specific pieces. The sharding, which comes into play at this point, divides the information into small shards in the database and organizes it independently and openly with sub-lists. This allows it to work quickly and scalably, no matter how much data is loaded into the management system. Thanks to sharding, all blockchain nodes do not need to run linearly to validate all data added to the chain. It is sufficient to work horizontally. Each verifier will manage, store and process its own shard.

  • Shard Sharing

Each shard can be shared among other shards protecting a significant part of blockchain technology (Ex: decentralized ledger). In other words, the ledger can be accessed and shared by any user allowing them to view all ledger transactions.

  • Sharding and Security

One of the main issues that arise in practice with Sharding is security. Security is one of the 3 key elements for every blockchain network. Although each shard is separate and only processes its own data, the concern here is; It is a security concern related to the system corruption of parts, when one part takes over another part and causes information or data loss.

Any shard can be hijacked by a hacker or a cyber attack. The attacker can then infiltrate the network with incorrect operations or a malicious program.

For example; Ethereum is at the forefront of testing sharding as a possible solution to latency and scalability issues. Ethereum plans to split into 64 new shard chains after "The Merge", where Ethereum Mainnet will merge with the Beacon Chain Proof of Stake system. Ethereum will randomly assign its validators to certain shards and reassign them at random intervals, minimizing the potential for a shard attack. Randomness is the most important and security-enhancing point here. Because cyber attackers will not be able to know when and where any sharda (part) will leak, thanks to randomness, and the security breach problem will be minimized.

What is the Role and Importance of Sharding in Ethereum?

Sharding is considered the future of Ethereum scalability. It is seen as a key that will allow many people around the world to use the platform cost-effectively and on a regular basis, as well as helping the ecosystem support thousands of transactions per second.

In the context of Ethereum, Sharding operates synergistically with the layer 2 system, dividing the overhead of processing the large amount of data needed over the entire network. This will continue to reduce network congestion and increase transactions per second. In addition, a high level of security will be provided with random validator assignments.

  • Sharding is a multi-stage upgrade to improve the scalability and capacity of Ethereum.

  • Sharding ensures that data storage requirements are securely distributed, making aggregations even cheaper and making nodes easier to operate.

  • It enables layer 2 solutions to offer low transaction fees while leveraging the security of Ethereum.

  • This upgrade is planned to follow The Merge of Mainnet with the Beacon Chain.