Wallet/wallet.cpp:648: void CWallet::IncrementNoteWitnesses(const CBlockIndex*, const CBlock*, ZCIncrementalMerkleTree): Assertion `nWitnessCacheSize >= nd->witnesses.size()' failed."

“asrock@asrock-VirtualBox:~/zcash$ zcashd: wallet/wallet.cpp:648: void CWallet::IncrementNoteWitnesses(const CBlockIndex*, const CBlock*, ZCIncrementalMerkleTree): Assertion `nWitnessCacheSize >= nd->witnesses.size()’ failed.”

2nd time that has happened to me. redid the whole process based on the upgrade guide previously. any short cuts in addressing this would be great

Did this happen on RC 1, or are you still on beta 2? We’re hunting down a bug, and added more precise checks in RC 1.

Please upgrade to RC 1 (follow the beta guide), and then post the crash that happens while your node was running (not the one that happens when you restart afterwards) to error on startup: Assertion `nWitnessCacheSize >= nd->witnesses.size()' failed. · Issue #1378 · zcash/zcash · GitHub

thx for responding. i had to upgrade to rc1 and start from new wallet again. after 10hours, so far seems back to BAU. will report in any crash if it happens from here on. cheers

1 Like

There was a black out and my ubuntu running on virtualbox mining zcash shut down under power loss. when i reboot and try to start up daemon, it gave me this error again zcashd: wallet/wallet.cpp:702: void CWallet::IncrementNoteWitnesses(const CBlockIndex*, const CBlock*, ZCIncrementalMerkleTree&): Assertion `nd->witnesses.size() == 0’ failed.

any ideas or do i need to recompile and restart from zero again?

I had a similar error last night. I ended up running zcashd with the -reindex flag and it corrected the issue.

1 Like

Thanks mv1879 - seems to correct the error but also seems all my earlier mined coins have been zerorised as well. oh well, at least this is in testnet. hope this gets ironed out before production launch

tell a lie. i just needed to be patient i guess as it takes time for the re-index to happen. all mined coins earlier are now reflected correctly. thanks for the tip mv1879

I think this could be the root cause of the issue. Thanks @rpf for having power failures!

not exactly sure what i did, but glad i could contribute to help the cause

Another instance.

Events as happened:

  1. Disk is full.
  2. Stopped daemon.
  3. Removed some files for space.
  4. Restarted daemon and I started getting this issue.
    zcashd -reindex did not fix the issue.

It seems my wallet file is corrupted.

I had this issue, and zcashd -reindex did fix it for me, and i was able to access my old wallet and send TAZ from it once again.

So far I have not been able to re-create it since rc1. I have rc1 running on physical hardware, though, and the beta2 issue arose on a VM.

I have to use zcashd -reindex Everytime. Without -reindex flag I am getting same error on second run.