Bitcoin Forum
November 13, 2024, 07:12:33 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Using the "same" bitcoin on multiple computers  (Read 3755 times)
Dilbert (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
June 12, 2011, 12:26:33 PM
 #1

The question has probably been asked previously, but I am new to bitcoin
and I don't see any help about this.
How do you "transport" a bitcoin environment from computer to computer
so as not to have to reload again all blocks from the internet?
Is it OK to simply copy and paste the "Bitcoin" directory from one computer to the other?
(I am using Windows on a PC)
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1280


May Bitcoin be touched by his Noodly Appendage


View Profile
June 12, 2011, 12:28:50 PM
 #2

The only file to copy (I don't know where it is on Windows though) is wallet.dat
But take care of it, anyone having this file can access your accounts

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
error
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
June 12, 2011, 12:36:26 PM
 #3

You can copy the wallet.dat back and forth, but NEVER attempt to use it on two different computers AT THE SAME TIME, or you risk losing bitcoins forever.

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
SomeoneWeird
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500


View Profile
June 12, 2011, 12:38:13 PM
 #4

The question has probably been asked previously, but I am new to bitcoin
and I don't see any help about this.
How do you "transport" a bitcoin environment from computer to computer
so as not to have to reload again all blocks from the internet?
Is it OK to simply copy and paste the "Bitcoin" directory from one computer to the other?
(I am using Windows on a PC)


If you want to move computers, and not use the original one again, copy everything from %appdata%\Bitcoin\ to the same location on the new computer. Then load the client up on the new computer and check it's working. If it is, delete folder on other pc. Simple. Smiley

If you just want to copy the blockchain across, go into %appdata%\Bitcoin\ and copy the 2 largest files into the same folder on the other computer.
extracool
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
June 12, 2011, 03:46:29 PM
 #5

I was wondering the same thing. Re: if anything happened to me, I want my wife to be able to load my wallet on to her computer. She also has a wallet with some coins on her computer because I had her install the client and sent her some. So I was thinking on the client should be able to manage multiple wallets and have a procedure to import a wallet from something like a flash drive. It would give instructions on proper handling of the wallet on the original computer(u must delete it now and not try to use it).

When you say you can lose your bitcoins if used from two different computers, does that mean just running the client or actually sending the same bitcoin?

What happens if someone steals your computer with your wallet and you have a backup?
When you go to send all your backed up bitcoins to a new address before the thief can, what will happen?
itsagas
Newbie
*
Offline Offline

Activity: 59
Merit: 0


View Profile
June 12, 2011, 03:52:24 PM
 #6


What happens if someone steals your computer with your wallet and you have a backup?
When you go to send all your backed up bitcoins to a new address before the thief can, what will happen?

I am wondering the same thing too. 

The concept of having multiple "savings" wallets is interesting too.  Maybe store your big amounts in a wallet that is in a very safe place (offline) and just load it up to send amounts for spending to your other wallets. 
note235
Full Member
***
Offline Offline

Activity: 193
Merit: 100


View Profile
June 12, 2011, 04:00:14 PM
 #7

oh thats useful, i thought you needed both the public and private keys to keep the bitcoins
SomeoneWeird
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500


View Profile
June 13, 2011, 01:01:00 AM
 #8

oh thats useful, i thought you needed both the public and private keys to keep the bitcoins


You do.
thermos
Newbie
*
Offline Offline

Activity: 14
Merit: 0



View Profile WWW
July 03, 2013, 01:33:43 PM
 #9

You can copy the wallet.dat back and forth, but NEVER attempt to use it on two different computers AT THE SAME TIME, or you risk losing bitcoins forever.


i'm going to try this out and see if they disappear has this bug been squashed? NYC;)
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1280


May Bitcoin be touched by his Noodly Appendage


View Profile
July 03, 2013, 02:12:18 PM
 #10

You can copy the wallet.dat back and forth, but NEVER attempt to use it on two different computers AT THE SAME TIME, or you risk losing bitcoins forever.
Lol stop the FUD

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4847



View Profile
July 03, 2013, 02:35:14 PM
 #11

How do you "transport" a bitcoin environment from computer to computer
so as not to have to reload again all blocks from the internet?

You didn't specify, so I'm assuming you are asking about the Bitcoin-Qt wallet. Copy and paste the entire contents of the "Bitcoin" directory from one computer to the other.
If you are asking about Electrum, MultiBit, or Armory, then the process might be different.

Is it OK to simply copy and paste the "Bitcoin" directory from one computer to the other?

Yes.  Keep in mind that you should then stop using the wallet on the old computer.  Attempting to use the same Bitcoin-Qt wallet on multiple computers is a recipe for disaster and carries a high risk of permanent loss of bitcoins.

The only file to copy (I don't know where it is on Windows though) is wallet.dat

This is not true if you don't want to "have to reload again all blocks from the internet".  To avoid reloading all the blocks, you also have to copy the entire blockchain.

If you want to move computers, and not use the original one again, copy everything from %appdata%\Bitcoin\ to the same location on the new computer. Then load the client up on the new computer and check it's working. If it is, delete folder on other pc. Simple. Smiley

Correct.  That is the Windows directory you would need to copy.

If you just want to copy the blockchain across, go into %appdata%\Bitcoin\ and copy the 2 largest files into the same folder on the other computer.

Depending on the version of Bitcoin-Qt that you are copying, you may need to copy more than just 2 files.

So I was thinking on the client should be able to manage multiple wallets and have a procedure to import a wallet from something like a flash drive.

This can be done with the Armory wallet.  Bitcoin-Qt is not designed to be used in this way.

When you say you can lose your bitcoins if used from two different computers, does that mean just running the client or actually sending the same bitcoin?

Sending any bitcoins from both wallets, it doesn't have to be the "same" bitcoin.  There are a variety of potential issues since Bitcoin-Qt doesn't let you choose which bitcoins you are sending.  The Bitcoin-Qt wallet is not designed to stay synchronized with a second copy of the same wallet.  One of the biggest issues you are likely to run into is caused by the way the Bitcoin-Qt wallet handles the "change" from transactions.  After you send enough transactions, you'll start to see extra bitcoins vanish out of the copy of the wallet that didn't send the transaction.  If you send transactions from both copies of the wallet, you'll eventually see the two wallets showing completely different balances.  Trying to get them re-synchronized without permanently losing some of those bitcoins will be a complicated process that will carry a risk of permanent loss if you make a mistake.

What happens if someone steals your computer with your wallet and you have a backup?
When you go to send all your backed up bitcoins to a new address before the thief can, what will happen?

If you simply create a new address in the wallet that the thief has a copy of, he'll still be able to steal them.  You need to create a new address in a completely new wallet.  Then send the entire balance from the old wallet to the new wallet.  If you can accomplish this before the thief has transferred the bitcoins to his own wallet, then they will be secure.  Of course, this all assumes that you have some way of knowing that a thief has a copy of your wallet before he transfers the bitcoins.

oh thats useful, i thought you needed both the public and private keys to keep the bitcoins
You do.

No.  The only thing you need is the private keys.  The public keys (and addresses) can be calculated from the private keys. It is important to be absolutely certain that you have the correct private keys though.  Bitcoin-Qt stores many of your bitcoins in addresses that it doesn't tell you about.  If you only have the private keys of the addresses that are in the "Receive Coins" section of your wallet GUI, then you probably don't have everything you need.  The easiest way to be certain that you have all the necessary private keys is to create a backup of the wallet.dat file on a regular basis (perhaps every 25 transactions or so) and store multiple backups (perhaps the 3 most recent backups).

You can copy the wallet.dat back and forth, but NEVER attempt to use it on two different computers AT THE SAME TIME, or you risk losing bitcoins forever.
i'm going to try this out and see if they disappear has this bug been squashed? NYC;)

It isn't so much a "bug" as it is using the wallet in a way that it was not intended to be used.  It was not designed to remain synchronized with multiple copies of the same wallet.dat file.  You are welcome to try it out if you like.  It will most likely appear to be working just fine for a while.  After you send 100 transactions or so, you'll see the risk of bitcoin loss jump significantly.

Here's a scenario where you can potentially run into double-spend issues:

  • Create two copies of a brand new wallet.dat file running one on each of two computers (copy_A and copy_B)
  • Send a single transaction of 2 BTC to a single address that exists in both copies of the wallet
  • Wait for the transaction to get 6 confirmations
  • Put copy_A into an offline state (disconnect the network cable, turn off the computer, or simply shut down the Bitcoin-Qt software)
  • Keep copy_B online
  • Wait a few days so that the blockchain in copy_A falls behind on synchronization
  • Send a 0.5 BTC transaction from copy_B to some other address that is not part of these two wallets
  • See that the balance on copy_B has dropped to 1.5 BTC
  • Bring copy_A online
  • See that the balance on copy_A is still 2 BTC
  • Send a transaction from copy_A  to some other address that is not part of these two wallets before copy_A catches up in synchronization

This process will result in a double-spend problem in copy_A.  It will reduce the balance in copy_A, and will show the transaction in the transaction list, but it will never confirm.

You can copy the wallet.dat back and forth, but NEVER attempt to use it on two different computers AT THE SAME TIME, or you risk losing bitcoins forever.
Lol stop the FUD

FUD?  You are aware that Bitcoin-Qt is not designed for this and that there is a significant risk of permanent loss of bitcoins if you do so, right?
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1280


May Bitcoin be touched by his Noodly Appendage


View Profile
July 03, 2013, 02:41:40 PM
 #12

The only file to copy (I don't know where it is on Windows though) is wallet.dat
This is not true if you don't want to "have to reload again all blocks from the internet".  To avoid reloading all the blocks, you also have to copy the entire blockchain.
Indeed

You can copy the wallet.dat back and forth, but NEVER attempt to use it on two different computers AT THE SAME TIME, or you risk losing bitcoins forever.
Lol stop the FUD
FUD?  You are aware that Bitcoin-Qt is not designed for this and that there is a significant risk of permanent loss of bitcoins if you do so, right?
Permanent loss requires you to lose the private key associated. Please tell me how is it possible to lose the key when you have 2 copies of the wallet containing it?

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
thermos
Newbie
*
Offline Offline

Activity: 14
Merit: 0



View Profile WWW
July 03, 2013, 02:47:15 PM
 #13

The only file to copy (I don't know where it is on Windows though) is wallet.dat
This is not true if you don't want to "have to reload again all blocks from the internet".  To avoid reloading all the blocks, you also have to copy the entire blockchain.
Indeed

You can copy the wallet.dat back and forth, but NEVER attempt to use it on two different computers AT THE SAME TIME, or you risk losing bitcoins forever.
Lol stop the FUD
FUD?  You are aware that Bitcoin-Qt is not designed for this and that there is a significant risk of permanent loss of bitcoins if you do so, right?
Permanent loss requires you to lose the private key associated. Please tell me how is it possible to lose the key when you have 2 copies of the wallet containing it?


i need to find a reputable bitcoin locksmith to cut some keys for us NYC;)
airbit
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
July 03, 2013, 02:53:04 PM
 #14

The more I learn about bitcoin the more concerned I am about the potential. The average person can barely handle fiat money, but bitcoins will be a disaster in the hands of most people.
_jacQues_
Newbie
*
Offline Offline

Activity: 21
Merit: 0



View Profile
July 03, 2013, 02:55:31 PM
 #15

Here's a scenario where you can potentially run into double-spend issues:

  • Create two copies of a brand new wallet.dat file running one on each of two computers (copy_A and copy_B)
  • Send a single transaction of 2 BTC to a single address that exists in both copies of the wallet
  • Wait for the transaction to get 6 confirmations
  • Put copy_A into an offline state (disconnect the network cable, turn off the computer, or simply shut down the Bitcoin-Qt software)
  • Keep copy_B online
  • Wait a few days so that the blockchain in copy_A falls behind on synchronization
  • Send a 0.5 BTC transaction from copy_B to some other address that is not part of these two wallets
  • See that the balance on copy_B has dropped to 1.5 BTC
  • Bring copy_A online
  • See that the balance on copy_A is still 2 BTC
  • Send a transaction from copy_A  to some other address that is not part of these two wallets before copy_A catches up in synchronization

This process will result in a double-spend problem in copy_A.  It will reduce the balance in copy_A, and will show the transaction in the transaction list, but it will never confirm.

So if you have 2 copies of the same wallet.dat (at least; the same when originally copied), it is possible to lose Bitcoins this way. Wow, that's news to me. I've been using 2 copies of my wallet.dat for a long time now and never noticed any issues.

In that scenario would an older backup of wallet.dat regain those lost Bitcoins by simply letting it synchronize? Or does the other copy receive the same transaction and lose the Bitcoins as well?

Is it always perfectly safe to use 2 copies if you wait for complete synchronization before sending any Bitcoins to anyone? (This is what I've done till now)
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4847



View Profile
July 03, 2013, 02:57:45 PM
 #16

You can copy the wallet.dat back and forth, but NEVER attempt to use it on two different computers AT THE SAME TIME, or you risk losing bitcoins forever.
Lol stop the FUD
FUD?  You are aware that Bitcoin-Qt is not designed for this and that there is a significant risk of permanent loss of bitcoins if you do so, right?
Permanent loss requires you to lose the private key associated. Please tell me how is it possible to lose the key when you have 2 copies of the wallet containing it?
[/quote]

The biggest problem arises after 100 addresses have been used.  Since Bitcoin-Qt generates random private keys instead of using a deterministic algorithm, the change from the transaction will be sent to an address that only exists in one copy of the wallet.  As such you no longer have "2 copies" of the private key.  You only have one.  Now if you are sending transactions from both wallets, you'll end up with some bitcoins only associated with addresses in one copy, some bitcoins only associated with addresses in the other copy, and some bitcoins associated with addresses in both copies.  The average non-technical user who has been happily using their two copies of the wallet without seeing any issues suddenly notices that the two copies of the wallet no longer have the same amount of bitcoins, but has no understanding of how or why this has happened.  What they do next to attempt to resolve this issue on their own carries risk of losing the private keys from one of the copies of the wallet (and as such all the bitcoins associated with private keys that only belonged to that "copy").

In addition, since Bitcoin-Qt will let you send transactions when the blockchain is not fully synchronized, it becomes easy to accidentally double-spend the same transaction output.  This results in a reduction in apparent balance, and a transaction that will never confirm.  The user can use the pywallet program to remove the bad transaction from one copy of the wallet if they are aware of that tool, but the point is that the wallet isn't designed to be used in this way you are very likely to end up with a lot of inconvenience.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4847



View Profile
July 03, 2013, 03:00:11 PM
 #17

The more I learn about bitcoin the more concerned I am about the potential. The average person can barely handle fiat money, but bitcoins will be a disaster in the hands of most people.

Bitcoin is still in its infancy.  There is a lot of room for growth in security and usability.  Over time companies will develop that will add a layer of abstraction and remove most if not all the risks that the average non-technical user is likely to otherwise encounter.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4847



View Profile
July 03, 2013, 03:03:07 PM
 #18

Here's a scenario where you can potentially run into double-spend issues:

  • Create two copies of a brand new wallet.dat file running one on each of two computers (copy_A and copy_B)
  • Send a single transaction of 2 BTC to a single address that exists in both copies of the wallet
  • Wait for the transaction to get 6 confirmations
  • Put copy_A into an offline state (disconnect the network cable, turn off the computer, or simply shut down the Bitcoin-Qt software)
  • Keep copy_B online
  • Wait a few days so that the blockchain in copy_A falls behind on synchronization
  • Send a 0.5 BTC transaction from copy_B to some other address that is not part of these two wallets
  • See that the balance on copy_B has dropped to 1.5 BTC
  • Bring copy_A online
  • See that the balance on copy_A is still 2 BTC
  • Send a transaction from copy_A  to some other address that is not part of these two wallets before copy_A catches up in synchronization

This process will result in a double-spend problem in copy_A.  It will reduce the balance in copy_A, and will show the transaction in the transaction list, but it will never confirm.

So if you have 2 copies of the same wallet.dat (at least; the same when originally copied), it is possible to lose Bitcoins this way. Wow, that's news to me. I've been using 2 copies of my wallet.dat for a long time now and never noticed any issues.

In that scenario would an older backup of wallet.dat regain those lost Bitcoins by simply letting it synchronize? Or does the other copy receive the same transaction and lose the Bitcoins as well?

Is it always perfectly safe to use 2 copies if you wait for complete synchronization before sending any Bitcoins to anyone? (This is what I've done till now)

If you don't wait for complete synchronization, you won't lose bitcoins.  You'll just end up with a double spend that will never confirm.  Then you'll have to use a tool like pywallet to fix the wallet.

The real issue arises after you've sent about 100 transactions without replacing one copy of the wallet.dat with the other.    This problem is due to the way Bitcoin-Qt handles address generation and transaction change.  It won't matter if the blockchain is fully synchronized or not. At that time you'll have exhausted the pre-generated address pool, and you'll start to see extra bitcoins disappear out of the wallets.  The problem can be resolved safely if you are careful and know what you are doing.
Robixen
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
July 03, 2013, 03:09:36 PM
 #19

Quote from: DannyHamilton
The real issue arises after you've sent about 100 transactions without replacing one copy of the wallet.dat with the other.    This problem is due to the way Bitcoin-Qt handles address generation and transaction change.  It won't matter if the blockchain is fully synchronized or not. At that time you'll have exhausted the pre-generated address pool, and you'll start to see extra bitcoins disappear out of the wallets.  The problem can be resolved safely if you are careful and know what you are doing.

I guess the best way to resolve this would be making a new wallet->sending to it all bitcoins from the first wallet->waiting for 6 six confirmations->opening the second wallet.dat and sending the remaining bitcoins to the new wallet
_jacQues_
Newbie
*
Offline Offline

Activity: 21
Merit: 0



View Profile
July 03, 2013, 03:12:48 PM
 #20

If you don't wait for complete synchronization, you won't lose bitcoins.  You'll just end up with a double spend that will never confirm.  Then you'll have to use a tool like pywallet to fix the wallet.

The real issue arises after you've sent about 100 transactions without replacing one copy of the wallet.dat with the other.    This problem is due to the way Bitcoin-Qt handles address generation and transaction change.  It won't matter if the blockchain is fully synchronized or not. At that time you'll have exhausted the pre-generated address pool, and you'll start to see extra bitcoins disappear out of the wallets.  The problem can be resolved safely if you are careful and know what you are doing.
Thanks a million for the explanation! I just checked and am still below 100 transactions. Phew...

As I don't fully know what I'm doing I'll stick with one wallet.dat copy for now.
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!