Bitcoin Forum
December 05, 2016, 08:41:33 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2]  All
  Print  
Author Topic: Using the "same" bitcoin on multiple computers  (Read 3359 times)
_jacQues_
Newbie
*
Offline Offline

Activity: 21



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

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.
1480970493
Hero Member
*
Offline Offline

Posts: 1480970493

View Profile Personal Message (Offline)

Ignore
1480970493
Reply with quote  #2

1480970493
Report to moderator
1480970493
Hero Member
*
Offline Offline

Posts: 1480970493

View Profile Personal Message (Offline)

Ignore
1480970493
Reply with quote  #2

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

Activity: 1624



View Profile
July 03, 2013, 03:19:49 PM
 #22

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.

The quality of posts has dropped to such a low level that all users who are participating in a paid signature campaign are added to my ignore list. If you'd like a copy of the list to improve your browsing experience, you can find it here: https://bitcointalk.org/index.php?topic=973843.0 (Updated 2016-1-4)
J35st3r
Full Member
***
Offline Offline

Activity: 196



View Profile
July 03, 2013, 03:45:58 PM
 #23

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.

1Jest66T6Jw1gSVpvYpYLXR6qgnch6QYU1 NumberOfTheBeast ... go on, give it a try Grin
DannyHamilton
Legendary
*
Offline Offline

Activity: 1624



View Profile
July 03, 2013, 03:52:16 PM
 #24

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.

The quality of posts has dropped to such a low level that all users who are participating in a paid signature campaign are added to my ignore list. If you'd like a copy of the list to improve your browsing experience, you can find it here: https://bitcointalk.org/index.php?topic=973843.0 (Updated 2016-1-4)
J35st3r
Full Member
***
Offline Offline

Activity: 196



View Profile
July 03, 2013, 04:16:52 PM
 #25

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 <bitcoinprivkey> [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).

1Jest66T6Jw1gSVpvYpYLXR6qgnch6QYU1 NumberOfTheBeast ... go on, give it a try Grin
odolvlobo
Legendary
*
Offline Offline

Activity: 1596



View Profile
July 03, 2013, 04:18:43 PM
 #26

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.

Buy bitcoins with cash from somebody near you: LocalBitcoins
Join an anti-signature campaign: DannyHamilton's ignore list
DannyHamilton
Legendary
*
Offline Offline

Activity: 1624



View Profile
July 03, 2013, 04:22:18 PM
 #27

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.

The quality of posts has dropped to such a low level that all users who are participating in a paid signature campaign are added to my ignore list. If you'd like a copy of the list to improve your browsing experience, you can find it here: https://bitcointalk.org/index.php?topic=973843.0 (Updated 2016-1-4)
Trillium
Hero Member
*****
Offline Offline

Activity: 546



View Profile
July 03, 2013, 04:35:40 PM
 #28

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.


BTC:1AaaAAAAaAAE2L1PXM1x9VDNqvcrfa9He6
thermos
Newbie
*
Offline Offline

Activity: 14


Communications/\Bitcoin\/Foundation


View Profile WWW
July 03, 2013, 09:43:33 PM
 #29

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;)

***THE END=BTCITCOINTALK.ORG CENSORSHIP!!!***http://investorshub.advfn.com/$THE-CRYPTOCURRENCY-FORUM-26758/
BTCitcointalk.org 1%ERS manipulate the currency and deceive its user community! http://www.mediabistro.com/insidebitcoins/register.asp?c=bcoinfbpmbBTCRING FACTS!:BTCe mature&respect the research that is done regardless of what you think of it!~ECDSA!
thermos
Newbie
*
Offline Offline

Activity: 14


Communications/\Bitcoin\/Foundation


View Profile WWW
July 03, 2013, 09:55:24 PM
 #30

"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;)

***THE END=BTCITCOINTALK.ORG CENSORSHIP!!!***http://investorshub.advfn.com/$THE-CRYPTOCURRENCY-FORUM-26758/
BTCitcointalk.org 1%ERS manipulate the currency and deceive its user community! http://www.mediabistro.com/insidebitcoins/register.asp?c=bcoinfbpmbBTCRING FACTS!:BTCe mature&respect the research that is done regardless of what you think of it!~ECDSA!
DannyHamilton
Legendary
*
Offline Offline

Activity: 1624



View Profile
July 03, 2013, 09:59:17 PM
 #31

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.

The quality of posts has dropped to such a low level that all users who are participating in a paid signature campaign are added to my ignore list. If you'd like a copy of the list to improve your browsing experience, you can find it here: https://bitcointalk.org/index.php?topic=973843.0 (Updated 2016-1-4)
DannyHamilton
Legendary
*
Offline Offline

Activity: 1624



View Profile
July 03, 2013, 10:01:21 PM
 #32

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.

The quality of posts has dropped to such a low level that all users who are participating in a paid signature campaign are added to my ignore list. If you'd like a copy of the list to improve your browsing experience, you can find it here: https://bitcointalk.org/index.php?topic=973843.0 (Updated 2016-1-4)
thermos
Newbie
*
Offline Offline

Activity: 14


Communications/\Bitcoin\/Foundation


View Profile WWW
July 03, 2013, 10:10:37 PM
 #33

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;)

***THE END=BTCITCOINTALK.ORG CENSORSHIP!!!***http://investorshub.advfn.com/$THE-CRYPTOCURRENCY-FORUM-26758/
BTCitcointalk.org 1%ERS manipulate the currency and deceive its user community! http://www.mediabistro.com/insidebitcoins/register.asp?c=bcoinfbpmbBTCRING FACTS!:BTCe mature&respect the research that is done regardless of what you think of it!~ECDSA!
jonoiv
Sr. Member
****
Offline Offline

Activity: 434



View Profile
July 03, 2013, 10:24:28 PM
 #34

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.

.
DannyHamilton
Legendary
*
Offline Offline

Activity: 1624



View Profile
July 03, 2013, 10:29:45 PM
 #35

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?

The quality of posts has dropped to such a low level that all users who are participating in a paid signature campaign are added to my ignore list. If you'd like a copy of the list to improve your browsing experience, you can find it here: https://bitcointalk.org/index.php?topic=973843.0 (Updated 2016-1-4)
DannyHamilton
Legendary
*
Offline Offline

Activity: 1624



View Profile
July 04, 2013, 02:13:33 AM
 #36

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.

The quality of posts has dropped to such a low level that all users who are participating in a paid signature campaign are added to my ignore list. If you'd like a copy of the list to improve your browsing experience, you can find it here: https://bitcointalk.org/index.php?topic=973843.0 (Updated 2016-1-4)
Pages: « 1 [2]  All
  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!