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.
zPIV Orphan Blocks
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 and orphan block.
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.
Convert zPIV to PIV
In order to re-mint your zPIV, you first need to convert it to PIV by sending it to yourself.
- Click the Receive tab and press Request Payment to generate a new private/public key pair.
- Click the Copy Address button to copy the newly generated public key to the clipboard and then close the Request Payment window. You will use this new address to send the zPIV to yourself.
- Select the Privacy tab and click the zPiv Control button.
- Expand each denomination by clicking the plus symbol and then select the specific zPIV coins you wish to convert to PIV. Click the OK button when finished.
- In the Pay To field, paste the public address of the key pair generated in step one.
- Verify that the address you pasted into the Pay To field matches the address you created in step one.
- Fill in the total amount of zPIV to convert and click the Spend Zerocoin button.
- Enter your wallet password to authorise the transaction and confirm when prompted.
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:
Convert PIV to zPIV
- Click the Privacy tab. You should see that you now have some PIV that is available for minting. For staking, it is recommended that you convert PIV into the largest denominations of zPIV possible.
- Fill in the same amount of zPIV you converted to PIV and click the Mint Zerocoin button. It may take a few seconds before a status message appears indicating the amount of PIV you successfully converted to zPIV.
- Click the Overview tab. The freshly minted zPIV will remain in an unconfirmed state until the network has verified and confirmed the transaction.
- Go back to the privacy tab and click the zPIV Control button. From here you can verify that the number of confirmations your zPIV have is now close to zero.
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.