[Draft BIP proposal] Ladder script

Posted by defenwycke

Mar 16, 2026/16:10 UTC

Ladder Script is introduced as a draft Bitcoin Improvement Proposal (BIP) suggesting the implementation of transaction version 4 with typed, structured spending conditions. This proposal aims to address the limitations posed by Bitcoin Script's reliance on untyped stack elements, which complicates static analysis, makes constructing compound conditions error-prone, and allows for data embedding through witness fields. The proposed system seeks to enhance script extensibility without the need for new opcodes or individual activation processes.

The inspiration for Ladder Script comes from ladder logic used in programmable logic controllers (PLCs), offering a model that simplifies the construction and comprehension of complex conditional logic. In this model, a "ladder" represents a spending policy, with each "rung" indicating a potential spending path composed of one or more condition blocks. These blocks can include various checks and constraints, such as signature verification, timelocks, and hash verifications. The structure of Ladder Script ensures that every byte within its witness belongs to a declared data type with enforced size constraints, offering clarity on transaction requirements. The output format, termed MLSC (Merkelized Ladder Script Conditions), maintains a consistent scriptPubKey size regardless of policy complexity, enhancing privacy and reducing the UTXO footprint.

Ladder Script introduces several notable features, including support for post-quantum signatures and mechanisms for anti-spam hardening. It integrates post-quantum signature algorithms like FALCON and Dilithium as native block types, allowing existing spending policies to utilize quantum-resistant keys seamlessly. Anti-spam measures include techniques to prevent the misuse of public key fields, key-consuming blocks, and hash lock blocks, aiming to mitigate unwanted data embedding in transactions.

The proposal outlines a migration path for integrating Ladder Script into the Bitcoin protocol via a soft fork, with a three-phase model designed for coexistence, legacy integration, and eventual deprecation of raw legacy transaction formats. This approach underscores the proposal's ambition to provide a comprehensive framework for future-proofing Bitcoin transactions without immediate disruption to existing infrastructure.

Furthermore, Ladder Script's implementation is detailed, highlighting its development in C++ with extensive testing and a dedicated signet for experimentation. The initiative encourages community feedback through provided resources, including a draft BIP, block library, and a browser-based transaction builder available at https://bitcoinghost.org/labs/ and the source code hosted on GitHub at https://github.com/defenwycke/ghost-labs-ladder-script. The project invites contributions and discussions to refine the approach, address potential concerns, and explore the implications of its widespread adoption within the Bitcoin ecosystem.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiDecoding BitcoinWarnet
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project.

Give Feedback