Bitcoin Forum

Other => Beginners & Help => Topic started by: Mr. Flibble on November 18, 2011, 11:07:54 AM



Title: Sent Bitcoins to TESTNET address on MtGOX. How to retrieve?
Post by: Mr. Flibble on November 18, 2011, 11:07:54 AM
I accidentally sent some bitcoins to a testnet address from MtGOX. MtGOX accepted the transfer and deducted the balance from my account, but as far as I am aware it is impossible to actually send bitcoins on the live network to a testnet address. I have tried on my local bitcoin client and it won't allow it - the testnet address does not validate. Can someone please confirm if this is the case as MtGOX support staff seem unable to understand this concept.


Support summary:
Quote from: me
Hello. I accidentally sent xxxBTC to a testnet address nxxxxxxxxxxx on Wed 16 Nov 2011 06:37:42 PM GMT. I think (and hope) that this means that it will not actually be sent by your Bitcoin daemon as the daemon will not validate the address. If you could refund it I would be very grateful.
Quote from: mtgox
Thank you for contacting us. Unfortunately, BTC withdrawals are non-reversible within the system. If you wish, please contact the service provider of the address to see if you can get your BTC back. We apologize for any inconvenience caused.


Title: Re: Sent Bitcoins to TESTNET address on MtGOX. How to retrieve?
Post by: deepceleron on November 18, 2011, 11:52:06 AM
Maybe they also have a testnet wallet and transferred your balance to testnet, as that is what you asked!  :P

Seems like a pretty dick response, they didn't send any real BTC to you, it's not going to be added to the blockchain or take any BTC from their balance, and it is likely that while the website accepted it, bitcoind flat-out rejected it. Their web software should validate version as well as checksum. You should demand satisfaction!


Title: Re: Sent Bitcoins to TESTNET address on MtGOX. How to retrieve?
Post by: BTCurious on November 18, 2011, 12:24:05 PM
I've explained your situation on their IRC channel. Now and then the mtgox people respond directly there. I'll let you know when I get a response.


Title: Re: Sent Bitcoins to TESTNET address on MtGOX. How to retrieve?
Post by: Gavin Andresen on November 18, 2011, 10:29:20 PM
I accidentally sent some bitcoins to a testnet address from MtGOX.

First: sounds like a bug in Mt Gox's bitcoin address validation code that they should fix.

Second: Do you own the testnet wallet with that address in it? If you do, then it is possible to transfer the public/private keypair from your testnet wallet to your main wallet and recover the coins (but you'll need to use PyWallet or one of sipa's export/import private keys bitcoin branches).

Because the coins are recoverable, you shouldn't expect Mt. Gox to refund the transaction... (otherwise everybody could create testnet versions of their main-net bitcoin addresses, withdraw, and then as Mt Gox to "refund" their "mistake")


Title: Re: Sent Bitcoins to TESTNET address on MtGOX. How to retrieve?
Post by: casascius on November 18, 2011, 10:33:08 PM
Can you find the transaction on Block Explorer?

Did you get a hex transaction ID?

What is the Testnet address?  (We can calculate the equivalent Bitcoin address, and then search Block Explorer for it)... if you have your testnet wallet.dat, you could extract the private key and import it right back into MtGox via "add funds" -> "redeem private key" without even messing with your Bitcoin wallet.

MtGox has written their own bitcoin daemon, so the fact that bitcoind would refuse to send this transaction wouldn't apply to them.  (That's how they can sweep private keys as well, without any support for it in bitcoind)


Title: Re: Sent Bitcoins to TESTNET address on MtGOX. How to retrieve?
Post by: Maged on November 18, 2011, 11:14:02 PM
I just tested it myself, and it appears that the transaction is, indeed, sent to the testnet address.
https://i.imgur.com/LbOhU.png
http://blockchain.info/address/9932bedca76f6342c169e38ca187694cc03e5651

As you can see, as expected, it was internally converted to a Bitcoin address (1Ey3BDMVPswDsYNnsf4Kme83eMD7iwNTc7) just fine.

Anyway, the point here is that as long as you have the private key for the testnet address, you'll be able to claim the Bitcoins just fine if you move the private key to your main wallet or import it into MtGox.


Title: Re: Sent Bitcoins to TESTNET address on MtGOX. How to retrieve?
Post by: BTCurious on November 18, 2011, 11:47:12 PM
Anyway, the point here is that as long as you have the private key for the testnet address, you'll be able to claim the Bitcoins just fine if you move the private key to your main wallet or import it into MtGox.
Cool, I didn't know that.

Still a pretty obvious bug in the address validation though…


Title: Re: Sent Bitcoins to TESTNET address on MtGOX. How to retrieve?
Post by: Maged on November 19, 2011, 12:57:06 AM
Anyway, the point here is that as long as you have the private key for the testnet address, you'll be able to claim the Bitcoins just fine if you move the private key to your main wallet or import it into MtGox.
Cool, I didn't know that.

Still a pretty obvious bug in the address validation though…
Yeah. In fact, the only reason this was so easily recognized is because the testnet (and, initially several alt-currencies) accepts(/accepted) standard Bitcoin addresses. In fact, there's a guide for it!
https://bitcointalk.org/index.php?topic=32159.0
(Please note that recovery from this is now actually easier than that, so don't be discouraged by the instructions)