Author

Topic: How do I attempt a double spend? (Read 1686 times)

newbie
Activity: 13
Merit: 0
April 13, 2013, 09:48:59 PM
#6
Success! Thank you guys for the help. It took a little digging, but in hindsight, the solution is relatively straightforward.

I didn't start with any backups, but I did spend everything I could to another wallet. I wouldn't do it with any amount I'd be afraid to lose.

Exporting the private keys from the Android wallet app was simple enough. The only issue here is that you can't get them in plaintext. (n.b.: This is a security feature as basically any other app would have access to them--if you have root on your device, I believe you can get the wallet.dat file, but that wasn't an option here.) Give it a password so that you can export it. It'll create a file called "bitcoin-wallet-keys-YYYY-MM-DD". Move that file onto a computer via SD card or your file transfer mechanism of choice.

Unfortunately, most of the suggestions below couldn't obviously handle an encrypted key file. Brainwallet, pywallet, electrum, Bitcoin-qt? No luck. MultiBit? Jackpot.

Give your "bitcoin-wallet-keys" file a ".key" extension and import it with MultiBit. There's a field for the password. I've got no idea how it's encrypted, but obviously it's the same as the wallet app. From here, you're free to spend the coins as MultiBit is ignorant of the transaction that's supposed to be propagating through the network (for the past #@%$#@ing week!)

All that said, I'm not sure that I actually had to try the double-spend. There's a setting in the Android app to simply reset the blockchain. I believe it's equivalent to resetting the app to a "factory default" setting and importing the private keys. A few minutes later, the blockchain was up to date and a few minutes after that, the next block was found, confirming the transaction as a -.0001 payment to myself. Great success.
hero member
Activity: 560
Merit: 500
I am the one who knocks
April 13, 2013, 07:50:40 PM
#5
You need to do it with raw transactions.  If you use the satoshi client then you can use it; or you can use http://brainwallet.org/#tx if you want.

That may not even be necessary.

If the original transaction didn't get relayed very well because it was below 0.01 BTC and no fee then a node running Bitcoin-Qt wouldn't know about the original transaction and thus wouldn't have a problem creating a spend transaction.  So simply importing one of the private keys used in that transaction to Bitcoin-Qt and spending it (with a fee) might be all that is needed.

But seeing your suggestion to use Brainwallet.org ... that is probably an even better idea than trying to get a Bitcoin-Qt set up just for this one transaction.
Or using your solution he could also setup a free blockchain.info wallet and import the privet key and spend from there too.
legendary
Activity: 2506
Merit: 1010
April 12, 2013, 01:57:32 AM
#4
You need to do it with raw transactions.  If you use the satoshi client then you can use it; or you can use http://brainwallet.org/#tx if you want.

That may not even be necessary.

If the original transaction didn't get relayed very well because it was below 0.01 BTC and no fee then a node running Bitcoin-Qt wouldn't know about the original transaction and thus wouldn't have a problem creating a spend transaction.  So simply importing one of the private keys used in that transaction to Bitcoin-Qt and spending it (with a fee) might be all that is needed.

But seeing your suggestion to use Brainwallet.org ... that is probably an even better idea than trying to get a Bitcoin-Qt set up just for this one transaction.
hero member
Activity: 560
Merit: 500
I am the one who knocks
April 10, 2013, 05:30:49 PM
#3
This is one of those.... "if you have to ask" type things.

But I am all for enabling stupid people to shoot themselves in the foot.  

You need to do it with raw transactions.  If you use the satoshi client then you can use it; or you can use http://brainwallet.org/#tx if you want.

Basically you need to find the unspent output that was the INPUT to your stuck TX and re-spend that.

Be careful you MUST spend the entire output, if you don't then it will go to mining fees.
legendary
Activity: 2506
Merit: 1010
April 10, 2013, 05:21:09 PM
#2
... umm for science  Wink


But in all seriousness, I attempted to send some trivial amount (.1 mBTC) without a fee from the Android wallet app and the transaction has been hanging in limbo for the better part of a week, leaving a few bitcents that I can't use. My understanding is that the only way to use those coins is to a) wait an indeterminate amount of time until that transaction gets accepted or b) double spend that "chunk" to myself with a fee to get it into the block chain in short order.

From the Bitcoin Android wallet app?  or from Blockchain.info for Android?   or something else?

That's a long time for a transaction to hang out there without getting a confirmation.  The original sender must be re-broadcasting it periodically (which is what the client is supposed to do).  

But because it has an output below 0.01 BTC and it has no fee, not all nodes are relaying it.  So you still might be able to spew out a double spend that would get relayed.

So if you have the private key for the address from one of the inputs for that send transaction you can import that address into the Bitcoin-Qt client, or Multibit, or Electrum, etc. and try to spend from one of those.  You'll have the same problem if the amount is below 0.01 BTC  and you don't pay a fee though so make sure to pay the freight.

[Update: Just remember though, with Bitcoin-Qt if that is a failed double spend attempt there's no way to delete the offending transaction from the wallet (without using the third party tool, pywallet, to perform wallet surgery).  So don't do this with your normal wallet.dat for Bitcoin-Qt, or at least make a backup right before so you can restore the old one if the double spend attempt never confirms.]
newbie
Activity: 13
Merit: 0
April 10, 2013, 05:08:42 PM
#1
... umm for science  Wink


But in all seriousness, I attempted to send some trivial amount (.1 mBTC) without a fee from the Android wallet app and the transaction has been hanging in limbo for the better part of a week, leaving a few bitcents that I can't use. My understanding is that the only way to use those coins is to a) wait an indeterminate amount of time until that transaction gets accepted or b) double spend that "chunk" to myself with a fee to get it into the block chain in short order.


I'm tired of option a. How might I go about attempting plan b?
Jump to: