PIVX – Reduce Orphan Blocks While Staking With zPIV

By | February 25, 2019

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 Overview

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.

PIVX Staking

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.

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.

Convert zPIV to PIV

In order to re-mint your zPIV, you first need to convert it to PIV by sending it to yourself.

  1. Click the Receive tab and press Request Payment to generate a new private/public key pair.
  2. 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.
  3. Select the Privacy tab and click the zPiv Control button.
  4. 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.
  5. In the Pay To field, paste the public address of the key pair generated in step one.
  6. Verify that the address you pasted into the Pay To field matches the address you created in step one.
  7. Fill in the total amount of zPIV to convert and click the Spend Zerocoin button.
  8. 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

  1. 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. 
  2. 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.
  3. Click the Overview tab. The freshly minted zPIV will remain in an unconfirmed state until the network has verified and confirmed the transaction.
  4. 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.

Other Causes

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.

Long-term Solution

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

*