Major Update of NetFlowCoin Consensus Mechanism

NetFlowCoin
12 min readSep 19, 2021

--

“Consensus refers to a community solution to a statement which is accepted (even though sometimes it is only reluctantly accepted or put aside ) by the parties when they have different views.” — — Wikipedia

Because each node is dispersed in a decentralized blockchain world, a mechanism is needed to maintain the operation and fairness of the whole system, unify the ledger data on the chain, which can also reward users who provide resources to maintain the blockchain, and punish malicious offenders. These systems need to be proved by some system, at the same time, they should be unanimously recognized by all nodes. In addition to cryptography technology, the consensus mechanism is also a necessary element and core part of the blockchain and the key to ensure the continuous operation of the blockchain system.

In a nutshell, whoever work should be rewarded and no matter who endangers the system should be punished, which is the consensus mechanism in the blockchain world.

The main work of the consensus mechanism is:

lTo maintain the operation sequence and fairness of the system

To maintain the stable operation of the system through reward and punishment

1. Main consensus at present

In the blockchain world, the following mechanisms are the most widely used consensus mechanisms:

PoW ( Proof of work mechanism)

As the first generation of consensus proof mechanism, PoW is the infrastructure of bitcoin and Ethereum. PoW is a perfect example of the distribution mechanism according to work. The greater the computing power, the more you get. However, a lot of electric energy consumption and low efficiency are the biggest disadvantages of PoW .

PoS is a mechanism that selects validators and obtains rewards by the rights and interests of the number of tokens held by users. Using this model, the original computing power producers are replaced by the stakeholders in the chain. Whoever has greater rights and interests will have greater block generation right. When PoS is adopted, computational power comparison is not required, which doesn’t waste a lot of resources and the time (performance) to form a consensus will greatly exceed that of PoW. An important work of Ethereum 2.0 is to transfer the PoW consensus to the PoS consensus.

DPoS (Delegated Proof of Stake)

DPoS is similar to a joint-stock company. A certain number of verifiers, who are to be responsible for producing blocks and maintaining networks, are elected by voting. The income of the verifiers will also be distributed among its supporters according to a certain proportion. If DPoS is adopted, it will consume less energy and will be more efficient, but the enthusiasm for voting is very low. On the contrary, it is more prone to “centralization” of rights.

2 NetFlowCoin’s Proof of Work

2.1 Consensus of testnet 1.0

For NetFlowCoin, which is expected to connect on-chain and off-chain, the dual consensus mechanism of DPoS (Delegated Proof of Stake) + PoVF (effective flow consensus) is adopted to meet the dual needs of network maintenance and business rewards from the perspective of performance and actual business in its test network version 1.0.

However, after a period of observation, it was found that consensus is still insufficient in terms of operability, fairness and incentive coverage. Therefore, after careful consideration and multi-party demonstrations and exchanges, a major innovation to the existing consensus of the test network will be made according to the decision of the project party in order to help the final implementation of the project vision.

2.2 New NetFlowCoin consensus

The new NetFlowCoin is still designed based on flow, value conversion medium, whose characteristic is non-attribute, the full participation of flow and high adaptability in the traditional “customer-network-service” model.

The consensus of NetFlowCoin can be divided into Proof of Stake (PoS) and Proof of Flow (PoF).

PoS (Proof of Staked)

The PoS on the chain proves that by selecting witness nodes based on a specific algorithm among all candidate nodes, the transaction bookkeeping and block generation work can be completed.

PoF (Proof of Flow)

It helps roof of work mechanism, which combines the mechanisms based on static bandwidth support and dynamic flow work, completes the work proof the off-chain services which are digitized to realize its on-chain value in the form of flow. PoF covers two aspects of consensus, including static resource capabilities (bandwidth support) and dynamic service work (flow service).

2.3 NetFlowCoin PoS consensus mechanism

NetFlowCoin PoS, an original improvement from the traditional PoS protocol, presets four candidate node pools with different winning ratios (multi-house system). In each round of witness node elections, a corresponding number of nodes are selected from the four pools according to the equity algorithm to grant block generation rights (i.e. witness nodes). Meanwhile, it ensures that the block rights will not be completely controlled by some fixed nodes in combination with the rewards reduction algorithm.

2.3.1 Block generation pledge

For the nodes that hope to participate in the block generation, the opportunity to finalize blocks can only be obtained after they complete the pledge on the chain before they can enter the pre-candidate pool. The purpose of pledge is to maintain network security and ensure that participants will provide relevant services in a manner that conforms to the network’s code of conduct, otherwise they will be punished (for example, part of the pledge will be confiscated).

