BTCPrivate / BitcoinPrivate-legacy

Bitcoin Private is a Bitcoin and Zclassic fork which uses ZK-SNARK technology for privacy and fungibility.
Other
283 stars 132 forks source link

wallet crashing #236

Open pinpins opened 5 years ago

pinpins commented 5 years ago

even after full resync getting

btcpd: wallet/wallet.cpp:803: void CWallet::DecrementNoteWitnesses(const CBlockIndex*): AssertionnWitnessCacheSize > 0' failed.

`

interbiznw commented 5 years ago

Full resync? Do you mean reindex? rescan? Deleting blocks and doing a full new block download? Please provide more specifics.

laakie commented 5 years ago

same problem here. Reindex / rescan is forced on restart. ( Didn't add the flags to do so ) Hangs on :

2019-10-06 05:09:24 UpdateTip: new best=0000000c5eca6ed4c988cef18da8a702b9784600f3822ad1fd3652814d288b23 height=606789 log2_work=49.791435 tx=56488394 date=2019-09-28 09:36:47 progress=0.998712 cache=10.7MiB(10072tx) btcpd: wallet/wallet.cpp:803: void CWallet::DecrementNoteWitnesses(const CBlockIndex*): Assertion `nWitnessCacheSize > 0' failed.

interbiznw commented 5 years ago

Reindexing and Rescanning are two way different things. As with the previous post going to need more details.

Also, Please provide a paste of more of the debug.log file, preferably with the debug flag ( debug=1 ) on in the config file so it provides more output.

pinpins commented 5 years ago

Full resync? Do you mean reindex? rescan? Deleting blocks and doing a full new block download? Please provide more specifics.

I mean downloaded blockchain from scratch by peers

pinpins commented 5 years ago

How long has this node been running prior to issues? 2 years

Is this node mining or used in a mining pool? mining pool

Is this node used as an explorer or other backend service node? or just for a local wallet? no

Have you manually tried to reindex? if so what were the results? yes, still failing

Have you manually tried to rescan? if so what were the results? yes, still failing

laakie commented 5 years ago

How long has this node been running prior to issues? 1 year

Is this node mining or used in a mining pool? yes

Is this node used as an explorer or other backend service node? or just for a local wallet? no

Have you manually tried to reindex? if so what were the results? yes, same result.

Have you manually tried to rescan? if so what were the results? yes same result

debug.log:

2019-10-08 00:02:30 UpdateTip: new best=0000000b6d3cfda3d4b79065491076eb31eb052185ebb5b77cd2b71e5586935b height=606791 log2_work=49.791435 tx=56488399 date=2019-09-28 09:40:15 progress=0.998418 cache=18.5MiB(12367tx) 2019-10-08 00:02:30 - Disconnect block: 0.20ms 2019-10-08 00:02:30 UpdateTip: new best=00000007d7717a484730727ad7277ae80f0a740f1495f72a3caf3282a66c559d height=606790 log2_work=49.791435 tx=56488396 date=2019-09-28 09:37:42 progress=0.998418 cache=18.5MiB(12366tx) 2019-10-08 00:02:30 - Disconnect block: 0.17ms 2019-10-08 00:02:30 UpdateTip: new best=0000000c5eca6ed4c988cef18da8a702b9784600f3822ad1fd3652814d288b23 height=606789 log2_work=49.791435 tx=56488394 date=2019-09-28 09:36:47 progress=0.998418 cache=18.5MiB(12365tx) btcpd: wallet/wallet.cpp:803: void CWallet::DecrementNoteWitnesses(const CBlockIndex*): Assertion `nWitnessCacheSize > 0' failed.

pinpins commented 5 years ago

any update?

cernael commented 5 years ago

Had the same issue. Made an ugly hack that seems to have worked - it turned out that every time the wallet crashed, it did so after connecting to a node with a fork that was way ahead of us, and then it backpedaled 100 blocks (which is the usual reorg limit for bitcoin-based cryptocurrencies), and then crashed. And every time it did this, the node with the longer fork had the same IP address, 46.101.126.142 (albeit different ports).

So I added the line 127.0.0.1 46.101.126.142 to the /etc/hosts file, thereby blocking the server itself from ever connecting to that IP address. (Worth noting: I run the wallet on a virtual server running Ubuntu 16.4)

This is only a rapport about what seems to have worked for me, not a recommendation towards how the problem should be permanently solved, and so on and so forth. Do make your own research into which IP addresses the nodes that make you crash have, et cetera. I assume no legal liability for providing this information. :-P