Risk Warning: Beware of illegal fundraising in the name of 'virtual currency' and 'blockchain'. — Five departments including the Banking and Insurance Regulatory Commission
Information
Discover
Search
Login
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt
BTC
ETH
HTX
SOL
BNB
View Market
One article to understand the sharding public chain Harmony, Near, Elrond
巴韭特的晚餐
特邀专栏作者
2020-01-10 10:12
This article is about 7011 words, reading the full article takes about 11 minutes
Which one will be the dark horse of sharding in 2020 (there are easter eggs at the end of the article)

Everyone

ok i ' m barret

A leek that wants to be Buffett

The new Bakerte dinner is finally here again. During this period of time, I was researching sharding, read a lot of information, and finally finished this article.

The scalability or capacity expansion of the blockchain has always been the focus of the industry. Most public chains after Ethereum are committed to solving this problem, and thus ushered in the subsequent explosion of public chains.

For example, EOS uses decentralized DPoS to achieve faster consensus confirmation by changing the consensus mechanism, and IOTA uses DAG to achieve stronger scalability by changing the network structure. Of course, there are also two-layer solutions to achieve expansion through side chains or state channels , such as Celer.

In addition, sharding is also one of the very important expansion solutions. Many people may have heard about sharding. The earliest Zilliqa and later Quarkchain are well-known sharding public chains. Ethereum has also planned to use sharding in future versions. In the new generation of public chains, well-known foreign sharding Film projects Harmony, Near and Elrond are also noteworthy.

Among them, Harmony has landed on Binance and launched its main network. Elrond has also landed on Binance and launched Pre-Staking at the end of December 2018, entering the main network launch stage. Near has not yet logged on to any exchange. They plan to launch this year The main network will be launched in the first quarter.

secondary title

What exactly is sharding?


Before analyzing these three projects, it may be necessary to simply popularize what sharding is.

Fragmentation has long existed in the Internet field, and it is generally called database sharding. It refers to the allocation of data in a single database to other databases with the same table structure through a certain strategy, so that the amount of data in each database will be relatively reduced and can be deployed on different servers. Theoretically, the unlimited horizontal expansion of the database can be realized.

image description

Schematic diagram of Ethereum sharding scheme, image by Hsiao-Wei Wang

The goal of sharding is to be able to reduce computing and storage redundancy while reaching a consensus, and process transactions or transactions in a fast enough manner while ensuring sufficient security for the network.

secondary title

What types of shards are there?

In a sharded blockchain network, not all transactions need to be sharded. Generally speaking, there are three types of sharding, namely network sharding, transaction sharding, and state sharding.

Network sharding is to group the entire blockchain network, each group is called a shard, and all shards process different transactions at the same time to achieve parallel bookkeeping. Or call it physical sharding.

Transaction sharding is to randomly divide transactions into different shards or groups, and allow certain nodes to keep accounts. For example, it can be allocated through transaction Hash or address, or it can be allocated randomly through VRF.

State sharding is to store complete ledger information in each shard, and each shard maintains part of the ledger information. This may also involve issues such as cross-shard data synchronization and cross-shard transactions, which is the most complicated way of sharding.

The introduction of sharding is almost done, let’s talk about the sharding solutions of these three projects separately.

Part 

1Harmony

What is Harmony?

Harmony is a high-performance public chain project based on state sharding and PoS. Its sharding architecture consists of a beacon chain and multiple shard chains. The beacon chain provides decentralized random numbers, and the shard chain Header verification, accepting services such as the equity mortgage of the verification node.

In terms of consensus algorithm, Harmony uses FBFT to reach a consensus within each shard. FBFT is a deeply optimized consensus of PBFT. Through BLS multi-signature, the efficiency of traditional PBFT has been improved by an order of magnitude. In this way, fast Reach a consensus. Below is a schematic diagram of FBFT:

The current Harmony mainnet v0 version has 250 nodes in each shard, and the block generation time is within 8 seconds. The official said that after optimization, it is expected to reach within 5 seconds.

5 seconds real man? ? Well, that's a compliment

How does Harmony ensure the security of the sharding system?

In the fragmented public chain, it is possible to perform double spending with a 1% attack. Because after the network is fragmented, the computing power of the entire network and the number of pledged tokens are divided, and each fragment is only one-Nth of the network. If there are 100 fragments, without the design of a special security protocol, Using 1% of the computing power or equity of the entire network can control a shard, perform double spending, and even create new coins out of thin air.

Harmony adopts the effective mortgage mechanism of EPoS (Effective Proof-of-Stake) and the secure random sharding technology (Random Sharding), and relies on the provisions of the agreement to break up the tokens mortgaged by large households into many small parts and randomly distribute them to In multiple shards, so that no one can concentrate his mortgaged tokens in a single shard, so that he cannot attack a single shard.

The following is a schematic diagram of random distribution of rights and interests:

The red in the above picture is the attacker. His tokens are randomly assigned to multiple shards, so that he cannot gain the initiative in any shard.

EPoS not only effectively solves the problem of mortgage Stake centralization, but also supports mortgage compound interest and mortgage delegation. In Harmony's network, stakers are not rewarded according to the actual stake amount, but according to "effective stake".

Effective mortgage, in simple terms, is to take the median of the number of users mortgaged, and the number of all mortgaged tokens is within 15% of this median.

image description

*Effective mortgage diagram of 1600 nodes

The effective mortgage of EPoS is mainly to slow down the effect of "the rich get richer" and prevent the centralization of the PoS network. However, for this method, some large households may not be particularly happy, but I think it is a good solution. Of course, the beholder has a different opinion.

Harmony has launched its first phase of the main network "Day ONE" in July 2019 (this code name reminds me of the diary app Day One I often use haha), it has basic functions such as sharding and consensus, a total of 4 full state shards, a total of 600 nodes including 150 cornerstone nodes participate in the consensus at the same time.

How does Harmony prevent nodes from being bribed?

In addition to the 1% attack, there is another attack method is the bribery attack, that is, after the initial sharding is over, the attacker obtains most of the power in a single shard through bribery or bribery to carry out the attack.

In order to avoid bribery attacks, Harmony introduces a random resharding mechanism (Resharding) based on the Cuckoo Rule. The system will randomly scatter the rights of validators every other day and reshard them, making it difficult for attackers to lock the rewards to be bribed. target, cannot successfully attack a single shard.

Here, the random re-sharding mechanism needs to rely on a secure random number generator. Harmony adopts the original distributed random number generation (DRG, distributed randomness generation) protocol to generate safe and unpredictable random numbers, which is a special multi-party computing MPC method.

The DRG protocol allows each participating node to generate a local VRF (verifiable random function), and then these random numbers will be combined to generate a preimage number and placed in the next block, and then this preimage will be used Calculate the VDF (Verifiable Delay Function) to generate the final random number.

