In this post I'll give a brief overview of PIVX, explain a bit how staking works, and outline some steps you can take to decrease the number of orphan blocks your PIVX client produces.
PIVX is an energy-efficient, privacy-focused cryptocurrency that was forked from the DASH codebase. It started as the project Darknet in 2016, but has since been professionally rebranded to PIVX (Private Instant Verified Transaction). PIVX was the first crypto project to implement zero-knowledge proofs on a Proof of Stake blockchain, providing for both anonymous and energy-efficient transactions. They have recruited some great talent to their team including a couple of well-known cryptographers.
One aspect of PIVX that sets it apart from other privacy coins is the developers' use of the RSA-2048 factor challenge numbers to start the blockchain, meaning that no trusted setup ceremony was required. Also, unlike zerocash based coins, the supply of PIVX can be audited. So if a bug were to be found that allowed an attacker to generate new coins, they would not go undetected.
There are two coins the PIVX payment network supports: PIV and zPIV. PIV is similar to Bitcoin in that payments can be tracked from the original sender using blockchain analysis. zPIV is "zero-knowledge proof" that you own a certain amount of PIV and can be spent in an untraceable way. The PIVX client can be used to convert PIV to zPIV and vice versa. This procedure will be covered later in this post.
Unlike Bitcoin and other Proof Of Work (PoW) cryptocurrencies, PIVX using the Proof Of Stake (PoS) algorithm to reach consensus on the network. This means that anyone who owns a computer and at least one PIV can stake their coins in the PIVX wallet, participate in securing the network (verify transactions), and earn rewards for doing so. You can stake using PIV or zPIV, the latter offering more privacy and greater rewards.
Every 60 seconds a random lucky participate on the PIVX network generates a new block. And with each new block, six new PIV are minted. If the participant is staking with zPIV, they will receive half of the total reward (three zPIV). Otherwise, if they are staking with regular PIV, they will receive only two PIV. The remainder of the reward is split between the community fund and the masternode owners.
In order to start staking, you need to download the client and transfer at least 1 PIV to it. The simplest way to get some PIV is to purchase it from an exchange. The number of rewards you receive is proportional to the amount you have staked. So the more PIV that you have staked, the higher the probability that you will receive a reward.
If it's your lucky day, you will see a notification in the PIVX client under recent transactions that you have minted a block and have been awarded three new zPIV. If the message is red, it means that unfortunately your client has generated an orphan block.
Accepted blocks are black, orphan blocks are red
An orphan block occurs when your client generates a block, but it is not accepted by the network. Usually this happens because someone else's client generated a block and sent it to the network faster than yours did.
Among other causes, orphan blocks can be a result of the zPIV having too many confirmations. As the number of confirmations on your zPIV increases, the process of generating a new block becomes more computationally expensive and therefore takes more time.
The PIVX community has recommended that any coin with more than 10000 confirmations should be re-minted to improve staking performance. The steps to do so can be found below.
You can check the number of confirmations your zPIV coins have by going into zPIV Control under the Privacy tab in the PIVX client.
The denominations of zPIV under which you own coins will have a plus sign beside them. Click it to reveal the details of each coin.
Check the column that displays the number of confirmations each coin has.
In order to re-mint your zPIV, you first need to convert it to PIV by sending it to yourself.
You will need to wait a few minutes for the network to confirm the transaction. Once you see that your PIV balance has increased, you can continue with the steps in the next section to convert the PIV back to zPIV:
Slow Internet speeds and poor performance on the computer running the client can also cause orphan blocks, so be sure to test these and take measures to improve them if necessary.
You should also consolidate your zPIV into the highest denominations possible. For example, instead of having 10 x 500zPIV denominations, you should convert them into a single 5000zPIV denomination.
According to the PIVX Reddit community, the developers are well aware of this issue and have been working to have the problem solved in the next release of the PIVX client. In the meantime, hopefully following the above steps lead to fewer orphan blocks and an overall higher number of total rewards.