<p>Bitcoin itself will never itself offer any kind of Smart Contract functionality, like the Turing complete EVM. Rootstock (RSK) however, is smart contracts platform (turing complete programming) that works alongside Bitcoin to offer the same functionality. It's been in development for some time and I suspect now it will integrate with Lightning, and thus work very well. I haven't tried it out though. <a href="https://www.rsk.co/Whitepapers/RSK-White-Paper-Updated.pdf" rel="nofollow noreferrer">https://www.rsk.co/Whitepapers/RSK-White-Paper-Updated.pdf</a></p>

CC BY-SA 4.0
2021-05-02T23:41:25.933Z
2021-05-02T23:41:25.933Z
HubertBlu
<p>Turing completeness includes the capability to run programs that might not terminate or that might terminate after a very long time. This would cause the blockchain to stall, hence it is a must to keep the number of instructions to be run predetermined (like BTC) or to be run according to a budget (like ETH).</p>

CC BY-SA 4.0
2021-05-03T03:31:53.330Z
_it is impossible to determine whether a program will ever halt._ – This is a common misconception. The halting problem states that there exists no algorithm which can determine _for any program with all possible inputs_ if it will eventually halt. But there are techniques to prevent infinite loops and the like for arbitrary programs. See for example the Linux kernel eBPF verifier.
forest
CC BY-SA 4.0
2021-05-03T09:01:03.960Z
@forest Thank you, removed the misconception
MCCCS
CC BY-SA 4.0
2021-05-03T09:01:52.880Z
@user253751 Then Script is currently Turing complete colloquially?
MCCCS
CC BY-SA 4.0
2021-05-03T09:38:20.347Z
@user253751 Craig Wright described a systematic way of creating loops using TOALTSTACK. I can't find that paper anymore online however I have a copy of the PDF if it's useful for you.
MCCCS
CC BY-SA 4.0
2021-05-02T06:49:01.880Z
2021-05-03T09:00:29.263Z
2021-05-03T09:00:29.263Z
MCCCS
<p>I want to know if BTC script will have loops in it in the future?</p>

<script><turing-completeness>
Will BTC script be Turing complete in future?
Dhanush Sai Baswa
# Will BTC script be Turing complete in future?

(Asked by: username_0 on 2021-05-02)

I want to know if BTC script will have loops in it in the future?

**Tags:** script, turing-completeness


---

## 2 answers

### Answer by username_2 on 2021-05-02. Score: 9 | Accepted answer

Turing completeness includes the capability to run programs that might not terminate or that might terminate after a very long time. This would cause the blockchain to stall, hence it is a must to keep the number of instructions to be run predetermined (like BTC) or to be run according to a budget (like ETH).

> **Comments:**
> **username_3**: _it is impossible to determine whether a program will ever halt._ – This is a common misconception. The halting problem states that there exists no algorithm which can determine _for any program with all possible inputs_ if it will eventually halt. But there are techniques to prevent infinite loops and the like for arbitrary programs. See for example the Linux kernel eBPF verifier.  
> **username_2**: @username_3 Thank you, removed the misconception  
> **username_2**: @user253751 Then Script is currently Turing complete colloquially?  
> **username_2**: @user253751 Craig Wright described a systematic way of creating loops using TOALTSTACK. I can't find that paper anymore online however I have a copy of the PDF if it's useful for you.  

---

### Answer by username_1 on 2021-05-02. Score: 1

Bitcoin itself will never itself offer any kind of Smart Contract functionality, like the Turing complete EVM. Rootstock (RSK) however, is smart contracts platform (turing complete programming) that works alongside Bitcoin to offer the same functionality. It's been in development for some time and I suspect now it will integrate with Lightning, and thus work very well. I haven't tried it out though. <https://www.rsk.co/Whitepapers/RSK-White-Paper-Updated.pdf>


---

