Proposed BIP for OP_CAT

Posted by Rusty Russell

Oct 24, 2023/00:48 UTC

Andrew Poelstra mentions that he has not found a need for rolling sha2 and that OP_MULTISHA256 has been sufficient for his templating investigations with OP_TXHASH. He prefers OP_MULTISHA256 to OP_CAT, but acknowledges that OP_CAT allows for a Schnorr sig trick. He suggests considering the use of rolling sha2.

Andrew also mentions that he recently learned about the 1000 element limit and could not find it mentioned in BIP-141. He proposes a solution where instead of counting simple stack depth, each stack entry is counted as (1 + /520) entries. He notes that this can only be done with OP_CAT, since only 520 bytes can be pushed. He suggests modifying the stack and altstack objects in interpreter.cpp to count entries differently. He believes this modification would be simple enough and could be enabled unconditionally, as it cannot be violated prior to OP_CAT.

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