Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: ManaUser on November 05, 2013, 02:31:46 AM



Title: Bitcoin-qt - All them files...
Post by: ManaUser on November 05, 2013, 02:31:46 AM
I'm trying to figure out which files used by Bitcoin-qt relate to my personal "accounts" and which only relate to the blockchain and such. I've read the data directory (https://en.bitcoin.it/wiki/Data_directory) wiki article (and the Stack Exchange post it links to), but I found parts of the explanation somewhat less than enlightening.

Obviously I know what wallet.dat is, and I know that's the only file I absolutely need to back up, or copy if I'm moving to a new machine. But does it contain all of "my stuff"? Like the names I've assigned to certain addresses and such?

I'm also interested in the reverse situation. Say I want to set an acquaintance up with a ready to go bitcoin-qt install and save him the annoyance of waiting for it to sync. What's the minimum I can copy and save him a bunch of time. Are just the blk*.dat files enough? And conversely, is there anything other than wallet.dat that I should definitely not copy? Since (hypothetically) I don't know him that well, I would want to ensure no trace at all of my personal bitcoin activity is left behind.

Sorry if this is all a bit noobish, but I've looked around and I haven't found a really clear answer anywhere.


Title: Re: Bitcoin-qt - All them files...
Post by: DannyHamilton on November 05, 2013, 12:45:39 PM
- snip -
Obviously I know what wallet.dat is,
- snip -
does it contain all of "my stuff"? Like the names I've assigned to certain addresses and such?
- snip -

Yes.

- snip -
I'm also interested in the reverse situation. Say I want to set an acquaintance up with a ready to go bitcoin-qt install and save him the annoyance of waiting for it to sync. What's the minimum I can copy and save him a bunch of time. Are just the blk*.dat files enough? And conversely, is there anything other than wallet.dat that I should definitely not copy? Since (hypothetically) I don't know him that well, I would want to ensure no trace at all of my personal bitcoin activity is left behind.
- snip -

I'm not as confident in answering these questione, so I'll leave them for someone else to answer.


Title: Re: Bitcoin-qt - All them files...
Post by: IsaacGoldbourne on November 05, 2013, 03:45:42 PM
- snip -
Obviously I know what wallet.dat is,
- snip -
does it contain all of "my stuff"? Like the names I've assigned to certain addresses and such?
- snip -

Yes.

- snip -
I'm also interested in the reverse situation. Say I want to set an acquaintance up with a ready to go bitcoin-qt install and save him the annoyance of waiting for it to sync. What's the minimum I can copy and save him a bunch of time. Are just the blk*.dat files enough? And conversely, is there anything other than wallet.dat that I should definitely not copy? Since (hypothetically) I don't know him that well, I would want to ensure no trace at all of my personal bitcoin activity is left behind.
- snip -

I'm not as confident in answering these questione, so I'll leave them for someone else to answer.
Wallet.dat is the only one that will enable people to take your coins.


Title: Re: Bitcoin-qt - All them files...
Post by: DannyHamilton on November 05, 2013, 04:10:20 PM
Wallet.dat is the only one that will enable people to take your coins.

Certainly, but that wasn't the question now, was it?


Title: Re: Bitcoin-qt - All them files...
Post by: ManaUser on November 05, 2013, 05:41:58 PM
- snip -
Obviously I know what wallet.dat is,
- snip -
does it contain all of "my stuff"? Like the names I've assigned to certain addresses and such?
- snip -

Yes.
That does make me feel a bit more confident. If all the obvious stuff is in there, presumably it's not also any other files.

Wallet.dat is the only one that will enable people to take your coins.
Yeah, I knew that much already. But still when dealing with computer security such I'd rather be too careful than not careful enough. So I don't want the copy linked to me in any way. For instance, I could easily imagine that some of those files might have my personal spend transactions recorded in a different order since my client knows about them before anyone else. (No idea if that's actually true, but that's the kind of thing I'm wondering about.) I like the fact that Bitcoin is pseudonymous, and want to keep it that way.

I realize of course that if I seriously got in the habit of handing out copies of this stuff I could simply make a clean install and download the whole monster database again. This is mostly hypothetical (although I could see it happening) I just feel uncomfortable having this huge chunk of data and not knowing whether I should regard any of it as sensitive or not. It's like I've got my house key attached to a car tire plus a half dozen other bits and bobs that I don't completely understand the use of.


Title: Re: Bitcoin-qt - All them files...
Post by: CIYAM on November 05, 2013, 05:45:33 PM
Only wallet.dat has sensitive information - the blockchain files are what is shared across the P2P network (so are entirely public).

If paranoid then you might want to also check about BDB files - as presumably some wallet changes could be kept in those and not cleaned up if the client didn't close down properly.

The only other possible file to be concerned with (in regards to security) could be the config file (if you've edited it to put in the RPC credentials).


Title: Re: Bitcoin-qt - All them files...
Post by: ManaUser on November 05, 2013, 10:21:30 PM
So to answer the last part of my question I did a little experimentation myself. It seems if I copy just the block subfolder (including blocks/index) it still takes ages to start up, well at least an hour, I lost patience after that. But if I copy blocks/ and chainstate/ it starts up reasonably fast. Just a few minutes.

So I guess that's what I'd do if this ever comes up. No one can think of any problem with sharing the chainstate folder, right?


Title: Re: Bitcoin-qt - All them files...
Post by: grue on November 06, 2013, 03:01:44 AM
So to answer the last part of my question I did a little experimentation myself. It seems if I copy just the block subfolder (including blocks/index) it still takes ages to start up, well at least an hour, I lost patience after that. But if I copy blocks/ and chainstate/ it starts up reasonably fast. Just a few minutes.

So I guess that's what I'd do if this ever comes up. No one can think of any problem with sharing the chainstate folder, right?
yes, totally safe


Title: Re: Bitcoin-qt - All them files...
Post by: theymos on November 06, 2013, 03:08:18 AM
Wallet.dat is the only one that will enable people to take your coins.

I'm not so sure about this. I think that there may sometimes be BDB-related files there which could leak keys.

debug.log can probably be used to figure out which transactions are yours.


Title: Re: Bitcoin-qt - All them files...
Post by: ManaUser on November 06, 2013, 03:31:36 AM
Thanks. I decided it would make more sense to go with the minimum that works, instead of worrying about all that.


Title: Re: Bitcoin-qt - All them files...
Post by: Abdussamad on November 06, 2013, 12:02:25 PM
Set your friend up with electrum or some other thin client. A new user is not going to have the patience for bitcoin-qt. Even bitcoin.org now lists multibit as the first wallet.


Title: Re: Bitcoin-qt - All them files...
Post by: ManaUser on November 07, 2013, 04:29:08 AM
While that might be good advice, it wasn't really the point. I  just wanted to understand how this works better in case it came up. You're right though, the classic client really is looking increasingly clunky.


Title: Re: Bitcoin-qt - All them files...
Post by: michagogo on November 09, 2013, 08:52:40 PM
Having blocks/index/ isn't helpful without chainstate, since you need both and they're generated in the same operation. If you're bootstrapping a node from another, fully trusted node, then yes, you can copy the blocks and chainstate folders from a node that's shutdown and you'll have it ready to go. Do keep in mind that that involves taking the source node's word for it, in terms of the indices. There's no reason to copy over the various log files, nor peers.dat. And yes, wallet.dat does include metadata, sich as address labels.