The market demand for trust (no one will take the initiative to do something harmful to their own vital interests) will be reduced by Pledge, and the opportunity to promote the paradigm shift of market value accumulation can be held. At the same time, the huge value originally seized by intermediaries to service providers in the chain can be fairly distributed. Making use of cryptography technology and behavioral economics, the blockchain system can operate self sustainably, so that everyone can participate in it and maintain their privacy at the same time.

2.3.2 Node pool

There are three node pools in the PoS consensus:

Pre-candidate pool: all nodes pledged with the required number can enter the pool, and only the nodes in the pool have the opportunity to become candidate nodes. There is no limit to the number of nodes in the pool.

Candidate node pool: a certain number of nodes will be selected to enter the candidate node pool according to the node assets in the pre-candidate pool. The candidate node pool can be divided into four intervals, in which different intervals have different node rights and interests and the number of successful witness nodes. The greater the rights and interests, the higher the interval, and the greater the probability of winning. The number of candidate node pools and each interval is limited.

Number of witness nodes: after consensus algorithm, 21 witness nodes are selected from the four intervals of candidate nodes, who are responsible for the bookkeeping and packaging of this block generation round. The witness nodes of each cycle in each block round are randomly out of order to avoid attack.

2.3.3 Block round, block cycle and block interval

We take very 7 days as a block round; each block interval (called block slot) is 10 seconds, and each block cycle is 21 nodes to complete a block operation in turn (i.e. 21 block slots, 210 seconds).

1 block round = 2,880 block cycles = 60,480 block slots

Random sorting is adopted for the block queue of witness nodes in order to avoid malicious attacks.

At the beginning of the second round of block, the assets of the pre-candidate nodes will be counted by the consensus protocol and then they will be filled into each interval of the candidate node pool, after which 21 nodes will be selected from the candidate interval to enter the witness node pool.

2.3.4 Election process and block generation

Netflowcoin POS consensus will select a corresponding number of witness nodes in each block generation round; and due to the random block cycle, each witness node can only complete block packaging in its own block slot.

2.3.5 Rotation, incentive and punishment of witness nodes

1) Rotation

Rotation is very important to ensure the POS consensus, which avoids the concentration of power and interests and the rigidity of stratum. Rotation can also be divided into two levels:

Replacement of witness nodes in the block round

Because a certain witness node cannot complete the block process at the block interval due to offline, downtime and other reasons, which will reduce the throughput of the whole blockchain system, a trust score mechanism is established in the POS consensus. When for a node the score is lower than the trust score, it will be filled by an unselected candidate node, so as to ensure the smooth block process.

witness node rotation of block round election

In the election process of each block round, the reward reduction and weighting algorithm will ensure that the block right will not be maintained by some nodes with too high rights and interests, so as to complete the rotation of candidate nodes as witness nodes.

2) Rewards

In the decentralized blockchain system, good reward is essential in order to make the system more efficient and autonomous. Like the PoW and DPoS consensus mechanisms, under the NetFlowCoin PoS consensus mechanism, nodes producing blocks can also obtain token rewards to encourage them to verify transactions and produce blocks, so as to maintain the blockchain network.

3) Punishment

The witness node that endangers the stability of the chain due to error or malicious behavior will be punished accordingly to standardize the node behavior.

2.3.6 Pos consensus advantages

Multi-house system (candidate node pool)

The multi-house model disperses the block generation right, which not only ensures that nodes with a large number of pledges have more block generation opportunities, but also enables nodes with a small number of pledges to obtain a certain block generation probability, so as to avoid the problems of rigid consensus and class solidification

Randomness of blocks

By random selection of witness nodes and random arrangement of block rounds, the security and stable production of blocks on the chain can be ensured and DDoS and other security attacks can be prevented.

High TPS

When the 10s block cycle is combined with the “solidification” mode, bifurcation and double flower problems can be avoided so as to effectively improve the speed of transactions on the chain, and meet the large concurrency requirements of real-world applications on the chain.

Reward and punishment

Witness nodes that generate blocks on time will get a certain number of token rewards, while nodes that fail to block normally will also be punished on the chain, forming an effective incentive and punishment environment to prevent nodes from doing bad things.

2.4 NetFlowCoin PoF consensus mechanism

The full name of POF mechanism is Proof of Flow, which is a mining mechanism based on the combination of static bandwidth support and dynamic flow work.

2.4.1 Bandwidth pledge

Like block generation, nodes that want to participate in flow production also need pledge. As a distributed value network oriented to the real application chain in the Web 3.0 era, the service quality of all participants (including but not limited to consumers, producers, partners, etc.) must be ensured in NetFlowCoin.

