Posted by Rusty Russell
Oct 23, 2023/02:13 UTC
In an email exchange on the Bitcoin development mailing list, Ethan Heilman expresses his appreciation for a recent implementation related to script templates. He raises a query regarding the order of concatenation, suggesting that if A is at the top of the stack, the resulting concatenation should be BA instead of AB. He also mentions that the current limit of 520 bytes for script templates feels somewhat small, particularly due to the use of OP_CAT, which makes the Script more interesting. He provides an example where enforcing two input amounts equal to one output amount using OP_TXHASH and OP_CAT requires about 250 bytes of Script.
Ethan poses three questions for further consideration:
Do other users find the limit of 520 bytes too restrictive?
Was there a specific rationale behind maintaining this limit? Considering that the current script limit is 10k, could they move closer to that limit?
Should they consider restricting elsewhere instead? Ethan suggests that the total stack size, rather than the byte limit, might be a more appropriate constraint.
Rusty, another participant in the discussion, acknowledges Ethan's points and clarifies that the implementation is not as straightforward as initially indicated. Rusty also mentions that the line of code "vch3.reserve(vch1.size() + vch2.size());" was just a peculiar detail.
Thread Summary (10 replies)
Oct 27 - Oct 27, 2023
11 messages
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