In DRG, VRF guarantees the randomness of the result, and VDF guarantees the non-disturbance of the result. Harmony has realized the function of VRF by using the BLS12-381 elliptic curve, and completed the first VDF verifiable delay function implemented in Go language (https://github.com/harmony-one/vdf)

The role of VDF can be simply understood as preventing the last node from quickly calculating a random number that is beneficial to itself to influence the final result after seeing the previous random number. Through VDF, the calculation and publication of the previous random numbers can be delayed, so that the last node cannot modify the result that is beneficial to itself at the end. For a more detailed introduction to VDF, you can view this article: "One article to understand the verifiable delay function VDF

How does Harmony optimize cross-chip communication?

The most important thing in state sharding is cross-shard communication. However, if a simple P2P broadcast protocol is used, the final system will generate a lot of message load, and such a system cannot support a large number of fragments.

Harmony adopts "Kademlia cross-chip routing technology" to control the network overhead of cross-chip communication, and uses "erasure code" to optimize the block broadcast process, so that the broadcaster's network pressure is less and the sender's network is avoided. Bottleneck problem, so as to achieve efficient horizontal sharding expansion.

What is erasure coding?

Because the erasure code will be mentioned below, here is a brief explanation. The erasure code (Erasure Code) is a common data redundancy technology in the storage field. It can divide data into fragments, expand redundant data blocks, Encoded and stored in different locations, when some data is lost, the original data can be restored through a reconstruction algorithm. The multi-copy strategy has a similar function, that is, the data is copied and stored in multiple copies so that it can be restored.

Part 2

Near Protocol

What is Near Protocol?

Near is a developer-friendly scalable public chain based on full state sharding. They proposed a new protocol and solution called Nightshade.

The difference between Near and other sharding public chains is that its technical architecture is not composed of a beacon chain and multiple sharding chains, but the system is modeled as a separate blockchain, which is implemented at the block level. With shards, there are many "segments" in each shard.

Specifically, Near divides the block into physical components, because each block contains these physical components, and after verification of multiple blocks, these blocks can be verified when the physical components are the same is correct. Each block logically contains all the transactions of all shards, and divides the state of the shards. The verifier is only responsible for verifying the corresponding state of the exchange for the shards.

When the mainnet of the project is launched, the plan is to have 8 shards, 24 blocks/block producers and 800 validators. This means that each block is divided into 8 parts, and then 800 validators are required to verify 24 blocks to confirm that each physical component block is correct, and the corresponding NEAR block interval will be lower.

What consensus mechanism does Near adopt?

Near adopts an original consensus mechanism called Doomslug, which allows a group of block producers to create blocks with only one round of communication, making each block irreversible. And it can still be done even if 50% of the block producers are offline.

At the same time, they also launched a Casper-like finality tool called Nightshade Finality Gadget (Nightshade Finality Gadget), which can ensure that blocks will be finalized without exceeding 1/3 of malicious attackers. OK, thereby enhancing network security.

How does Near guarantee the security of sharding?

In order not to expose the verifiers of a specific shard, Near randomly assigns verifiers through VRF, hiding the information of verifiers assigned to shards. In this way, the nodes only know the existence of validators, but they do not know which shard each validator corresponds to.

Also, these hidden validators sign blocks, not specific segments, which also hides exactly which shards the validators validated.

How does Near guarantee data availability?

Near also uses "erasure codes" to solve the problem of availability of fragmented data. Because of the existence of fragmentation, not all nodes have the state of all fragments. If some nodes do not have the state of certain fragments, it is difficult to Guaranteed availability of certain data.

Near's solution is that each node divides the blocks they make into many parts and sends them to different verifiers, so that they can reorganize the shard blocks made by this node only by relying on some of them, so that The availability of data can be guaranteed.

Part 3

Elrond

What is Elrond?

Elrond is a high-throughput public chain with adaptive state sharding. They proposed an improved proof-of-stake mechanism called the Security Proof-of-Stake (SPoS) consensus mechanism, which introduced a randomly selected consensus group, mortgage plus rating.

Similar to Harmony, Elrond also has a main chain, called the notarization (Meta) chain, which is responsible for all network and global data operations, such as nodes joining and leaving the network, validator list, node allocation, etc.

Oh, it turns out that Yuanlian is the big brother, and everyone listens to the big brother

secondary title

What is Elrond's consensus mechanism?

Elrond adopts the SPoS consensus mechanism, and they refer to Algorand's random selection mechanism and make improvements. Elrond achieves consensus by randomly selecting a consensus group and combining the dimensions of mortgage and rating. It is different from traditional PoS in that it adds the dimension of rating each participating packaging node, and pBFT signature in the consensus group confirm.

How does Elrond communicate across shards?

Elrond's strategy for performing cross-shard communication is to use an asynchronous model. Each block structure of Elrond is represented by a block header, which contains information such as block random number, round, proposal node, verification node timestamp, and a micro block (Miniblock) containing transaction information. Each micro block contains all transactions .

In this network, the verification and execution of the transaction will be completed in the sender's shard first, then notarized in the meta-chain and provided with a proof of execution, and then completed in the receiver's shard to update the balance, etc. The processing unit in this process is the microblock.

How does Elrond ensure security?

Elrond uses nonces for security, such as random sampling of block proposers and validators into consensus groups, and reshuffles nodes between shards after a round. In this way, the bribery attack mentioned above can also be prevented.

Randomness is the core of the blockchain, not only in the PoS consensus, it is possible to select the accounting nodes for each round through the amount of currency held and the age of the currency, or random numbers, etc. An important point in the PoW consensus is also the need for some kind of randomness.

Baleut commented:

Is it too technical, it may not seem easy to understand.
So I made a simple technical comparison chart. I made a summary of several well-known sharding public chain projects, which referred to the research report of Harmony and Binance, and contacted the official for confirmation of part of the content.

In addition to MultiVAC, the domestic TOP Network also adopts a sharding solution, and we will study it later when we have the opportunity.

Technology is one aspect. I also want to briefly mention the content. Hahaha, among them, Harmony is the most thorough for me. They have a lot of Chinese materials on Medium and Bihu, and the technology is clearly explained in the white paper and AMA. Near is indeed technical enough. From the technology to the Chinese version of the Yeying Protocol white paper, I can’t understand the specific implementation plan, let alone several other original white papers. My English level is four, and I have a splitting headache when I see it.

Elrond has very few Chinese materials, and only saw Tokengazer's analysis and rating of them. Fortunately, their white paper and other materials are relatively organized.

Facing the Chinese market, no matter how powerful the technology is, it may be very scary without good content to show everyone. A person in charge of China or a reliable Marketing team is very necessary.

A community needs quality content, otherwise it's just a community for gossip.

Investment Analysis of the Three Sharded Public Chains

The total circulation of Harmony is 12.6 billion, and the current circulation is about 3.7 billion. According to Coingecko data, Harmony's market value ranks 143. They completed the seed round of fundraising in May 2018. Investors include Continue Capital, CypherMines, Lemniscap, Univalues ​​Associates, Qtum, Lattice Capital, Consensus Capital, etc. They sold 22.4% of the quota and raised a total of 18.3 million US dollars. In May, 12.5% ​​of the quota was sold in Binance IEO, and another $5 million was raised.

The investors have a strong background, and the amount of financing is still sufficient, but if the Ethereum raised in May 2018 has not been realized, it may be a bit stretched by now.

The secondary market performance of Harmony is not bad. The current price is around 0.0048. Compared with the private placement price of 0.0065, although it is in a break state, it is still profitable compared to the IEO price of 0.003175.

However, the allocation of Harmony tokens is not very reasonable, and the progress of the protocol and the ecological construction are confusing.

According to the token unlocking information released by the team (http://dwz.date/dxf), there will be two more seed round unlocks in 2020, about 1.4 billion tokens. Coupled with the progress of the protocol, ecological construction and the team's tokens, the circulation is expected to reach about 70% by the end of this year.

At present, Harmony’s staking does not seem to have started. They plan to open staking in Q1, and the annualized rate of return is expected to be around 10%. If Staking keeps the circulation in a smaller range, coupled with the development of Dapp after the main network, it may still have a good performance, of course it also depends on the team's decision-making and funds.

NEAR is a traditional form of financing. Investors include MultiCoin Capital, Coinbase, Electric Capital, MetaStable, Baidu Ventures, SVAngel, etc., with a total financing of 12.1 million US dollars.

At present, Near has not landed on any exchange, and it is expected to launch the main network and land on the exchange in Q1. Information about token distribution and unlocking and private placement prices has not been officially announced yet.

Recently, I saw that Near came to China to do a few offline activities, and the results were not bad. However, it seems that the time to come to China is not very good. The domestic environment and market are not good at the end of the year, and there are no big benefits, so it is difficult to stimulate Everyone's nerves. Look forward to the action after the Spring Festival.

The total circulation of Elrond is 20 billion pieces, and the current circulation is about 10 billion pieces. According to Coingecko data, Elrond's market value ranks 149th, which is very little different from Harmony's ranking.

Relatively speaking, Elrond’s valuation is much lower. Private placement sold 19% of the quota and raised $1.9 million. Investors include Binance Labs, Electric Capital, NGC, Maven 11, and Woodstock Capita. Later, Elrond conducted an IEO on Binance, selling 25% of the quota to raise $3.25 million.

In comparison, Elrond’s financing should be the least, and their team has more than 20 people on the official website, the cost is still high, and the funds do not seem to be sufficient. I don’t know if they have any plans to refinance.

At present, it is not easy for the project party. If there is a breakthrough and value, the cost can be reduced to ensure development, and the future can be expected.

Finally, thank you for reading, I have read a lot of information in order to write this article. There may still be many points that have not been introduced and analyzed in detail, and we will talk slowly when we have the opportunity~

References:

References:

https://info.binance.com/

https://elrond.com/

https://www.odaily.com/

http://www.mimajike.com/

https://ethfans.org/

https://bihu.com/

https://www.chainnews.com/

http://near.ai/doomslug

https://github.com/



公链
Welcome to Join Odaily Official Community