Bitcoin Forum
December 09, 2016, 05:23:59 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How recoverable is a wallet?  (Read 1540 times)
Komerad
Newbie
*
Offline Offline

Activity: 4


View Profile
March 06, 2012, 10:41:56 PM
 #1

Hi,


I installed bitcoin, it seems like no account is to be made anywhere...(unless for the miningpools)
So what happens if the computer crashes?
What happens is i get a new computer?

So how does this work then? How do i get the adresses back etc..

Regards
1481304239
Hero Member
*
Offline Offline

Posts: 1481304239

View Profile Personal Message (Offline)

Ignore
1481304239
Reply with quote  #2

1481304239
Report to moderator
1481304239
Hero Member
*
Offline Offline

Posts: 1481304239

View Profile Personal Message (Offline)

Ignore
1481304239
Reply with quote  #2

1481304239
Report to moderator
1481304239
Hero Member
*
Offline Offline

Posts: 1481304239

View Profile Personal Message (Offline)

Ignore
1481304239
Reply with quote  #2

1481304239
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481304239
Hero Member
*
Offline Offline

Posts: 1481304239

View Profile Personal Message (Offline)

Ignore
1481304239
Reply with quote  #2

1481304239
Report to moderator
Zombie
Jr. Member
*
Offline Offline

Activity: 42



View Profile
March 06, 2012, 10:57:08 PM
 #2

I would like to know this too. Shocked
ykasot
Newbie
*
Offline Offline

Activity: 14


View Profile
March 07, 2012, 12:00:28 AM
 #3

You have to backup the wallet.dat file.
If you don't have a backup, and lose the file or lose the keys contained in the file, your bitcoins are lost.

Also look on stackexchange: How should you backup your wallet?.

I don't know what happens if the computer crashes while having wallet.dat opened or while writing into wallet.dat file.
draco49
Newbie
*
Offline Offline

Activity: 24



View Profile WWW
March 07, 2012, 02:08:38 AM
 #4

Quote
I installed bitcoin, it seems like no account is to be made anywhere...(unless for the miningpools)
So what happens if the computer crashes?
What happens is i get a new computer?

Assuming you are using the "official" bitcoin client from http://bitcoin.org, your wallet file (wallet.dat) is located in the following location:
Windows: 
Code:
C:\Users\<username>\AppData\Roaming\Bitcoin\
Linux:       
Code:
/home/<username>/.bitcoin/

You should backup your wallet.dat file on a regular basis, and especially after large transactions.  I recommend backing up to a USB drive or other off-line storage.

If your computer crashes and you lose your wallet.dat, the Bitcoins it contains are gone forever unless you've taken the time to create backups.

Coming Soon | bitmax.co (http://bitmax.co) | the weekly bitcoin lottery

** I use BitVPS.com (http://BitVPS.com) - You should too! **
Komerad
Newbie
*
Offline Offline

Activity: 4


View Profile
March 07, 2012, 08:16:17 PM
 #5

Thx for the reply.
I asume this also implies that you cant use the same wallet on different computers.
RodeoX
Legendary
*
Offline Offline

Activity: 2114


The revolution will be monetized!


View Profile
March 07, 2012, 08:23:59 PM
 #6

Thx for the reply.
I asume this also implies that you cant use the same wallet on different computers.
That is correct. The wallet.dat is like a real wallet. Lose it and you have lost the money inside. Put it in another install of the client, and it is like putting it into a different pocket.

The gospel according to Satoshi - https://bitcoin.org/bitcoin.pdf

Free bitcoin=https://bitcointalk.org/index.php?topic=1610684
Matthew N. Wright
Untrustworthy
Hero Member
*****
Offline Offline

Activity: 588


Hero VIP ultra official trusted super staff puppet


View Profile
March 07, 2012, 09:04:30 PM
 #7

Re: How recoverable is a wallet?

I found my wallet last week in my pants in the laundry.

gadsdengraphics
Member
**
Offline Offline

Activity: 88


View Profile
March 07, 2012, 10:19:45 PM
 #8

Thx for the reply.
I asume this also implies that you cant use the same wallet on different computers.
That is correct. The wallet.dat is like a real wallet. Lose it and you have lost the money inside. Put it in another install of the client, and it is like putting it into a different pocket.

Sorta Smiley

The wallet.dat actually contains a collection of private keys - every key that you have with coins attached, and a pool of about 100 "future" keys. Each time you send money, you burn a key. If you copied your wallet.dat to another PC, at first both PCs would be in sync. After 100 transactions on one or both PCs, though, the keys being used would not be in the other's wallet.dat, thereby branching your PCs into two distinct wallets, with only those coins that had not moved since the original pool of 100 keys was used up in common.

Thus, you can safely back up your wallet and restore to another PC - but you should back up regularly, as an old wallet doesn't have your new keys in it.

I despise the concept of a "wallet" - it's just a file of private keys. From the context of the bitcoin network, "wallets" don't exist - only transactions, which are based on the application of a private key.
gadsdengraphics
Member
**
Offline Offline

Activity: 88


View Profile
March 07, 2012, 10:22:48 PM
 #9

Thx for the reply.
I asume this also implies that you cant use the same wallet on different computers.

It's not recommended to use the same wallet in multiple computers at the same time though. Without going into a long explanation, you can end up with coins that can't be spent on other copies of the wallet, meaning your backups would not hold all of your funds.

Uhhh... I think I went into the long explanation. Sorry Smiley
draco49
Newbie
*
Offline Offline

Activity: 24



View Profile WWW
March 08, 2012, 12:16:39 AM
 #10

It might be worth noting that, if you are running a dual-boot machine (linux & windows), you can have both use a common wallet and blockchain using symbolic links.

1)  Setup bitcoin-qt on your Windows install and create (and encrypt!) your wallet.  Allow your bitcoin client time to FULLY synchronize and download the entire blockchain (look for the green check-mark in the bottom-right corner of the bitcoin client).

2)  Reboot into linux and install bitcoin-qt.

