Skip to main content
Parallax uses a consensus mechanism that involves Proof-of-work (PoW), similar to Bitcoin. This allowed the nodes of the Parallax network to agree on the state of all information recorded on the Parallax blockchain and prevents certain kinds of economic attacks.

Prerequisites

To better understand this page, we recommend you first read up on transactions, blocks, and consensus mechanisms.

What is Proof-of-work (PoW)?

Nakamoto consensus, which utilizes proof-of-work, is the mechanism that allows the decentralized Parallax network to come to consensus (i.e. all nodes agree) on things like account balances and the order of transactions. This prevents users from “double spending” their coins and ensured that the Parallax chain is tremendously difficult to attack or manipulate.

Proof-of-work and mining

Proof-of-work is the underlying algorithm that sets the difficulty and rules for the work miners do on proof-of-work blockchains. Mining is the “work” itself. It’s the act of adding valid blocks to the chain. This is important because the chain’s length helps the network follow the correct fork of the blockchain. The more “work” done, the longer the chain, and the higher the block number, the more certain the network can be of the current state of things. More on mining

How Parallax’s proof-of-work work?

Parallax transactions are processed into blocks, with each block containing:
  • block difficulty – for example: 3,324,092,183,262,715
  • mixHash – for example: 0x44bca881b07a6a09f83b130798072441705d9a665c5ac8bdf2f39a3cdf3bee29
  • nonce – for example: 0xd3ee432b4fb3d26b
This block data is directly related to proof-of-work.

The work in proof-of-work

The proof-of-work protocol, XHash, requires miners to go through an intense race of trial and error to find the nonce for a block. Only blocks with a valid nonce can be added to the chain. When racing to create a block, a miner repeatedly put a dataset, that can only be obtained by downloading and running the full chain (as a miner does), through a mathematical function. The dataset is used to generate a mixHash below a target that is dictated by the block difficulty. The best way to do this is through trial and error. The difficulty determined the target for the hash. The lower the target, the smaller the set of valid hashes. Once generated, this is incredibly easy for other miners and clients to verify. Even if one transaction were to change, the hash would be completely different, signalling fraud. Hashing makes fraud easy to spot. But proof-of-work as a process is also a big deterrent to attacking the chain.

Proof-of-work and security

Miners are incentivized to do this work on the main Parallax chain. There is little incentive for a subset of miners to start their own chain—it undermines the system. Blockchains rely on having a single state as a source of truth. The objective of proof-of-work is to extend the chain. The longest chain is most believable as the valid one because it had the most computational work done to generate it. Within Parallax’s PoW system, it is nearly impossible to create new blocks that erase transactions, create fake ones, or maintain a second chain. That’s because a malicious miner would have needed to always solve the block nonce faster than everyone else. To consistently create malicious yet valid blocks, a malicious miner would need over 51% of the network mining power to beat everyone else. That amount of “work” requires a lot of expensive computing power and the energy spent might even have outweighed the gains made in an attack.

Proof-of-work economics

Proof-of-work was also responsible for issuing new currency into the system and incentivizing miners to do the work. Similar to Bitcoin, miners who successfully create a block are rewarded with freshly minted Laxes and part of the transaction fees. Following the Bitcoin standard, the initial block reward is 50 Laxes and the reward halves every 210,000 block, or approximately 4 years.

Finality

A transaction has “finality” on Parallax when it’s part of a block that can’t change. Because miners work in a decentralized way, two valid blocks could be mined at the same time. This creates a temporary fork. Eventually, one of these chains became the accepted chain after subsequent blocks were mined and added to it, making it longer. To complicate things further, transactions rejected on the temporary fork may not have been included in the accepted chain. This means it could get reversed. So finality refers to the time you should wait before considering a transaction irreversible. Under proof-of-work, the more blocks were mined on top of a specific block N, the higher confidence that the transactions in N were successful and would not be reverted.

More of a visual learner?

Further Reading

Videos

I