The Great Script Restoration: A Proposal to Unlock Bitcoin’s Full Potential
Bitcoin was initially designed with a fully fleshed out scripting language, intended to encompass and support any potential safe use case that users could come up with in the future. As Satoshi himself put it before he disappeared:
“The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime. Because of that, I wanted to design it to support every possible transaction type I could think of. The problem was, each thing required special support code and data fields whether it was used or not, and only covered one special case at a time. It would have been an explosion of special cases. The solution was script, which generalizes the problem so transacting parties can describe their transaction as a predicate that the node network evaluates.” – Satoshi, June 17 2010.
At Bitcoin++ in Austin at the start of May, Core Lightning developer Rusty Russell made a radical proposal to turn back on most of the opcodes that Satoshi disabled in 2010 before he disappeared. This proposal, known as the Great Script Restoration, aims to unlock Bitcoin’s full potential by restoring functionality that was disabled due to the risk of denial of service attacks.
Since the activation of Taproot in 2021, the development space has been somewhat aimless, with narrow proposals addressing specific use cases. The Great Script Restoration seeks to comprehensively address the expressivity and programmability needed to scale Bitcoin in a fundamental way, rather than focusing on narrow extensions of functionality.
The proposal includes the restoration of opcodes such as OP_CAT, OP_SUBSTR, OP_LEFT, OP_RIGHT, OP_INVERT, OP_AND, OP_OR, OP_XOR, OP_UPSHIFT, OP_DOWNSHIFT, OP_2MUL, OP_2DIV, OP_MUL, OP_DIV, and OP_MOD. Additionally, three new opcodes are proposed to simplify the composition of different opcodes.
Rusty also proposes the implementation of a varops limit, similar to the sigops limit for signature verification, to constrain the resources consumed by the reactivated opcodes and prevent denial of service attacks.
The Great Script Restoration aims to enable functionalities such as introspection, forward data carrying, and public key modification, which are essential for building more flexible Layer 2 solutions on top of Bitcoin.
While the proposal may seem like a significant change, its value lies in the comprehensive assessment of Bitcoin’s scripting language and the potential functionalities it can enable. By bringing developers together to explore the full range of possibilities, the Great Script Restoration could pave the way for a more productive and collaborative approach to Bitcoin development.
Whether all opcodes are restored or only a few are activated, the proposal represents a shift towards a more inclusive and forward-thinking conversation about Bitcoin’s future. It’s time to unlock Bitcoin’s full potential and work together towards a more scalable and versatile network.