Skip to content

Instantly share code, notes, and snippets.

View darosior's full-sized avatar

Antoine Poinsot darosior

View GitHub Profile
@darosior
darosior / MiniTapscript.md
Last active February 14, 2023 08:39
Notes on adapting Miniscript for Tapscript

(Contains input from many people, not my own ideas)

Notes

  • Forbid multi, have a new multi_a itself forbidden in other contexts
  • We now need to care about the maximum stack size (1000). With Taproot it's now also checked before executing the Script.
  • We could have a new d: wrapper that is u because the MINIMALIF rule is consensus
  • It doesn't look like there is interesting combinations of the new CHECKSIGADD opcode with existing fragment. Maybe we could have used it for thresh to save an OP_ADD if the sub was a CHECKSIG, but the arguments aren't in the right order for this.
  • No need to check for the Script size anymore
  • I don't think we need to take the sigop budget into account, as we can't create a Script that would duplicate the signatures.
  • When calculating sizes, keep in mind the signature length is now 64