NEAR’s sharding principle

Sharding is one of the main ideas for the expansion of the layer1 blockchain project. Ethereum 2.0, Solana, Cosmos, Polkadot, and NEAR are networks based on the sharding system. In this article, we organize the sharding principles of the NEAR network as follows, hope You can use the simplest information to understand NEAR’s shards.

Key elements:

Sharding: NEAR scales horizontally and almost infinitely by distributing calculations across multiple parallelized shards.

Consensus: NEAR uses the Nightshade algorithm to reach a consensus on the network operation nodes that constitute the shards.

Cross-shard communication

Sharding in a chain will definitely face cross-chain and cross-shard communication, which is a key step in the formation of the final state.

NEAR uses a beacon chain with rollback to complete the state finality across shards: the beacon chain uses a small number of validators to verify the state transitions of all other chains, and if a problem is detected, all chains will roll back.

In addition, the validators for each shard can be rotated every day to help add a layer of security.

In contrast, other protocols use a smaller committee, which rotates faster (for example, every few minutes) and validates across shards. In order for this smaller committee to perform their verification without having to download the entire state of each shard (which cannot be completed within this time frame), they can download only the relevant part of the state.

This is NEAR’s Nightshade fragmentation method.

Nightshade modifies the typical abstraction model of sharding, assuming that all shards are combined to produce a single block. Regardless of whether each individual shard generates a “block” at each block height, the blocks of that block height are generated at a regular rhythm.

At this point, a validator is allocated to generate each sharded block. The verifier must assemble the blocks of each slice into the blocks of the total period within a fixed period of time. This validator is rotated among the existing validator set (for example, 100 validators). This verification does not accept transaction processing, only blocks.

For each individual sharding and block generation period, a validator is allocated to generate its block. If the validator does not exist, the sharding will stop during this time period. Each shard has its own smaller pool of validators, which are drawn from the main pool. The shard verifier and the whole block verifier rotate in the same way. If a single validator is missing and the shard block is stopped for a period of time, the next validator may appear to continue the operation of the chain in the next time period.

Hide validator

To provide additional security, NEAR also uses a hidden validator. These come from a small committee of each shard (100 validators on average), and they validate each block. The verifier selects a set of shard ids through a verifiable random function (VRF) to calculate their allocation separately, and this allocation is not publicly visible to all participants on the blockchain. In this way, each individual verifier knows which shards they must verify. But it is not publicly visible.

In addition, the number of hidden validators assigned to a particular block is also randomly determined. This prevents the adversary from knowing exactly how many hidden validators need to be broken to successfully launch an attack.

Fisherman

In addition to the hidden validator assigned to provide security for each shard, any other node operator can participate as a so-called “fisherman” without permission. This third-party node can provide the same proof as the hidden validator, so they can also initiate the process of reduction and rollback.

This means that even if the opponent successfully destroys the entire hidden pool of validators, there is no guarantee that they will not be discovered by the fisherman and continue to attack.

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/nears-sharding-principle/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2022-01-07 09:02
Next 2022-01-07 09:03

Related articles