Hi all,
I've done an exploration of what would be required (given
OP_TX/OP_TXHASH or equivalent way of pushing a scriptPubkey on the
stack) to usefully validate Taproot outputs in Bitcoin Script. Such
functionality is required for usable vaults, at least.
https://rusty.ozlabs.org/2023/10/20/examining-scriptpubkey-in-script.html
(If anyone wants to collaborate to produce a prototype, and debug my
surely-wrong script examples, please ping me!)
TL;DR: if we have OP_TXHASH/OP_TX, and add OP_MULTISHA256 (or OP_CAT),
OP_KEYADDTWEAK and OP_LESS (or OP_CONDSWAP), and soft-fork weaken the
OP_SUCCESSx rule (or pop-script-from-stack), we can prove a two-leaf
tapscript tree in about 110 bytes of Script. This allows useful
spending constraints based on a template approach.
Thanks!
Rusty.
_______________________________________________
bitcoin-dev mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev