Proposed BIP for OP_CAT

Posted by Rusty Russell

Oct 23, 2023/02:13 UTC

In a recent email, Ethan Heilman raises some concerns and questions regarding the current limit of 520 bytes for script templates in Bitcoin. He notes that this limit feels quite small, especially considering that the OP_CAT operation itself adds complexity to scripts.

Ethan points out that using OP_TXHASH and OP_CAT to enforce that two input amounts are equal to one output amount already takes up about 250 bytes of Script. He asks if others also feel that 520 bytes is too limiting and if there was a specific rationale for maintaining this size. He suggests that since the current script limit is 10k, it might be worth considering getting closer to that limit.

Ethan also suggests the possibility of restricting the stack size instead of the overall script size, as OP_CAT does not change the total stack size. He acknowledges that the limit can be increased in future tapscript versions, so it is not necessarily set in stone.

Overall, Ethan's email raises important questions about the current script size limit and suggests exploring potential alternatives or increasing the limit in future versions. Rusty, the recipient of the email, expresses appreciation for the feedback and mentions that the implementation details mentioned by Ethan are not straightforward.

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