Sharding basics explained

Kate Kharitonova
MyNearWallet Blog
Published in
3 min readSep 14, 2022
An explainer for beginners by the MNW team

On September 12 Near protocol and its contributor Pagoda kicked off a key phase of the “sharding” upgrade described in a program called “Nightshade”, crucial for blockchain development. The changes in sharding processes will make Near’s processing speed faster, transaction fees lower and the blockchain more scalable.

Find out why “sharding” is that important and how it works with the MNW team!

What does “sharding” mean?

Initially, “sharding” is a method of dividing and keeping data in different databases. A common example of sharding in business is dividing users’ data among servers based on the country they live in. Then a group of servers in each country would be called a “shard”. It’s no different in blockchain where servers have to keep, validate and process the transaction data.

Ex. sharding in databases

How does blockchain sharding work?

The blockchains that use sharding are spliced into different chains, called “shards” or “chunks”. A group of nods is attached to a concrete shard, so each server could process and keep transactions only in its own shard. Chunks can connect to each other via special bridges. To prove ongoing operations, a block from one chain is synced to a block from another chain.

Cross-shard operations might require special bridges

There are also “private shards” to keep some data off-chain if you’re not comfortable with blockchain transparency.

Why do blockchains need sharding?

Without sharding, each server has to keep and process all the transactions in the chain. That is a really long process, for example, Ethereum processes 10–13 transactions per second while Visa can do up to 24000!

The more users join the chain, the more transactions its servers have to process, and the more data to keep. So, finally, only really powerful nods can stay in the chain, which results in an entrance barrier for nod owners. Moreover, the more nods are added to keep the data, the longer the chain is, and the slower transactions are.

That’s called a scalability problem and sharding might help to solve it.

What are the sharding benefits for the blockchain?

  • Transactions are much faster as nods have to process fewer transactions. The more shards are there, the more transactions can be processed. NEAR’s Nightshade is theoretically limitless (by increasing the number of shards) and can handle millions of transactions per second.
  • Less powerful servers can join the network as there is no need to process and keep large amounts of data. NEAR Chunk-Only Producers can run the validator node on a 4-Core CPU, with 8GB of RAM, and 200 GB SSD of storage.
  • Transactions are cheaper as it’s easier to find a place for your transaction. NEAR’s gas fees are approximately another 10x lower than Ethereum’s.
  • Finally, a blockchain is more scalable!

“Near’s vision is that you should not have limited throughput. You should be able to continue expanding demand by adding more capacity,” said Ilia Polosukhin, the NEAR founder at the NEARCON2022.

The future of NEAR sharding

Near’s sharding plan will be done through a four-step program called “Nightshade”. The changes will lower the entry barrier for Near validators and increase decentralization. The second step launched now, Phase 1, includes:

  • Introduction of “Chunk-only validators” that feed into the sharding mechanism but are easier to set up than full nodes.
  • Up to 200 validators to join the 100-strong network.
  • An 86% decrease in the collateral requirements for all participants of the proof-of-stake chain.

The upcoming upgrade phases will be completed in 2023.

--

--