Bitcoin interoperability
March 11, 2014  

Bitcoin seems to exist in a nutty universe where it makes sense to ask questions like

  • Is “Satoshi Nakamoto” “Satoshi Nakamoto”?
  • Is “transaction malleability” “transaction malleability”?

The answer to the first question, according to Forbes, is NO because stylometry.

The answer to the second question, according to Emin Gün Sirer, is also (of course) NO (I think) (but read the post yourself).

I’m not sure which question is more interesting but the second is the one that fits with the subject matter of this blog, which is, as everyone knows, psychology.

Namely, Sirer says that the MtGox bitcoin exchange is not the victim of transaction malleability because its transactions were not actually transactions. They were bad transactions, that is, not transactions at all. And that, of course, leads us to Postel’s Law:

Be conservative in what you do, be liberal in what you accept from others.

Postel’s Law is a psychological meme directed at software developers who need to write programs that interact with each other, typically via an exchange of messages in some “standard” format. And the psychological message is that inevitably other developers are going to screw up, and they are going to send your program badly formatted messages, and when that happens, it’s best to just fix up their mistake and move on, because they are never going to learn.

For example, when MtGox sends out “bad” transactions, it is only natural (by Postel’s Law) for others to fix them up into “good” transactions. In fact it is not only Postel’s Law that predicts this, but also greed—because miners make money (bitcoins) by adding transactions to the bitcoin log, and never mind where those transactions come from. That is, miners have an incentive to add even “bad” transactions to the log, if they can fix them up.

So are these transactions even “bad” in the first place? According to the miners who fixed them up, no, they are great transactions, as good as any other.

This reveals the irrational manipulation that is at the heart of Postel’s Law: it pretends that there is such a thing as a “standard” to conform to. But history shows that “standards” always have multiple interpretations, and so Postel’s Law can only get you so far. Systems will mostly work, but there will always be interop problems at the edges.

Given this, I’m sceptical of the notion that we can “fix up” the bitcoin “standard” to eliminate transaction malleability, as some think will happen.

To see just how difficult a task this is, consider the case of JSON. JSON is a data format based on Javascript objects that was created, in part, as a reaction to XML, a much more complex data format. It’s hard to imagine a simpler data format, and a lot of people depend on it, so you’d think they’d nail down a specification. But if you read Tim Bray’s post about it you’ll find that there are at least 5 different specifications of JSON!

Bray tells us that “Fortunately, everyone pretty well agrees on the right way to do JSON, so that’s not a problem”. When you look at the latest spec, though, you see that it is riddled with interoperability caveats. What you don’t see is a single, definitive way to compute the function, “is this valid JSON?”

If we can’t get JSON right, bitcoin doesn’t have a chance.