To troubleshoot staking, you'll want to make sure you have fulfilled all required conditions, every one of which needs to be fulfilled in order for valid stake rewards to be won: 

  1. Your wallet is running.
    Your wallet must build a valid block to win the stake.

  2. Your blockchain is fully synchronized.
    You cannot build a valid block unless it is built on the latest block already accepted by the majority.
    If you find that your wallet is several blocks behind and rarely seems to catch up, try turning off staking and see if it catches up within a few minutes, and then start staking again.

  3. Your wallet is unlocked.
    Staking requires spending the winning zerocoin in order to receive a fresh one and the block reward in return.

  4. You have one or more mature zerocoins. They are mature after (no longer) ~~200~~ confirmations, now 1000 confirmations since the 1.0.4.x upgrade.

  5. Your wallet has not disabled staking through a conf file entry or startup switch.
    It is possible to disable staking by using `staking=0` in the veil.conf file.

  6. Check that you are not also currently mining SHA256D or RandomX (proof of work) while also staking. Try staking from a different wallet on another computer. 
    While staking and mining simultaneously on the same computer is technically possible, it has been discovered that staked blocks might be orphaned while CPU mining at the same time, due to the intense competition for blocks. Anything that delays processing might allow a competing block to win, or defeat your staked, or mined block.


You can confirm your wallet is staking with one of the two following methods:

To see if "staking_active" is true or false enter the following command in the debug console


getwalletinfo


Start your wallet with the conf file entry or startup switch "debug=blockcreation", unlock your wallet for staking, and you should see entries similar to the following in your debug log every 30 seconds or so:

2019-03-03T20:23:07Z SelectStakeCoins: FOUND 123 STAKABLE ZEROCOINS
2019-03-03T20:23:08Z BitcoinMiner: Tried 31235 stake hashes for block 83918 last=1551644618
2019-03-03T20:23:28Z SelectStakeCoins: FOUND 123 STAKABLE ZEROCOINS
2019-03-03T20:23:28Z BitcoinMiner: Tried 61235 stake hashes for block 83918 last=1551644638
2019-03-03T20:23:57Z SelectStakeCoins: FOUND 123 STAKABLE ZEROCOINS
2019-03-03T20:23:57Z BitcoinMiner: Tried 99830 stake hashes for block 83918 last=1551644667
2019-03-03T20:24:32Z SelectStakeCoins: FOUND 123 STAKABLE ZEROCOINS
2019-03-03T20:24:33Z BitcoinMiner: Tried 103600 stake hashes for block 83918 last=1551644703



If you have been successfully staking but suddenly have 100% orphans, please contact the support team for assistance. 

We discovered #6 above, when a user reported suddenly getting 100% of staked blocks orphaned, but (the rare chance of) a wallet getting "forked" onto a non-majority chain, such as by using a superceded wallet after the block height or date of a mandatory update would also cause this. (Check that you have the latest released wallet.) See https://veil.freshdesk.com/en/support/solutions/articles/43000528762-how-to-update-upgrade-your-veil-wallet