What the Tech? Matrix’s HPoW Consensus Mechanism

An introduction for newcomers and a refresher for veterans. Learn what sets the Matrix AI Network’s HPoW consensus mechanism apart!

Debates surrounding centralization and decentralization are frequently muddled by competing ideologies and appeals to emotion. The advantages and disadvantages of each can be difficult to concretize. It is often difficult to quantify the costs and benefits of each. Other times, it is a relatively simple affair. On February 22nd, 2019, a blacklisted account was able to steal 2.09 million EOS because a single EOS block producer failed to update the mainnet account blacklist. In this instance, the cost of EOS’s centralization was clear — and proved to be about USD 7.7 Million. Whether this was a crime perpetrated by a well-organized group of hackers who had a profound understanding of EOS’ innerworkings, the actions of a single malicious player, or a loophole is inconsequential. This type of risk is a feature of a flawed DPoS consensus mechanism and architecture.

Rather than create a centralized system in a misguided attempt to sidestep the problems plaguing the blockchain industry, the Matrix AI Network uses its expertise in Artificial Intelligence to meet the performance and security requirements of enterprise clients without abandoning the notion of decentralization. This feat is accomplished using Matrix’s proprietary consensus mechanism — dubbed HPoW or HyperPoW.

Matrix’s HPoW is a hybrid PoS, PoW and BFT consensus mechanism. Matrix Mining Masternodes compete against each other to complete mining work. By integrating PoW, the Matrix AI Network ensures a baseline cost to mining activities which, in turn, exerts upward pressure on the token price floor as Mining Masternodes will not be willing to mine tokens at a loss as the cost of computing power increases. Matrix uses PoS to conduct the verification tasks.

The Matrix AI Network architecture is designed to improve the speed of consensus by completing mining calculations and block packaging as quickly as possible. Matrix iterates on Hash functions to support image-recognition AI algorithms. Eventually, AI mining algorithms will be replaced with MCMC mining algorithms. Matrix uses a verifiable random function (VRF) to ensure that the random number used in the HPoW consensus mechanism is truly random and unpredictable.

In contrast to other blockchain solutions like Ethereum, the Matrix AI Network topology is ordered hierarchically. By including the concept of nodelevels, the Matrix AI Network performs hierarchical rotations each election cycle while merging entry and exit layers to maximize the stability and efficiency of the network.

Because all PoW mining activities must be validated by PoS Verification Masternodes, Matrix Mining Masternodes have no power to change network rules and parameters. This effectively removes the threat of 51% attacks. Similarly, the network risks present in fully-PoS blockchain solutions due to the presence of overly-influential players are removed as new Verification Masternodes are selected each cycle. Additionally, the Matrix AI Network implements a blacklist mechanism. If a Selected Verification Masternode fails to properly complete their work during a given election cycle — for instance, if it goes offline — it will be automatically added to the blacklist and will be forbidden from participating in network activities for two full cycles.

Not only is HPoW the basis for Matrix’s distributed consensus, it is also the basis for the Matrix AI Network’s cross-chain communication. Matrix Verification Masternodes and BFT principles enable communication between multiple public chains, between public chains and consortium chains, and between multiple consortium chains. At the same time, these enable communication between the Matrix main chain, sub chains and side chains. Matrix Verification Masternodes also guarantee the consistency of data across all these chains to ensure that the Matrix main chain won’t fork. All this while guaranteeing the decentralization of decision-making power.

There are several roles vital to ensuring that the Matrix AI Network is able to reach consensus. These include Mining Masternodes, Verification Masternodes and Broadcast Nodes.

· Mining Masternodes
The primary purpose of Matrix’s Mining Masternodes is to perform mining tasks and calculate mining algorithms while providing protection to the network. Currently, 21 Mining Masternodes are elected every cycle. In addition to mining tasks, Mining Masternodes send transactions to Verification Masternodes to complete the verification tasks.

· Verification Masternodes
There are three types of Verification Masternodes: Selected Verification Masternodes, Backup Verification Masternodes, and Supplementary Verification Masternodes. Selected Verification Masternodes are chiefly responsible for verifying transactions, packing the block and ensuring block correctness. Currently, 19 Selected Verification Masternodes and 5 Backup Masternodes are elected per cycle.

Each time a new block is issued, a Selected Verification Masternode is chosen as the Leader. The Leader, selected in sequence to ensure fairness, is responsible for the final block packing work. The sequence is remade every cycle. All Selected Verification Masternodes verify transactions and vote to confirm the results. If more than 2/3rds agree, the block is confirmed. Verification Masternodes are also responsible for verifying the online status of other Selected Verification Masternodes.

The role of the Backup Verification Masternodes is simple. Should a Selected Verification Masternode go offline or be otherwise unable to perform verification tasks, a Backup Verification Masternode will take its place. When a Backup Verification Masternode becomes unavailable, the Supplementary Verification Masternode springs into action.

· Broadcast Nodes
To ensure that the Matrix AI Network does not suffer from EOS-like issues of asynchrony, Broadcast Nodes are responsible for generating and broadcasting a special block every cycle. This broadcast block contains, amongst other vital network information, an updated blacklist.

Consensus is both an important and complicated subject. A blockchain’s consensus mechanism is, in many ways, its central component. While it is likely that the perfect consensus mechanism is yet to be found, the Matrix team is confident that HPoW provides insight and a forward-looking direction towards the future of consensus.

Matrix AI Network leverages the latest AI technology to deliver on the promise of blockchain.

FOLLOW MATRIX:
Website | Github | Twitter | Reddit | Facebook | Youtube | Discord
Telegram (Official) | Telegram (Masternodes)
Owen Tao (CEO) | Steve Deng (Chief AI Scientist)

Matrix AI Network leverages the latest AI technology to deliver on the promise of blockchain. Website: www.matrix.io Telegram: t.me/matrixainetwork