Mt. Gox Official Statement
Mt. Gox have just released their official statement regarding their recent decision to halt all Bitcoin withdrawals.
Essentially, they are claiming they can’t release customers’ funds until a known bug in the Bitcoin protocol is resolved.
Greg Maxwell Responds
I spoke with Bitcoin core developer, Greg Maxwell, about this highly technical issue. Greg Maxwell and Peter Wuille are the core developers in consultation with Mt. Gox, as per their press release.
<gmaxwell> The Gox press release seems a little ‘spun’ to me. They portray characteristics of the Bitcoin system well known since at least 2011 (which even have their own wiki page ) as something new.
These characteristics are annoying but don’t inhibit basic operation. They are slowly being fixed – but fixing them completely will likely take years as they require changing all wallet software. Correctly-written wallet software can cope with the consequences, and I cannot understand why they would gate their withdraws on external changes.
<GG> Andreas Antonopoulus has examined Gox’s code to some degree, and remarked that they are using a strange “hodgepodge of technologies that are really not suitable for running an exchange.” Do you believe the problem lies in their code rather than the Bitcoin protocol?
<gmaxwell> Oh there is a “problem” in the Bitcoin protocol, known since at least 2011 (see the link I gave). But for normal applications, not involving unconfirmed transactions, it shouldn’t cause any severe problems because wallets can handle it locally.
Basically, third parties can change the transaction IDs of transactions. This means what wallet software must be written to accomodate that and still recognize them when that happens.
What the press release talks about is adding a second kind of transaction ID, which is robust against changes, which would be helpful for tech support purposes. Though it doesn’t resolve all of the issues that being able to modify transactions presents.
<GG> So in other words, Gox should be able to account for this known problem by modifying their internal systems?
<gmaxwell> Yes, internal only changes should account for it. The only remaining issue for Mt. Gox’s application would be some tech support problems, where if a user’s transaction is mutated by a malicious party the txid [“transaction ID”] Mt. Gox told them to expect wouldn’t be the one that ultimately showed up in the blockchain.
<GG> It seems the market is reacting very negatively to the news. What advice would you give to the average Bitcoiner regarding this situation?
<gmaxwell> The challenge for me in offering something here is that this isn’t news to me – for years – and it’s never been a particularly large concern. This wouldn’t make the top ten list of dangers in the Bitcoin technology.
<GG> Thanks for your comments.
Update 1: Market Stabilising
As of 13:35 GMT+2, the market has retraced about 60% of the recent loss as the news is digested.
In my personal opinion, Gox have done more harm to the Bitcoin community than good to themselves through their statement. This situation should have been handled in such a way as to minimize the market impact.
Update 2: Further technical details.
In a BitcoinTalk thread relating to Mt. Gox’s statement, Rannasha offers this concise summary of the situation:
The flaw isn’t so much in Bitcoin as it is in exchange-systems. Many exchanges use the tx-id to uniquely identify transactions, but as it turns out, an attacker can change the tx-id without changing the actual transaction, rebroadcast the changed transaction (effectively creating a double-spend) and if his altered transaction gets accepted into a block instead of the legit transaction, the attacker receives his coins and can complain with the exchange that he didn’t. The exchange will then check their db, fetch the tx-id from it, look it up in the blockchain and not find it. So they could conclude that the transaction indeed failed and credit the account with the coins.
A simple workaround is to not use the tx-id to identify transactions on the exchange side, but the set of (amount, address, timestamp) instead. If a user complains about not receiving their withdrawal, support can look it up using these 3 variables. It takes a little bit more work from support, but it prevents this attack from succeeding.
While it’d be nice if the tx-id isn’t malleable, blaming this problem on a flaw in the protocol is quite a stretch.
I asked Greg Maxwell whether he agreed with this summary. His reply:
I don’t disagree but it’s actually missing a critical point on that subject that I posted about on Bitcoin-development just now.
As per the above link, Drak posed the following question:
On Mon, Feb 10, 2014 at 3:28 AM, Drak <[email protected]…> wrote: What is the official response from the Bitcoin Core developers about MtGox’ assertion that their problems are due to a fault of bitcoin, as opposed to a fault of their own?
The technical analysis preluding this mess, was that MtGox was at fault for their faulty wallet implementation.
In the real world fault seldom falls in a single place. Bitcoin is at fault – in many places – for making it harder for implementers to get things right.
MtGox is at fault for not implementing in a way that copes with behaviors in the Bitcoin protocol which have been known since at least 2011.
Not that Bitcoin-QT handles Malleability fantastically – but because it tracks inputs it will still detect the mutant transactions. An interesting point which I haven’t pointed out elsewhere is that for the question of basic funds safety in re-issuing a transaction malleablity is basically irrelevant.
Say you pay someone and it doesn’t go through (or it does and you don’t see it because its been mutated and your software can’t detect that), and they ask you to reissue…. if you reissue without double-spending any of the original inputs you are at risk of getting robbed. This is true with or without malleability. Without the double-spend of at least one input the original transaction could just go through in addition to your reissue.
Say that you do make sure to double spend at least one input – then the result is funds safe safe, regardless of if a mutation happened.
Say you want to support _canceling_ a payment (send me the goat instead!) rather than reissue you still must double-spend the attempted payment to cancel it, since it still might go through if you don’t. And the double spend works to protect this case regardless of if the transaction was mutated.
For support and accounting purposes you absolutely do need tools to identify mutated transactions, so long as mutation exists… so we ought to provide some better tools there. But I can’t think a case where mutation handling is necessary or sufficient for cancellation security, but – rather – input tracking appears to be both necessary and sufficient in all cancellation cases.
This helps explain why Bitcoin-QT – whose mutation handling kinda stinks – doesn’t ever end up in a really bad situation with mutants: it tracks inputs pretty well.
In any case, I’ve always been happy to help out Mt. Gox with technical issues. Having some specs for a stable transaction ID would probably be helpful to many applications, even if it isn’t the critical key you need for cancellation security. Removing malleability entirely has been a soft long term goal, and there were recently (as in today) some posts about it – look at the list archives… though it won’t happen fast since all signers/wallets will need to be updated.