Scripts and Script Language

Now we begin our deep dive into Bitcoin scripting! Let's start by reading these sections on scripting.

Turing Incompleteness

The bitcoin transaction script language contains many operators, but is deliberately limited in one important way – there are no loops or complex flow control capabilities other than conditional flow control. This ensures that the language is not Turing Complete, meaning that scripts have limited complexity and predictable execution times. Script is not a general-purpose language. These limitations ensure that the language cannot be used to create an infinite loop or other form of "logic bomb" that could be embedded in a transaction in a way that causes a denial-of-service attack against the bitcoin network. Remember, every transaction is validated by every full node on the bitcoin network. A limited language prevents the transaction validation mechanism from being used as a vulnerability.