Recently, Craig Wright spoke at a conference called “The Future of Bitcoin” in which he said that Bitcoin's scripting language is a 2-PDA, or two-stack pushdown automaton, which is Turing complete.
If you click on the below video you might not see what you expect. The forum software in use here forces embedding of videos even if YouTube does not permit the video to be embedded. It also deletes video timestamps. You may need to manually go to the URL:
If necessary go to the timestamp 2:48:37.
Normally, a simple pushdown automaton or PDA is less powerful than a Turing machine.
https://en.wikipedia.org/wiki/Pushdown_automaton
But giving it a second stack makes it into a 2-PDA, which is Turing complete.
I didn't find any single good source article on 2-PDAs, but a web search shows several references that say in passing that a 2-PDA is in fact as powerful as a Turing machine.
The two Bitcoin opcodes that implement a second stack are OP_TOALTSTACK and OP_FROMALTSTACK.
Since Dash is forked from Bitcoin, it too has these opcodes.
https://github.com/dashpay/dash/blob/master/src/script/script.cpp#L53
If all of the assertions above are correct, then:
The Turing machine built into Bitcoin and Dash should be able to implement smart contracts as well as Ethereum does. All we need to do is put a user interface around it.
If you click on the below video you might not see what you expect. The forum software in use here forces embedding of videos even if YouTube does not permit the video to be embedded. It also deletes video timestamps. You may need to manually go to the URL:
Code:
https://youtu.be/YAcOnvOVquo?t=10117
If necessary go to the timestamp 2:48:37.
Normally, a simple pushdown automaton or PDA is less powerful than a Turing machine.
https://en.wikipedia.org/wiki/Pushdown_automaton
But giving it a second stack makes it into a 2-PDA, which is Turing complete.
I didn't find any single good source article on 2-PDAs, but a web search shows several references that say in passing that a 2-PDA is in fact as powerful as a Turing machine.
The two Bitcoin opcodes that implement a second stack are OP_TOALTSTACK and OP_FROMALTSTACK.
Since Dash is forked from Bitcoin, it too has these opcodes.
https://github.com/dashpay/dash/blob/master/src/script/script.cpp#L53
If all of the assertions above are correct, then:
The Turing machine built into Bitcoin and Dash should be able to implement smart contracts as well as Ethereum does. All we need to do is put a user interface around it.
Last edited: