It's been a PIVX idiosyncrasy for a long time that hard, unplanned shutdowns on Windows sometimes/often result in a corrupted blockchain that needs to be re-synced. The devs improved the situation with the 3.1 release, but it's not fixed in all cases, obviously. There was a recent complaining session on Reddit about the issue (
https://www.reddit.com/r/pivx/comments/8qv36o/pivx_block_database_corrupts_to_damn_easily/). Basically, the devs are aware and are working to make things better, but there's no magic bullet for now because reasons.
That said, there are things that, while not complete solutions, do make the most of the situation:
- Disable all automatic 'update' functions on your staking computer (or anything else that might cause it to restart);
- Use a laptop or other battery-backed-up device for staking, so that power outages don't shut the wallet down;
- Consider using Linux instead of Windows, if possible;
- In other words (says Captain Obvious) do whatever you can to reduce unplanned shutdowns.
If you do need to resync,
- As DRPD noted above, use the daily snapshot (
http://178.254.23.111/~pub/PIVX/Daily-Snapshots-Html/PIVX-Daily-Snapshots.html);- Ensure your staking device has some hardware overhead (i.e., not just bare minimum specs) to reduce orphans;
- To ensure the most efficient syncing, include
banscore=10000 bantime=60
in your .conf file (you'll need to restart the wallet after editing the .conf).
You might also want to run
clearbanned
in the console to make sure you aren't accidentally banning peers that don't need to be banned (more connections = faster sync).