Cryptocurrencies In Depth

Turing-completeness: How Ethereum Does what it Does

turing-complete, ethereum, bitcoin, smart-contracts, cryptocurrency

Much has been made of Turing-completeness with the advent of Ethereum – which boasts said capability – and, by contrast, bitcoin, which does not posses this seeming exaltation.

As bitcoin’s price has risen and now seems to be falling, there is much to bet on what might become of its key competitor: Ethereum. The smart-contracts architecture appears to be a solution to a problem, to bitcoin’s solution without a problem. The architecture is supposed to be one which holds information of an agreement and can take action based on the fulfilment of said agreements. Which requires it to understand and implement an infinite range of possibilities, and then take actions or issue precise payments according to the agreement.

Turing-completeness

A Turing-complete machine is, put simply, a machine that can simulate any other machine. Which is a sentence easier written than parsed, but we can reach for an example. If you take two machines, one which is Turing-complete and one which is not, and need them to perform a new task they have no previous experience of, you will need to go about it in two different ways. For the Turing-incomplete machine you will need to upload and install a new set of code which provides the machine with the ability to perform the necessary task. For the Turing-complete machine you will simply need to provide the machine instructions (for example, “achieve objective x, while not breaking rule a, b or c”) and the machine will then relay that to its already-existing code base, and arrange itself appropriately to perform the necessary task.

So Turing-completeness sounds a bit lovely, but it comes with its own problems. Turing-completeness is great for working out decidable problems – that is, problems with pre-defined and understood decisions, or steps, required to achieve the desired outcome – like, as a simple example, 2 + 2. But when it comes to undecidable problems everything gets a bit thicker. A Turing-incomplete machine will not be able to complete the problem. But a Turing-complete machine will at least give it a crack, though without knowable steps one can’t tell what manner of mischief the machine might get up to in order to try and solve the problem set for it. It would be a little like an inexperienced baby-sitter asking a toddler to do a painting without realising the need to supervise it to make sure it paints on the piece of paper, and not the walls. To this extent, Turing-complete machines confront similar philosophical problems to AI.

Bitcoin vs Ethereum

This is all a big deal in the bitcoin and Ethereum world. Ethereum is Turing-complete, and was originally marketed as such. Bitcoin is not. The difference is not in the operational deficiencies of the two, but in their purpose, bitcoin just doesn’t need to be Turing-complete.

Ethereum has the ability to take on contracts, understand them, and codify them so that actions are completed upon the contract, or steps therein, being fulfilled. Attached to Ethereum is ether, the cryptocurrency it uses to deal with the contracts. To this extent, bitcoin and Ethereum get conflated, but whereas Ethereum is a code-base which can be used as a trusted third party and therefore needs a currency to underpin agreements, bitcoin is ‘just’ a currency.

Bitcoin has no need for Turing-completeness because it’s only ever being asked to process transactions. Ethereum, on the other hand, is being asked to understand the underlying agreements on which transactions must be processed. And it has no way, ahead of time, to know what agreements it might be asked to understand, therefore it must be coded in such a way as to be able to potentially understand anything – it must be Turing-complete.

Rich Statefulness

Turing-completeness is only half the story. Developers have become very excited about it, so much so that Vitalik Buterin, co-founder of Ethereum, tweeted earlier this year displaying his fatigue with the topic:

Rich statefulness refers to the flexibility of the processing units on which these systems are built. Bitcoin, for example, is the equivalent of only ever having £20. You can get something different to £20 notes, but you’d have to get it made officially, which would be no small feat. Ethereum, on the other hand, has developed a systems whereby you can always have exactly the right change. Thereby making any and all contracts possible, no matter their size. It is Turing-completeness which allows the rich statefulness, but it is the rich statefulness which, Buterin says, is necessary for Ethereum’s flexibility.