chalmi
November 6, 2016, 3:18pm
1
Hello, I encountered a strange error. After I did transaction from my t-addr to z-addr daemon crashed and when I am trying to run it again it’s working for a while and then throwing error:
zcashd: wallet/wallet.cpp:653: void CWallet::IncrementNoteWitnesses(const CBlockIndex*, const CBlock*, ZCIncrementalMerkleTree&): Assertion `(nd->witnessHeight == -1) || (nd->witnessHeight == pindex->nHeight - 1)’ failed.
Is there any way now to recover my wallet?
“zcashd -reindex”
will recover it.
But I don’t recommend you to use z-addr unless you really have to. It’s not working as expected most times.
chalmi
November 6, 2016, 7:34pm
3
Thanks for your suggestion. Unfortunatelly, after runing “zcashd -reindex”, I received exactly the same error: zcashd: wallet/wallet.cpp:653: void CWallet::IncrementNoteWitnesses(const CBlockIndex*, const CBlock*, ZCIncrementalMerkleTree&): Assertion `(nd->witnessHeight == -1) || (nd->witnessHeight == pindex->nHeight - 1)’ failed.
Aborted
The only difference was it was rather immediately in this case.
(if this can help: error is always after validating 22nd or 23rd transaction)
Seems like wallet.dat file corrupted.
If you have backup of normal wallet.dat, then replace that file and -reindex daemon.
If you don’t have wallet.dat backup file then you would have to repair it manually.
opened 12:00PM - 29 Oct 16 UTC
closed 04:48PM - 17 Nov 16 UTC
C-bug
A-wallet
M-has-pr
At a random point, zcashd (1.0.0) crashed. It was executing several Z transactio… ns one after another at the time. The machine have 6Gb of RAM. The actual crash message didn't get recorded, sadly.
There was nothing in the log file, it just cut itself off.
The real issue is what happens next.
On restart, zcashd crashes with this message after a short time:
zcashd: wallet/wallet.cpp:653: void CWallet::IncrementNoteWitnesses(const CBlockIndex_, const CBlock_, ZCIncrementalMerkleTree&): Assertion `(nd->witnessHeight == -1) || (nd->witnessHeight == pindex->nHeight - 1)' failed.
The log cuts off during rescan with no errors.
This is eerily familiar, i remember reporting similar issues before and them being fixed by RC2.
Eventually, nothing short of a complete restore from backup fixed the situation.
I consider this is a critical, money-can-easily-get-lost bug.
Log fragment attached, starting a little before the initial crash.
(Bonus issue: Uploading a .log file gives a "We don’t support that file type. try again with a PNG, GIF, JPG, DOCX, PPTX, XLSX, TXT, PDF, or ZIP. " error... Kinda broken, i think, considering the feature's main use).
[debug.txt](https://github.com/zcash/zcash/files/559907/debug.txt)
“dump db, reload db, salvagewallet and then do a full rescan”