Author

Topic: Does Pruning alter the wallet.dat (Read 1056 times)

sr. member
Activity: 687
Merit: 269
March 15, 2016, 08:31:35 AM
#8
Note about pruning: it doesn't alter the wallet, but when you have a wallet backup , the backup can become old and pruned node will not open the wallet because it lacks the full blockchain to verify the funds inside the wallet

Not-pruned nodes can open every wallet even old ones.
sr. member
Activity: 687
Merit: 269
March 15, 2016, 08:24:41 AM
#7
1. made a copy of my blockchain (directory bc2)
2. prune it. Happy it works
3. copy bc2 to datadir bc1
4. start my client

When copying/backuping/recovering  the database like this, make sure you have both chainstate/ index/ and the latest (or all) blk00xx.dat rev00xx.dat

In case you fail to do this correctly, bitcoin will throw it away and start synchronizing from start. At this point you should shut it down and make sure again you have all (chainstate/ index/,blk00xx.dat rev00xx.dat) set up correctly


My guess is pruning made something with index-files in .bitcoin - while my datadir is somewhere else. Why this disrupted the wallet.dat remains a mystery for me.

Well wallet for example remembers the longest blockchain. But in general  bitcoin doesn't simply trash wallets like this. It was probalby overwriten by you when you coppied whole .bitcoin folder including the wallet


When playing around with wallets you need to be extra careful and make sure you copy them . moving whole bitcoin folder with wallet in it is a really terrible idea.
sr. member
Activity: 409
Merit: 286
March 14, 2016, 07:18:05 PM
#6
sorry, can't post any log. I think I made something wrong, but am not sure.

here are my steps

1. made a copy of my blockchain (directory bc2)
2. prune it. Happy it works
3. copy bc2 to datadir bc1
4. start my client
5. it didn't work: abort after / while loading index
6. redirecting it to bc2
7. it didn't work
8. redirecting it to ./bitcoin (just for a test)
9. it didn't work
10. loading different .conf, to test if .conf is activated and if I find the directory
...
11.-15. at some time the error-notice vanished and it loaded blockchain from genesis with a brand new wallet.dat with one empty address
16. panic and so on
17. trying every directory, everywhere the same
18. wallet.dat is ~70kb
19. loading my copy: 600 kb
20. realizing my copy is from januar. More panic.
21. spending two days recovering deleted files and crawling them for private keys

My guess is pruning made something with index-files in .bitcoin - while my datadir is somewhere else. Why this disrupted the wallet.dat remains a mystery for me.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
March 14, 2016, 03:42:01 PM
#5
I thought so, too ... but after all my wallet.dat was rewritten with no keys inside. I don't know why I assume I made some mistake, but just want to ask if someone knew more.

Can you post a debug.log or upload it on pastebin if its too large? AFAIK the only part of the code that removes a wallet file is the one that is activated when a corrupted wallet is found. This would show in the log file.
legendary
Activity: 4214
Merit: 1313
March 14, 2016, 09:34:56 AM
#4
I thought so, too ... but after all my wallet.dat was rewritten with no keys inside. I don't know why I assume I made some mistake, but just want to ask if someone knew more.

Hopefully you have a backup (or 2).

If it is something that is reproducible, that could be a bug.  I haven't seen other reports of it though. 

sr. member
Activity: 409
Merit: 286
March 14, 2016, 06:24:42 AM
#3
I thought so, too ... but after all my wallet.dat was rewritten with no keys inside. I don't know why I assume I made some mistake, but just want to ask if someone knew more.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
March 09, 2016, 06:04:34 AM
#2
Hei,

I recently tried to prune my blockchain - it worked great! - but after it, when I switched back to full blockchain, I run into some problems.

One of several possible explanations could be that pruning alters the wallet.dat.

Does anybody know more?

Which problems? AFAIK the only "problem" that is expected is that you have to redownload the blockchain.
sr. member
Activity: 409
Merit: 286
March 09, 2016, 03:25:12 AM
#1
Hei,

I recently tried to prune my blockchain - it worked great! - but after it, when I switched back to full blockchain, I run into some problems.

One of several possible explanations could be that pruning alters the wallet.dat.

Does anybody know more?
Jump to: