TXHASH + CHECKSIGFROMSTACKVERIFY in lieu of CTV and ANYPREVOUT



Summary:

On February 15, 2022, Rusty Russell responded to Jeremy Rubin's post on the Bitcoin-dev mailing list, which highlighted the differences between CheckTemplateVerify (CTV) and TXHASH. Rubin argued that CTV required the contract to be fully enumerated and was non-recursive, making it less powerful than TXHASH. For example, a simple contract allowing n participants to take action in any order with CTV would require factorial pre-computations, while a more interpretive covenant with recursion features could compute programs for addresses in constant time. Additionally, CTV requires the contract to be fully enumerated, limiting its applicability to open-ended situations like creating many identical outputs over time without constraining their values. Russell agreed with Rubin's assessment and added that the useful distinction between CTV and TXHASH was the "limited to complete enumeration" bright line. He believed that if TXHASH was limited to requiring flags included in the hash, it would have the same upfront nature as CTV.


Updated on: 2023-06-15T15:33:17.343130+00:00