3)  Start up your linux bitcoin client (which will create the .bitcoin dir and the initial data files).  Don't bother waiting for the blockchain to sync this time; Just wait until the program fully loads, and then exit.

4)  Now open up a terminal and change to the .bitcoin dir:
Code:
draco49@vps1:~$ cd .bitcoin/

5)  Get rid of the data files in the .bitcoin dir (wallet.dat, blk0001.dat, blkindex.dat):
Code:
draco49@vps1:~/.bitcoin$ rm *.dat

6)  Create the symbolic links to the data files from your Windows install:
Code:
draco49@vps1:~/.bitcoin$ ln -s /media/OS/Users/<username>/AppData/Roaming/Bitcoin/wallet.dat ./wallet.dat
draco49@vps1:~/.bitcoin$ ln -s /media/OS/Users/<username>/AppData/Roaming/Bitcoin/blk0001.dat ./blk0001.dat
draco49@vps1:~/.bitcoin$ ln -s /media/OS/Users/<username>/AppData/Roaming/Bitcoin/blkindex.dat ./blkindex.dat

7)  Re-launch the bitcoin client. After a fast startup (since we already downloaded the blockchain in the Windows install), you should be greeted with the wallet you created earlier in Windows.  Now, you can switch back and forth from your Windows install to your linux install while maintaining a single wallet and blockchain.

Some important notes about these instructions...
The code examples are just that - examples.  You will need to make sure that you use your windows username where <username> appears in the code, and also make sure that you correctly reference your Windows drive.  /media/OS/ is where my specific Windows(NTFS) drive is mounted, but yours could be different.  If you're not sure, use your GUI file browser to navigate to your Windows drive and note its full path.

To reduce the risk of wallet corruption, always make sure to allow bitcoin to fully shutdown and exit before rebooting your system.  Also, and I can't stress this enough, backup your wallet.dat file on a regular basis and after large transactions to an offline device (eg. USB drive, old netbook, cloud storage, etc...). 

Coming Soon | bitmax.co (http://bitmax.co) | the weekly bitcoin lottery

** I use BitVPS.com (http://BitVPS.com) - You should too! **
gadsdengraphics
Member
**
Offline Offline

Activity: 88


View Profile
March 08, 2012, 12:27:27 AM
 #11

It might be worth noting that, if you are running a dual-boot machine (linux & windows), you can have both use a common wallet and blockchain using symbolic links.

1)  Setup bitcoin-qt on your Windows install and create (and encrypt!) your wallet.  Allow your bitcoin client time to FULLY synchronize and download the entire blockchain (look for the green check-mark in the bottom-right corner of the bitcoin client).

2)  Reboot into linux and install bitcoin-qt.

3)  Start up your linux bitcoin client (which will create the .bitcoin dir and the initial data files).  Don't bother waiting for the blockchain to sync this time; Just wait until the program fully loads, and then exit.

4)  Now open up a terminal and change to the .bitcoin dir:
Code:
draco49@vps1:~$ cd .bitcoin/

5)  Get rid of the data files in the .bitcoin dir (wallet.dat, blk0001.dat, blkindex.dat):
Code:
draco49@vps1:~/.bitcoin$ rm *.dat

6)  Create the symbolic links to the data files from your Windows install:
Code:
draco49@vps1:~/.bitcoin$ ln -s /media/OS/Users/<username>/AppData/Roaming/Bitcoin/wallet.dat ./wallet.dat
draco49@vps1:~/.bitcoin$ ln -s /media/OS/Users/<username>/AppData/Roaming/Bitcoin/blk0001.dat ./blk0001.dat
draco49@vps1:~/.bitcoin$ ln -s /media/OS/Users/<username>/AppData/Roaming/Bitcoin/blkindex.dat ./blkindex.dat

7)  Re-launch the bitcoin client. After a fast startup (since we already downloaded the blockchain in the Windows install), you should be greeted with the wallet you created earlier in Windows.  Now, you can switch back and forth from your Windows install to your linux install while maintaining a single wallet and blockchain.

Some important notes about these instructions...
The code examples are just that - examples.  You will need to make sure that you use your windows username where <username> appears in the code, and also make sure that you correctly reference your Windows drive.  /media/OS/ is where my specific Windows(NTFS) drive is mounted, but yours could be different.  If you're not sure, use your GUI file browser to navigate to your Windows drive and note its full path.

To reduce the risk of wallet corruption, always make sure to allow bitcoin to fully shutdown and exit before rebooting your system.  Also, and I can't stress this enough, backup your wallet.dat file on a regular basis and after large transactions to an offline device (eg. USB drive, old netbook, cloud storage, etc...). 

Great instructions.

I'll also add that your wallet.dat is the file containing your private keys - everything else is just the blockchain, which you can download again if necessary.

When I used the Satoshi client, I kept my wallet.dat in a small truecrypt container, which I then uploaded to Dropbox.
draco49
Newbie
*
Offline Offline

Activity: 24



View Profile WWW
March 08, 2012, 01:56:03 AM
 #12

Quote
Great instructions.

I'll also add that your wallet.dat is the file containing your private keys - everything else is just the blockchain, which you can download again if necessary.

When I used the Satoshi client, I kept my wallet.dat in a small truecrypt container, which I then uploaded to Dropbox.

That's absolutely correct.  The wallet.dat file is the only file you need to backup and protect. The symlinks facilitating a single blockchain and index are basically for speed and resource optimization.

