delvingbitcoin

Draft BIP for OP_TXHASH and OP_CHECKTXHASHVERIFY

Draft BIP for OP_TXHASH and OP_CHECKTXHASHVERIFY

Original Postby ajtowns

Posted on: October 2, 2023 10:55 UTC

The discussion revolves around the complexities and potential issues within the context of blockchain and hashing mechanisms, particularly focusing on policy limits and their inefficacy in addressing certain problems.

One significant challenge highlighted is the quadratic hashing issue in a block, where the output scriptPubKey may become arbitrarily large, complicating the process further. This complexity extends to the caching system when dealing with input ranges that overlap, as it becomes inefficient. For instance, hashing inputs with overlapping ranges (e.g., 1-3 and 2-4) fails to utilize a shared prefix-cache due to the unique nature of each hash, illustrating a fundamental limitation in current hashing strategies.

Moreover, the SIGHASH_GROUP proposal is mentioned as a mechanism that consciously avoids allowing overlapping ranges to mitigate some of these issues. However, the conversation also touches upon the problem of selecting arbitrary sets of inputs through a bitfield compared to simple ranges, which significantly increases the complexity due to the exponential increase in possible prefixes that can be generated from n inputs, following the formula $n(n+1)/2$. This highlights a deeper issue within the design and implementation of cryptographic and blockchain systems, where increasing flexibility or capability often comes at the cost of increased computational complexity and potential security concerns.

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