Original title: "science popularization | what is Sharding?"
EthHub translation: Unitimes_David
The profile
There is a triad in the blockchain system that can be visualized in the form of a triangle (known as the DCS triangle), and what it conveys is"decentralized,consistencyAs well asscalabilityIt is impossible to do all three at the same time. The designer must make a tradeoff (you can choose any of the two rather than all of them). " (the author notes that DCS triangle is often referred to as block chain in ChinaImpossible triangle). See below:

Sharding is an attempt to address this challenge.Sharding is the division of bulky blockchains (databases) into lighter, faster blockchains.So how do we do that? To solve the scalability problem, we split the state data and historical data stored on the main chain into shards (shards). Each shard manages itself, has its own transaction history, and the impact of transactions on a shard is limited to that shard.
An example of the above statement is this: a dApp (decentralized application) has a full shard of its own, so all transactions associated with it will be on this shard only. Several dapps related to a particular domain will be on the same single shard.
The latter phase of ETH2.0 considers the possibility of cross-sharding communication.
Sharding also introduces different types of nodes, such as "light nodes", "super full nodes", etc., depending on how much data is downloaded and validated.
The triad of extensibility
The extensibility triad claims that blockchain systems can only satisfy at most two of the following three properties:
decentralized(defined as the system can be run with only O(c) resources (i.e., ordinary laptop or small VPS) available to each participant)
scalability(defined as being able to handle a large number of transactions)
security(defined as the network's ability to remain secure against attackers with up to O(n) resources)
The key challenge for scalability is to find a way to implement all three features at the bottom of the blockchain -- sharding is an attempt to solve this problem.
What is sharding?
Currently, in all blockchain protocols, each node stores the entire state (including account balances, contract codes, storage, and so on) and processes all transactions. This design provides a high degree of security but greatly limits scalability: a blockchain network cannot handle more transactions than a single node. Largely because of this, bitcoin is limited to about 3-7 transactions per second, ethereum is limited to about 7-15 transactions per second, and so on.
However, this raises the question of whether it is possible to create a new mechanism in which only a small number of nodes validate each transaction. As long as there is enough of the node to validate every transaction, so the system is still a high security, but only a small part of the collection of all the validation, system can parallel processing a large number of transactions, whether we can pass the transaction processing group assigned to the various small nodes to greatly increase the overall throughput of block chain?
What is the basic idea behind sharding?
We split ethereum's status and history data into what we call "sharding." For example, a sharding scheme on ethereum might put all addresses starting at 0x00 on one shred, all addresses starting at 0x01 on another shred, and so on. In the simplest form of sharding, each shard has its own trading history, and the effect of trading on a shard is limited to the shard state of the same shard.
A simple example is a multi-asset blockchain, in which there are many shards, each of which holds surpluses and handles transactions related to a particular asset, such as an ERC20 token. In the more advanced sharding form, there is some form of cross-sharding communication capability, where transactions on one shard can trigger events on other shards.
What does the basic design of a blockchain with sharding look like?
There is a set of validators (that is, PoS nodes) that are randomly assigned to create a shard block. In each slot (an 8-second time slot), a verifier is randomly selected for each of the [0...999] shards and the selected verifier is given the right to create a block on the shard that may contain as much as 32kb of data. In addition, for each shard, the system selects a set of verifiers of size 100 (also known as "committees") as certifiers (attestors). The block header of a block, together with at least 67 proof signatures, can be packaged as an object on the "main chain" (also known as the beacon chain).
Note that several "levels" of nodes can currently exist in such a system:
Super full nodeDownload all data on the beacon chain and each shard block referenced on the beacon chain.
The top node-- only the beacon chain block is processed, including the block header and signature of the sharding block, but not all data of the sharding block is downloaded.
Single sharding node-- ACTS as a top-level node, but simultaneously downloads and validates each check block (collation) of a particular shard that it CARES more about. (note: the block on the shard is called a collation, and the verifier is called a collator.)
Light node-- download and verify only the block header of the beacon chain; No check size or transaction is processed unless it needs to read a specific entry in the state of a particular shard, in which case the light node will download the merker-branch of the nearest check size of that shard and download the merker-proof in the desired state from there.
Information Resources
Sharding FAQ
Sharding Roadmap
DCS Triangle
Source:https://www.unitimes.pro/p/83442f806ea64861a45c7d72c808fe44
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia