public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [bitcoin-dev] Examining ScriptPubkeys in Bitcoin Script
@ 2023-10-20  3:40 Rusty Russell
  2023-10-20 14:19 ` Brandon Black
  2023-10-27  7:00 ` Anthony Towns
  0 siblings, 2 replies; 8+ messages in thread
From: Rusty Russell @ 2023-10-20  3:40 UTC (permalink / raw)
  To: Bitcoin Protocol Discussion

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-11-01 12:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-20  3:40 [bitcoin-dev] Examining ScriptPubkeys in Bitcoin Script Rusty Russell
2023-10-20 14:19 ` Brandon Black
2023-10-22  4:16   ` Rusty Russell
2023-10-27  7:00 ` Anthony Towns
2023-10-28  4:49   ` Rusty Russell
2023-10-30 16:20     ` James O'Beirne
2023-10-31  2:24       ` Rusty Russell
2023-10-31 13:05     ` Anthony Towns

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox