Pages:
Author

Topic: Using the "same" bitcoin on multiple computers (Read 3771 times)

legendary
Activity: 3472
Merit: 4801
maybe this is what makes up many of these early created "mystery blocks" can we come out with a dead mystery bitcoin sniffer? NYC;)
I'm not aware of any "mystery blocks".  What are you talking about?
LOL i think maybe talk to mt. gox and the foundation about those mystery ghost blocks, wait someone will prolly come out with a new improved ghost block cracker sniffer and call it ghostbusters' miner NYC;)

I really should learn to check the posting history of people before I try to maintain a conversation with them.  It would really help me avoid the trolls.
legendary
Activity: 3472
Merit: 4801
maybe this is what makes up many of these early created "mystery blocks" can we come out with a dead mystery bitcoin sniffer? NYC;)

I'm not aware of any "mystery blocks".  What are you talking about?
hero member
Activity: 966
Merit: 526
🐺Dogs for President🐺
why don't you just send them to the other PC via an address.  To be honest the tiny transaction fee would be worth it just to save time messing around IMHO.
newbie
Activity: 14
Merit: 0
where do permanently lost bitcoins go? NYC;)

In the situation being discussed here, they go to the address they were sent to, and then they just stay there.  Since nobody has the private key for that address any longer, they'll simply never be spent again (unless in the future some mathematicians discover serious flaws in all three of the ECDSA, SHA-256, and RIPEMD-160 algorithms).

There are other ways to lose bitcoins whereby they simply vanish from existence, but that is rare, unlikely, and requires a miner to be running some software with a serious bug.


maybe this is what makes up many of these early created "mystery blocks" can we come out with a dead mystery bitcoin sniffer? NYC;)
legendary
Activity: 3472
Merit: 4801
where do permanently lost bitcoins go? NYC;)

In the situation being discussed here, they go to the address they were sent to, and then they just stay there.  Since nobody has the private key for that address any longer, they'll simply never be spent again (unless in the future some mathematicians discover serious flaws in all three of the ECDSA, SHA-256, and RIPEMD-160 algorithms).

There are other ways to lose bitcoins whereby they simply vanish from existence, but that is rare, unlikely, and requires a miner to be running some software with a serious bug.
legendary
Activity: 3472
Merit: 4801
are we allowed to write some new code? what if we all do it at once maybe it's possible to double our btc coinage; basically a forward split to reward all current bitcoin enthusiasts NYC;)

I'm not sure that I understand your question, but sure you can write any code you like.  If it doesn't conform to the current protocol, you'll have to convince everyone to switch to your code or it will be ignored by all your peers.
newbie
Activity: 14
Merit: 0
"Apparently, the backup was taken from the copy running on the other computer, and didn't have the new private keys from the wallet on the computer where they were restoring it.  As such, the bitcoins were permanently lost."


where do permanently lost bitcoins go? NYC;)
newbie
Activity: 14
Merit: 0
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?


are we allowed to write some new code? what if we all do it at once maybe it's possible to double our btc coinage; basically a forward split to reward all current bitcoin enthusiasts NYC;)
hero member
Activity: 546
Merit: 500
Make sure you do a backup or don't delete the original wallet.dat or entire folder until the new one is up and running. As a matter of fact you should have several buckups in different physical locations at all times anyway.

Treat any backup with the same security you would with the actual wallet.dat file.

legendary
Activity: 3472
Merit: 4801
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 short, once you have spent bitcoins from one wallet, you no longer have 2 copies of the same wallet. Instead, you have 2 different wallets that happen to share some keys.

Exactly.  However, for anyone not familliar with the internal workings of Bitcoin-Qt they still have the appearance of 2 copies of the same wallet for the next 100 transactions or so.  Then suddenly the behavior changes, and they don't understand why.
legendary
Activity: 4522
Merit: 3426
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 short, once you have spent bitcoins from one wallet, you no longer have 2 copies of the same wallet. Instead, you have 2 different wallets that happen to share some keys.
full member
Activity: 196
Merit: 100
This method would work, and as you point out is an alternative to using the pywallet tool if you've encountered a double-spend problem.  Unfortunately, this method requires significantly more technical expertise.  It is important to be aware that when J35st3r says "export the private keys from both wallets to a text file", it is implied that you know how to determine the full list of all private keys stored by each wallet.

Actually I would use pywallet to dump the wallet (on the command line as the web interface is just weird). Using an offline computer (likely linux in a VM) due to the risk of exposing the wallet password on the command line (plus any paranoia about pywallet). Then a bit of grepping to extract the private keys. Not so sure about importing back into bitcoin_qt as I'm unfamiliar with the debug interface, but I would hope its scriptable.

PS. I see there is a command line option "bitcoind importprivkey [label] [rescan=true]". It needs an unlocked wallet, so I guess I'd do it offline  to a new unpassworded wallet. Then lock it with a password, copy to an online computer, resync and finally send the entire balance to an address in a further fresh wallet (since all that messing with private keys is bound to expose the risk of theft by malware at some future point).
legendary
Activity: 3472
Merit: 4801
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
But that does not solve the double-spend problem, leaving some coins in limbo.

My solution would be to export the private keys from both wallets to a text file. Do a sort/merge so only one copy of each key exists, then import them into a freshly created wallet. This will then synchronise with the full balance and any double-spends from the old wallets will just die out as the network drops them from the memory pool.

This method would work, and as you point out is an alternative to using the pywallet tool if you've encountered a double-spend problem.  Unfortunately, this method requires significantly more technical expertise.  It is important to be aware that when J35st3r says "export the private keys from both wallets to a text file", it is implied that you know how to determine the full list of all private keys stored by each wallet.
full member
Activity: 196
Merit: 100
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

But that does not solve the double-spend problem, leaving some coins in limbo.

My solution would be to export the private keys from both wallets to a text file. Do a sort/merge so only one copy of each key exists, then import them into a freshly created wallet. This will then synchronise with the full balance and any double-spends from the old wallets will just die out as the network drops them from the memory pool.
legendary
Activity: 3472
Merit: 4801
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

Yes, this would work, and would probably be the easiest way to safely consolidate the two different balances.

Unfortunately, I've read reports here at bitcointalk.org from people trying to recover their bitcoins AFTER trying to resolve the issue on their own without understanding what happened to their wallet.  They tried to restore a backup of their wallet.dat that was created from one of the copies back when the balances were correct.  In doing so, they over-wrote the copy of the wallet.dat that had the incorrect balance, losing any private keys that were in there.  They thought this would be ok, since they had a backup that they thought was good.  Apparently, the backup was taken from the copy running on the other computer, and didn't have the new private keys from the wallet on the computer where they were restoring it.  As such, the bitcoins were permanently lost.

I've also read where someone simply assumed that the wallet with the higher balance was correct.  They copied the wallet.dat from this computer with the higher balance to the computer with the lower balance over-writing the wallet.dat that was there.  This re-synchronized everything and they thought they had fixed the problem.  Then later on closer inspection they suddenly realized that the higher balance wasn't high enough and that some of their balance had disappeared into addresses that they didn't remember ever sending bitcoins to (change addresses from the wallet with the lower balance).  Since the backup that they had was taken from the computer with the higher balance, they no longer had access to the private keys of those change addresses and the bitcoins were permanently lost.

These are just two of the many ways that someone who doesn't understand the risks and doesn't understand the internal workings of Bitcoin-Qt can lose bitcoins while trying to resolve the issue that is created from running multiple copies of Bitcoin-Qt.  Generally, if someone understands the internal workings well enough, then they don't ask if it is possible or safe.  They already know, and know how to do it safely.  As such, I find that it's a pretty safe assumption that if someone is considering running two copies of the same wallet and is asking if it will work, then they don't have the technical expertise to do so safely, and it is best to simply advise against it and warn of the potential to lose bitcoins.
newbie
Activity: 21
Merit: 0
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.
newbie
Activity: 13
Merit: 0
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
legendary
Activity: 3472
Merit: 4801
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.
legendary
Activity: 3472
Merit: 4801
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.
legendary
Activity: 3472
Merit: 4801
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.
Pages:
Jump to: