Posted by Rusty Russell
Oct 24, 2023/00:48 UTC
In the email, Andrew Poelstra discusses his experience with rolling sha2 and the use of OP_MULTISHA256
in his templating investigations with OP_TXHASH
. He mentions that he prefers OP_MULTISHA256
over OP_CAT
, but acknowledges that OP_CAT
allows for a Schnorr signature trick. He suggests considering the use of rolling sha2, but also mentions that he just learned about the 1000 element limit and couldn't find it in BIP-141 upon scanning.
To address the 1000 element limit, Andrew proposes a solution where instead of counting simple stack depth, each stack entry is counted as (1 + /520) entries. He explains that even though only 520 bytes can be pushed, these entries can still be made with OP_CAT
. He notes that the stack
and altstack
variables in interpreter.cpp
would need to be objects instead of vectors to count entries differently. However, he believes that implementing this logic would be simple enough and could be enabled unconditionally since it cannot be violated prior to using OP_CAT
.
Overall, Andrew's email touches on his preference for OP_MULTISHA256
in his templating investigations, his acknowledgement of the 1000 element limit, and his proposal to address this limit by counting each stack entry differently.
TLDR
We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project?
Give Feedback