Get the App
SLTechnology News&Howtos  ›  Servers  › 

IPSE Cross-chain: a brief Analysis of the working principle of BABE consensus algorithm

Shulou Source: shulou.com Published: 2022-06-03 05:34:25 09月21日 Update

At present, there is a contradiction between the expansion of a certain block chain network itself and the large-scale growth of local applications under the system, which leads to the intensification of system resource competition, which has been reflected in the resource (RAM and CPU) congestion in the current EOS network. This problem exists not only in EOS, but also in block chain networks such as Ethernet Fong and Bitcoin.

Polkadot proposed a solution, which is a scalable heterogeneous multi-chain system, the goal is to achieve the formation of interoperability between isolated block chain networks. Polkadot has high scalability, avoids hard bifurcations, and can be continuously upgraded.

IPSE builds parallel chain (parachain) based on Substrate architecture, and uses the main key structure of Polkadot system architecture, transfer bridge (bridge), for cross-chain communication. In order to ensure the state consistency of the IPSE parallel chain and the trunk chain of the Polkadot system, the hybrid consensus mechanism is used, which are BABE and GRANDPA respectively.

BABE consensus algorithm

BABE (Blind Assignment for Blockchain Extension, "Block chain extended Blind allocation) is a block generation mechanism between the verifier node and determining who is generating a new block. the BABE algorithm allocates block production slots to the verifier according to the mortgage and the use of Polkadot random periods.

Polkadot verifiers will participate in each lottery to determine whether they are production block candidates for that slot. The time slot is measured in time and the length is 6 seconds. Because of this random mechanism, multiple verifiers may be candidates in the same time slot. In the rest of the time, the time slot may be empty, resulting in block time inconsistency.

Multiple verifiers in the same time slot: when multiple verifiers also become block production candidates in the same time slot, all will generate blocks and broadcast to the network. However, this situation will be a competition. Which verifier wins first depends on the network topology and delay until the bifurcation is finally finalized and truncated.

There are no verifiers in the slots: when no examiners are low enough to produce blocks in a random lottery, no blocks are generated. However, an algorithm will be selected to avoid this situation, and a verifier will always generate blocks.

BABE also needs to cooperate with GRANDPA, BABE is responsible for producing blocks, and GRANDPA is mainly responsible for realizing the consensus between block chains (such as parallel chains) to ensure the final consistency of blocks.

Note: it should be pointed out that the BABE algorithm is still being improved. At present, the Handan Kilinc Alper of the Web3 Foundation has issued the latest BABE introduction document, which explains the working mechanism in detail.

Https://research.web3.foundation/en/latest/polkadot/BABE/Babe/

Tags: Blocks verifications timeslots networks mechanisms systems consensus algorithms consistency between multiple parallel production consistency candidates situation time architecture resources randomness Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Linux OPPO Reno Shulou Technology Shulou Information