Posted by Brandon Black
Sep 29, 2025/22:55 UTC
In the ongoing development of Tapscript, a new version is being considered that could significantly enhance its functionality within SegWit v1 32-byte witness programs and possibly integrate with BIP360 scripts. The discussion revolves around the potential replacement of the CODESEPARATOR opcode with a new opcode named SEGMENT. This proposal stems from the functionality of CODESEPARATOR in Tapscript 0xc0, which adds the last position of the opcode to the sighash, a feature that appears somewhat redundant with the introduction of SEGMENT. The SEGMENT opcode mandates the division of the script into execution chunks, suggesting an inherent capability to include the positions of the current segment directly into the sighash. This integration could potentially render CODESEPARATOR obsolete by streamlining the process and enhancing efficiency.
Additionally, the conversation touches upon the operational intricacies of accumulating the sum of all input amounts through a sequence of opcodes: TX_SELECT_INPUT_AMOUNT|TX_INPUTSELECT_ALL OP_TX \ TXSELECT_NUM_INPUTS OP_TX OP_MULTI OP_ADD. This operation underlines the necessity for either the SECP256K1_PRIVATE_TO_PUBLIC or OP_ECSCALARMUL functions to convert the Taptweak into a point that can be added to the internal key, highlighting the complex nature of script operations within Tapscript and the broader Bitcoin protocol. These discussions reflect a deep engagement with the technical aspects of Bitcoin's scripting capabilities, aiming to refine and optimize transaction validation processes.
Thread Summary (7 replies)
Sep 27 - Oct 6, 2025
8 messages • 7 replies
TLDR
We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project.
Give Feedback