Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: TheoryOfBitcoin on September 30, 2013, 01:06:35 AM



Title: Bitcoin copying wallet.dat allows sending coins twice
Post by: TheoryOfBitcoin on September 30, 2013, 01:06:35 AM
I did a small experiment, I copied the wallet.dat and put it on another offline computer. I was able to send the same bitcoins twice! How can this be fixed?


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: IncreaseMyT on September 30, 2013, 01:11:42 AM
you could send them but was the transaction confirmed?


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: spooderman on September 30, 2013, 01:14:44 AM
Once one is confirmed, the other can't be if I'm not mistaken. Is it decided by which client is more updated?


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: franky1 on September 30, 2013, 02:19:00 AM
phone apps can be produced that generate a private key using the IMEI number of a phone. these app's could become the more secure apps that are trusted to send funds without confirms as the private keys wont work unless used on that specific phone. thus if it is confirmed on the phone then sending it somewhere like starbucks, they can instantly see that it cant be double spent.


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: Valerian77 on September 30, 2013, 02:39:53 AM
private key using the IMEI number of a phone. these app's could become the more secure apps

Not sure - I think it is possible to change the IMEI on some phones. That is the way some stolen phones get a new identification.


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: giszmo on September 30, 2013, 03:27:20 AM
Ok, guys, IMEI? please!

OP, which client are you talking about?
Generally sending coins twice should be resolved automatically, so as soon as both clients see which transaction went through, the one that violates this, will be "forgotten". No issue here. Just bring you computer online.


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: jl2012 on September 30, 2013, 03:30:00 AM
I did a small experiment, I copied the wallet.dat and put it on another offline computer. I was able to send the same bitcoins twice! How can this be fixed?

You can send as many times as you want. Only one of them (at most) would be confirmed.


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: niko on September 30, 2013, 04:11:32 AM
I did a small experiment, I copied the wallet.dat and put it on another offline computer. I was able to send the same bitcoins twice! How can this be fixed?
It can be fixed by you coming back here and providing an update. Specifically, you could write an essay titled "Why I am not rich yet?".

To help you get started, here is a hint: you were not able to send the same bitcoins twice, at least not any more than you would be able to send them twice by yelling "HERE, I SENT 'EM!!" from your balcony twice. Bitcoin transactions are verified, confirmed, timestamped, and entered into the ledger collectively by a p2p network.


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: cypherdoc on September 30, 2013, 05:14:27 AM
TOB, not you again.


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: lassdas on September 30, 2013, 05:17:47 AM
.. at least not any more than you would be able to send them twice by yelling "HERE, I SENT 'EM!!" from your balcony twice.
This one made me laugh.  :D


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: Stephen Gornick on September 30, 2013, 06:17:57 AM
How can this be fixed?

Well, you now have two wallet.dat files which are out of sync.  Bitcoin-Qt/bitcoind wasn't designed to work this way (running two copies of the Client with the same wallet.dat).  As a result, the two wallet.dat files are now out of sync.

In short, don't do this.   It doesn't affect the blockchain, but it will give you grief and multiple copies of a wallet getting out of sync can potentially cause you to end up with financial loss.

To resolve this ... you will have one Client in which the transaction confirms.  In the other instance you will have a transaction that won't confirm (presuming both are attempting to spend the same funds).  

So, if the balance on the one with the confirmation is correct, then simply discontinue use of the other instance -- the one with the transaction that will never confirm.


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: bitcoin44me on September 30, 2013, 10:55:24 AM
You tried double spending.
Be careful because the network might mark you as a scammer, and you will have troubles (not sure)


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: greyhawk on September 30, 2013, 10:57:26 AM
.. at least not any more than you would be able to send them twice by yelling "HERE, I SENT 'EM!!" from your balcony twice.
This one made me laugh.  :D

niko has a run of great posts lately.


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: jackjack on September 30, 2013, 01:01:29 PM
Don't put too much energy into answering him, TheoryOfBitcoin is likely to be a troll...


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: b!z on September 30, 2013, 01:06:47 PM
You tried double spending.
Be careful because the network might mark you as a scammer, and you will have troubles (not sure)

This is untrue.


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: DannyHamilton on September 30, 2013, 02:07:53 PM
Don't put too much energy into answering him, TheoryOfBitcoin is likely to be a troll...

Agreed.  I'm surprised his ignore button isn't yellow yet.  I suspect it will be before long.


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: BurtW on September 30, 2013, 02:51:08 PM
Looking at his other 13 posts he is just not this ignorant, so TheoryollOfBitcoin.


Title: Re: Bitcoin copying wallet.dat allows sending coins twice
Post by: IncreaseMyT on September 30, 2013, 06:20:55 PM
Don't put too much energy into answering him, TheoryOfBitcoin is likely to be a troll...

I figured he was trolling if a newb like myself new it would only confirm once.

http://pegfitzpatrick.com/wp-content/uploads/2012/08/trolls-einstein1.png