Bitcoin Forum
May 10, 2024, 08:15:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How do I attempt a double spend?  (Read 1690 times)
WUTcoin (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
April 10, 2013, 10: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?
1715372123
Hero Member
*
Offline Offline

Posts: 1715372123

View Profile Personal Message (Offline)

Ignore
1715372123
Reply with quote  #2

1715372123
Report to moderator
1715372123
Hero Member
*
Offline Offline

Posts: 1715372123

View Profile Personal Message (Offline)

Ignore
1715372123
Reply with quote  #2

1715372123
Report to moderator
1715372123
Hero Member
*
Offline Offline

Posts: 1715372123

View Profile Personal Message (Offline)

Ignore
1715372123
Reply with quote  #2

1715372123
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, which will follow the rules of the network no matter what miners do. Even if every miner decided to create 1000 bitcoins per block, full nodes would stick to the rules and reject those blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715372123
Hero Member
*
Offline Offline

Posts: 1715372123

View Profile Personal Message (Offline)

Ignore
1715372123
Reply with quote  #2

1715372123
Report to moderator
1715372123
Hero Member
*
Offline Offline

Posts: 1715372123

View Profile Personal Message (Offline)

Ignore
1715372123
Reply with quote  #2

1715372123
Report to moderator
1715372123
Hero Member
*
Offline Offline

Posts: 1715372123

View Profile Personal Message (Offline)

Ignore
1715372123
Reply with quote  #2

1715372123
Report to moderator
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
April 10, 2013, 10:21:09 PM
Last edit: April 12, 2013, 07:45:14 AM by Stephen Gornick
 #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.]

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


ErebusBat
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500

I am the one who knocks


View Profile
April 10, 2013, 10: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.

░▒▓█ Coinroll.it - 1% House Edge Dice Game █▓▒░ • Coinroll Thread • *FREE* 100 BTC Raffle

Signup for CEX.io BitFury exchange and get GHS Instantly!  Don't wait for shipping, mine NOW!
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
April 12, 2013, 06: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.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


ErebusBat
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500

I am the one who knocks


View Profile
April 14, 2013, 12:50:40 AM
 #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.

░▒▓█ Coinroll.it - 1% House Edge Dice Game █▓▒░ • Coinroll Thread • *FREE* 100 BTC Raffle

Signup for CEX.io BitFury exchange and get GHS Instantly!  Don't wait for shipping, mine NOW!
WUTcoin (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
April 14, 2013, 02:48:59 AM
 #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.
Pages: [1]
  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!