Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How addresses successfully forge a block in the GaiaWorld common chain

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to successfully forge a block in the GaiaWorld public chain. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

GAIAWorld

To discuss the birth of a block, an address how to successfully forge a block must not bypass the discussion of consensus mechanism. Consensus mechanism is the core of distributed system. In P2P networks, nodes who distrust each other finally achieve data consistency by following the preset mechanism.

In the Gaia chain, we created the CPoS (Competition Prove of Stake) consensus mechanism, which is not only one of the core technologies of the Gaia chain, but also the key technology that distinguishes the Gaia chain from other common chains and is superior to most common chains. CPoS, compared with PoS and PoW consensus mechanism, has made great progress in solving the problems of security, scalability, performance efficiency and energy consumption cost of blockchain.

So how does an address successfully forge a block under the CPoS consensus mechanism designed by the GaiaWorld common chain?

Step 1: participate in the forging committee and become a member of the forging committee

The forging committee is a collection of addresses in the Gaia chain that have the right to create blocks. The address has the right to forge the block only if it participates in and becomes a member of our block forging committee. This is also a prerequisite.

In order to prevent nodes from doing evil, you need to pay more than a certain amount of Gaia as a deposit to join the committee. The function of the deposit is:

1. If the node does evil, the deposit will be forfeited, so the address with higher margin is less likely to do evil.

2. The amount of margin is related to the value of voting rights.

The forging committee is divided into 256 groups, each of which enjoys forging rights fairly in turn. After joining the forging committee, the address will be assigned to any of the groups numbered 0Mel 255. the factors that affect the allocation are: the last 8-bit of the address, the number of deposits, the random number, and the current block height. The Gaia chain will be divided into two cases: grouping addresses and calculating voting rights.

Step 2: calculate the voting rights, and the one with the highest voting rights among the forging committee members will get the right to forge the block.

Situation 1:

The address of the new application to join the forging committee will fall into one of the corresponding groups numbered 0-255for the first time according to the address followed by 8-bit. In addition, "new members" have to wait for the height of 400000 blocks before they have the right to vote, in order to prevent new addresses from speculating into groups with fewer members.

After a new member with block height of 40pc0000, his initial voting right is assumed to be a logarithmic function with random number p and margin an as independent variables. Moreover, every 256 block heights (one round of block time), the voting rights will increase the initial voting right K value, 10 rounds of capping, no longer increase.

Finally, the top 10 forging committee members in the current group will be given additional voting rights in the rankings.

Total voting rights = cumulative voting rights + ranking voting rights

Case 2:

When a forging member in a group successfully adds a block to the block chain, the forging member's voting rights will be cleared and assigned to the new group. The grouping is based on the address of the committee member, the height of the current block, the random number, and the last 8-bit value of the hash function H (Xmeny Y _ (Z)).

Similarly, for every 256 block height time, the voting rights are increased by K (initial voting rights) and capped for 10 rounds.

The top 10 in each group will be given additional voting rights in the rankings.

Total voting rights = cumulative voting rights + ranking voting rights

After understanding the calculation of the total voting rights in both cases, let's answer the reasons for designing cumulative voting rights and ranking voting rights.

Question and answer 1:

1. Why accumulate K with the increase of block height?

In the Gaia chain, you do not need too much margin threshold to join the forging committee, and the cost of forging nodes is relatively small. Adding time cost factors can make more small addresses widen the voting gap between new addresses and new addresses after paying the time cost, and increase the possibility of forging nodes.

The increase of P ≤ n (n address 10) greatly widens the gap between the voting rights of the newly added address and the waiting address, while constantly updating the voting rights of the forging committee, which can prevent malicious nodes from colluding to control several connected nodes to carry out double-flower attacks.

The purpose of limiting this cumulative value to 10 times the limit is to control the number of forging committee members added to micro-amount addresses, because members with too little deposit are inferior to forging committee members who have paid large deposits in terms of stability and credibility.

That is, Gaia sets a balance between security and fairness.

Question and answer 2:

2. Why do the top 10 forging committees get additional voting rights in ranking?

The design of ranking voting rights is for security considerations. If the ranking is R, then the ranking voting rights will be 2 (11murR) power, which widens the gap between the voting rights of the top 10 members and other members, and avoids the risk of joint attack by malicious members.

It is not difficult to see that in the Gaia chain, the positive correlation between voting rights and the number of deposits is deliberately reduced compared with the PoS mechanism, in order to encourage more forging members to participate in block forging, not only to ensure the forging rights and interests of small forging members, but also to ensure that more node subjects participate in the maintenance of the public chain, so as to avoid the threat posed by the central node to the public chain.

On the GaiaWorld public chain address is how to successfully forge a block to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report