NGK blockchain: run the block producer mechanism in an environment with clear rules

The first thing to be clear to everyone is that the 21 block producers are produced through voting and are not determined at the beginning of the system. It is to believe that everyone must be very curious as to how these 21 block producers were generated?

NGK blockchain

NGK.IO uses a self-developed election algorithm DSNE for distributed block producers to ensure that the election can be completed in the shortest time. Due to the NGK smart contract itself is a P2P trust mechanism, and then refer to the real-world communication method, and finally select who will be the block producer by examining the total trust of the block producer. At the same time, in the process of calculating the degree of trust, the system will activate the mechanism of reward or punishment factor and time decay factor.

In addition, in order to reduce the network load caused by the selection of block producers in a network group with a large number of nodes, ordinary nodes will first undergo a wave of threshold filtering algorithms for selection. Then a block producer group is form from the remaining nodes, and finally select the best batch from the block producer group to serve.

NGK blockchain

NGK’s block producer election algorithm takes all aspects of the current network dynamic changes into consideration. During the election process, participating nodes can join or leave at any time, there may also be random failures (which can be repaired), or message loss or delay may occur. Leader election service includes three modules which are group election algorithm, fault detection and maintenance. It uses three QOS indicators which are speed (time occupied by election service), average error rate, and leader availability to measure the performance of election services.

The election of block producers will implement the screening of all nodes through the distributed minimum spanning tree algorithm. The minimum spanning tree algorithm has thus directly become an election algorithm. The distributed minimum spanning tree (MST) algorithm has the best communication and time complexity. On this basis, the MST algorithm introduces some very basic ideas and concepts.

NGK blockchain

A node as a root node which starts the algorithm and sends a “follow-me” message. A node that receives a “follow-me” message can reach the MST tree if the message delivery becomes the smallest weight edge among its neighboring edges. If some nodes do not hook themselves to the MST tree, then a new root will be selected, the old root is “migrated” to the new root, and the above process is continued.

In the worst case scenario, the algorithm requires (n/2–1) the complexity of the second root migration time is (dn), and the message complexity is (2m+dn/2–1). The parameters n, m, and d are the number of nodes, the number of edges, and the diameter of the network, respectively.

NGK blockchain