Chia Lisp For Bitcoiners

Posted by ajtowns

Mar 19, 2024/00:58 UTC

Simplicity, a programming language used in blockchain development, introduces an innovative concept known as "pruning." This feature allows for the trimming of unexecuted branches through a Merkle Tree structure when a program is disclosed. This methodology contrasts with the approach taken by Chia Lisp, where both branches of an if statement are evaluated, regardless of the condition's outcome. The pruning capability in Simplicity not only offers potential privacy enhancements but also aids in reducing the amount of data stored on the blockchain.

The concept of pruning in Simplicity somewhat mirrors the manual efforts required in Chia Lisp to achieve similar outcomes. In Chia Lisp, the standard transaction format incorporates the foundational idea of taproot, which facilitates a transition from merely providing a signature to engaging more complex scripts dubbed "hidden puzzles." This is achieved by producing a hash of the concealed script utilizing the sha256tree1 function. Although integrating taproot-style MAST (Merkle Abstract Syntax Trees), which involves having a top-level merkle tree of scripts and selecting one for evaluation, might appear challenging, it is feasible with some ingenuity. Specifically, this would entail replacing (i COND CODE hash) with (a (i COND (q . CODE) (q x))) while concurrently constructing the overall hash of the expression, thereby allowing for a more nuanced AST (Abstract Syntax Tree) resolution.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

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

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiBitcoin Transcripts Review
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

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

Give Feedback