We know that in NetFlowCoin’s economic model, consumers need to burn a certain amount of FUL in order to promote the process in SDN / SDVN network. Therefore, how to ensure the rights and interests of consumers after payment is an unavoidable problem for the whole network service provider and it is also an important guarantee for the healthy development of the whole network ecology. NetFlowCoin’s bandwidth pledge mechanism is an important way to restrict the behavior of flow production nodes, promote them to provide services according to “rules” and obtain due benefits. At the same time, it is also used to ensure the quality of service of the network and provide startup guarantee for access users in case of punishment.

For the principle of bandwidth pledge, nodes should have different service capabilities (i.e. bandwidth size), so that they can be small enough for anyone to join easily, at the same time, they can meet the practical needs that the punishment will not be far less than the income. Therefore, NetFlowCoin’s bandwidth pledge is divided into four different levels according to the actual service bandwidth, corresponding to different levels of pledge respectively, which corresponds to a differentiated network quality embodiment from home bandwidth to computer room bandwidth.

2.4.2 Flow work reward

For flow work reward, a mining reward mechanism is adopted based on the valuable upstream flow actually generated by each node in the system. Flow, as dynamic data, will be rewarded to the service provider in the form of NFC after completing the corresponding service.

Flow means the upstream flow generated by the service provider (flow production node). According to the “client- server” model, from the perspective of the server, the client’s application for services is downlink flow (usually very small), while upstream flow can be produced for various services provided (such as video, pictures, audio and other contents, usually very large) and we can only use upstream flow to measure the value of real services.

Note: the flow of FUL must be burned before it can be converted to tokens on the chain.

2.4.3 Bandwidth support reward

For bandwidth support reward, it is a mining reward mechanism based on the high-quality bandwidth support provided by flow nodes for the network.

In a healthy global network, in order to ensure the sustainability of service quality massive bandwidth and service nodes are needed. Just as the traditional Internet giants will deploy computer rooms in various regions of the world to improve service speed and stability, on the premise of lacking super administrators, for the distributed network, the more demand for high-quality bandwidth and service providers, the better. Only in this way, can we ensure the high-speed link and redundant backup of the whole network data communication. It is conceivable that if there are more high-quality bandwidth service providers in the network, the better the services consumers will obtain, the greater the rewards of service providers will receive. At the same time, better service quality and economic rewards will attract more consumers and producers to join.

However, contrary to dynamic flow, in a nutshell, bandwidth providers may not be able to generate flow for 7 * 24 hours as a static supporting data, but bandwidth is an indispensable infrastructure in the network and its operation expenses that can not be underestimated. Therefore, a bandwidth supported reward mechanism is introduced into NetFlowCoin. At each reward window, all high-quality static bandwidth providers will receive high reward in the blockchain system in the whole network to encourage them to make significant contributions to the diversity and high quality of the network.

2.4.4 Punishment

Although a distributed network in the virtual world is build for SDN/SDVN, each node still needs to depend on the support of the physical network. The quality of the entire virtual network rely on better physical bandwidth and stable services determine, which is a key factor in improving the entire ecosystem. Therefore, in the PoF consensus, the quality of service of all producer nodes will be checked periodically, and nodes that fail to deliver on their service promises will be penalized with benefit reduction to limit their capacity.

It is hoped that for NetFlowCoin, through the two-pronged approach of rewards and punishments, all participants can provide quality services and a prosperous ecological platform can be built together .

2.4.5PoF consensus advantages

Flow opens up on-chain and off-chain

Any application service relies on real flow, and for NetFlowCoin, it uses flow as a value medium for on-chain and off-chain connectivity

Upstream flow casting token

Based on the “client-server” access model, the upstream flow of the edge server is used as the basis for the service workload on the chain

Network bandwidth support

It motivates all bandwidth providers supported by SDN/SDVN network infrastructure.

Digitalization of assets (services)

Here assets are recorded on the chain in the form of flow and bandwidth to complete the digital transformation

Digital assets

The digitized assets will be valued on the chain in the form of tokens

3 Conclusion

The two worlds on and off the chain are skillfully considered and opened up through the redesigned consensus mechanism. The infrastructure and services of SDN / SDVN network are successfully introduced into the blockchain world in the form of flow by PoF, which protected the stability of the blockchain platform, so that the business operation can be completed in the whole system under the decentralized architecture in large-scale by efficient cooperation.

--

--

NetFlowCoin

NetFlowCoin is a web 3.0 network that enables decentralized communication, storing, and sharing.