Glossary·Technical

Script

The small stack language that decides whether a spend is authorised. It has no loops, no recursion and no way to call itself, which is what lets a validator bound the cost of running it in advance.

Every output carries a script setting the conditions for spending it, and every input supplies the data satisfying them. Evaluation is a stack machine: push data, apply operations, and accept the spend if a single true value remains. That is the whole execution model.

The missing features are the design. Without loops the number of operations is visible before anything runs, so a validator can price a script by reading it — which is why Bitcoin needs no concept of gas and why a transaction cannot consume unbounded resources.

The common misreading is that this makes Bitcoin unprogrammable. It makes it unprogrammable in one specific way: a script cannot compute arbitrarily, and it can express conditions — signatures, thresholds, timelocks, hashes — which is enough for channels, vaults and inheritance arrangements.

What a script cannot do is see the transaction spending it, beyond what the signature hash commits to. That limit is what covenant proposals would relax, and it is the reason several otherwise simple constructions remain impossible.

Where this comes up

Used in

Nearby terms

Reviewed Nov 2026