Zcashd 3.0.0 - CopyPreviousWitness problem

Getting this error on startup :-

zcashd: wallet/wallet.cpp:1080: void CopyPreviousWitnesses(NoteDataMap&, int, int64_t) [with NoteDataMap = std::map<SaplingOutPoint, SaplingNoteData>; int64_t = long int]: Assertion `(nd->witnessHeight == -1) || (nd->witnessHeight == indexHeight - 1)’ failed.

Doing a reindex to see if that clears it.

EDIT: Still reindexing, just in case its useful here are the last unusual lines of debug.log just before it borked -

Leaving InitialBLockDownload (latching to false)
ERROR: ContextualCheckTransaction(): transaction is expired
ERROR: AcceptToMemoryPool: ContextualCheckTransaction failed

EDIT: Re-indexing cleared the error.

1 Like
1 Like

Not sure if this helps but I’ve been experimenting, starting & stopping zcashd every few minutes :-

while :
zcashd --daemon
sleep 300
zcash-cli stop
sleep 120

Its survived 24 hours (lots of cycles), I’m seeing an error “ContextualCheckTransaction(): transaction is expired” in the debug.log BUT its not causing zcashd to abort on startup and everything still works.

Doing the same with ycashd (which I think has the same problem?) and am seeing the same, I’ll leave it running…

So… ‘ctrl-C’ bad, ‘zcash-cli stop’ good ?

1 Like

I always use -stop as opposed to ctl-c to close Zcashd. Think of it like a PC, stop is choosing “shutdown my PC”, where ctl-c is like holding the power button on your PC and can cause errors next time it starts…

1 Like

Absolutely, when you run it in a terminal it says ‘Ctrl-C to exit’, so there’s that… :wink:

I’m just playing with ideas & sharing here. Maybe some subtle timing thing on signal handling is causing a bad shutdown so asking the RPC server nicely could address that.

If its still going on Monday I’ll cycle it with ctrl-C like shutdowns & see what happens.

1 Like