delvingbitcoin

Draft BIP for OP_TXHASH and OP_CHECKTXHASHVERIFY

Draft BIP for OP_TXHASH and OP_CHECKTXHASHVERIFY

Original Postby reardencode

Posted on: October 9, 2023 20:14 UTC

The proposal for a full TXHASH has garnered attention and prompted discussions around its potential implementation and integration with existing Bitcoin Improvement Proposals (BIPs) and cryptographic verification methods.

A significant suggestion revolves around the possibility of making OP_CHECKTXHASHVERIFY serve as an upgrade path for handling non-32-byte hashes in conjunction with OP_CHECKTEMPLATEVERIFY. This approach leverages the readiness and existing codebase of BIP119, suggesting a more streamlined adoption process.

Moreover, there's speculation on whether incorporating OP_TXHASH alongside OP_CHECKSIGFROMSTACKVERIFY would facilitate easier merging into the main codebase or prove to be more advantageous compared to introducing these operations as sighash modes for a new Tapscript key type/version. This comparison hints at the strategic considerations developers must weigh in optimizing transaction verification processes within the Bitcoin network.

The conversation further explores the technical design of OP_TXHASH, emphasizing the utility of having at least 2 bytes of flags for operational flexibility. The proposition includes reserving 1-byte flags for specific pre-determined modes that could align with those used in Template Key, thereby creating a cohesive system across different verification mechanisms. Such a system would accommodate various hash lengths and signature sizes while maintaining a unified approach to hash modes and flags, showcasing a thoughtful consideration of future scalability and interoperability within the Bitcoin protocol infrastructure.