Coming Soon | bitmax.co (http://bitmax.co) | the weekly bitcoin lottery

** I use BitVPS.com (http://BitVPS.com) - You should too! **
RodeoX
Legendary
*
Offline Offline

Activity: 2114


The revolution will be monetized!


View Profile
March 08, 2012, 02:35:48 PM
 #13

Thx for the reply.
I asume this also implies that you cant use the same wallet on different computers.
That is correct. The wallet.dat is like a real wallet. Lose it and you have lost the money inside. Put it in another install of the client, and it is like putting it into a different pocket.

Sorta Smiley

The wallet.dat actually contains a collection of private keys - every key that you have with coins attached, and a pool of about 100 "future" keys. Each time you send money, you burn a key. If you copied your wallet.dat to another PC, at first both PCs would be in sync. After 100 transactions on one or both PCs, though, the keys being used would not be in the other's wallet.dat, thereby branching your PCs into two distinct wallets, with only those coins that had not moved since the original pool of 100 keys was used up in common.

Thus, you can safely back up your wallet and restore to another PC - but you should back up regularly, as an old wallet doesn't have your new keys in it.

I despise the concept of a "wallet" - it's just a file of private keys. From the context of the bitcoin network, "wallets" don't exist - only transactions, which are based on the application of a private key.
All true. But I didn't want to get into the weeds and confuse a simple question with a alien answer. I try to imagine I'm explaining it to my Mom.  Wink

The gospel according to Satoshi - https://bitcoin.org/bitcoin.pdf

Free bitcoin=https://bitcointalk.org/index.php?topic=1610684
kunibopl
Full Member
***
Offline Offline

Activity: 184


View Profile
March 08, 2012, 06:50:28 PM
 #14

Thx for the reply.
I asume this also implies that you cant use the same wallet on different computers.

It's not recommended to use the same wallet in multiple computers at the same time though. Without going into a long explanation, you can end up with coins that can't be spent on other copies of the wallet, meaning your backups would not hold all of your funds.

is there a further explanation? link maybe?

NXT: 5231236538923913892
ManaUser
Jr. Member
*
Offline Offline

Activity: 30


View Profile
March 08, 2012, 09:01:29 PM
 #15

If I understand correctly (someone please correct me if not) any address you have used before copying the wallet will be perfectly accessible from either copy. As will any coins sent to those addresses, regardless of whether they were sent before or after the split. Speaking as a fairly new user myself, this I think is all most new users would expect, and that part is fine. What is not immediately apparent is that the wallet contains an additional 100 addresses pregenerated for later use. This means when you "add" a new address, it actually takes it from the pregenerated pool. The first 100 address* you add to one wallet will already exist in the copy. Handy, but not perfect. After you go through the 100 address*, then it has to start creating new ones, which won't be in the copy. That's still not terrible, but if you burn through 100 address* on both the original and the copy, then neither wallet will contain a complete set of addresses, that means some Bitcoins will only be available in one or the other (and some will be in both), which does sound like a rather confusing situation.
*I understand some are used up for behind-the-scenes purposes, so you shouldn't expect a full 100 to use directly yourself.

So (again, assuming I've understood all this right myself) it looks like all you would need to avoid these problems is to make one copy your "Primary" wallet, and regularly replace the others with fresh copies of it.

But there's another problem it won't fix. That pregenerated address pool can be helpful, but it can also get you in trouble. Because when you add a "new" address in one copy of the wallet it might already be one you used in a different copy. That could be confusing, e.g. if you unknowingly give the same address to but both Alice and Bob to accept a 5 BTC payment from each, and 5 BTC appears, you might at first thing they both paid, but then you realize it's the same address and you've only been paid once... but by whom?
gadsdengraphics
Member
**
Offline Offline

Activity: 88


View Profile
March 09, 2012, 12:05:52 AM
 #16

If I understand correctly (someone please correct me if not) any address you have used before copying the wallet will be perfectly accessible from either copy. As will any coins sent to those addresses, regardless of whether they were sent before or after the split. Speaking as a fairly new user myself, this I think is all most new users would expect, and that part is fine. What is not immediately apparent is that the wallet contains an additional 100 addresses pregenerated for later use. This means when you "add" a new address, it actually takes it from the pregenerated pool. The first 100 address* you add to one wallet will already exist in the copy. Handy, but not perfect. After you go through the 100 address*, then it has to start creating new ones, which won't be in the copy. That's still not terrible, but if you burn through 100 address* on both the original and the copy, then neither wallet will contain a complete set of addresses, that means some Bitcoins will only be available in one or the other (and some will be in both), which does sound like a rather confusing situation.
*I understand some are used up for behind-the-scenes purposes, so you shouldn't expect a full 100 to use directly yourself.

So (again, assuming I've understood all this right myself) it looks like all you would need to avoid these problems is to make one copy your "Primary" wallet, and regularly replace the others with fresh copies of it.

But there's another problem it won't fix. That pregenerated address pool can be helpful, but it can also get you in trouble. Because when you add a "new" address in one copy of the wallet it might already be one you used in a different copy. That could be confusing, e.g. if you unknowingly give the same address to but both Alice and Bob to accept a 5 BTC payment from each, and 5 BTC appears, you might at first thing they both paid, but then you realize it's the same address and you've only been paid once... but by whom?

All correct.

Another thing to take into account is that with the Satoshi client, a new key is used for sending as well as when you generate a new receiving address.

Example: You have 1 BTC on a key, which we'll call key #1.  You send .8 BTC to Bob, who has key #2. With the Satoshi client, you are actually making two exchanges:
  • from key #1 to key #2 for .8 BTC
  • from key #1 to key #3 for .2 BTC
Afterwards, key #1 is empty, key #2 (Bob's key) has an additional .8 BTC, and your client pulls an address out of pool to use as key #3, which gets the "change" of .2 BTC from the transaction.

I'm not really sure why this design decision was made - I suppose it does add some small amount of obscurity, since there is no way to tell if the transaction was for .8 BTC or for .2 BTC, but it doesn't seem worthwhile to me. The mobile client I use, Bitcoin Spinner, uses one address from start to finish.  To accept payments, I'll sometimes pop onto instawallet and make a new wallet for the transaction.  Once it goes through, I forward the proceeds on to my primary address, to avoid the "who just paid me?" issue, above.

Bitcoin is complex, but not complicated (if that makes sense).
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!