The hash would normally also cover the hash flags in use, and would be different in those two cases.

But yes, it seems at the last minute I did include a suggestion to disable covering the flag themselves in the hash and appear to have accidentally allowed for recursive covenants (a common occurrence when designing opcodes).

On Sat, Jan 29, 2022 at 12:01 PM Jeremy Rubin <j@rubin.io> wrote:



Perhaps there is some misunderstanding.  TXHASH + CSFSV doesn't allow for complex or recursive covenants.  Typically CAT is needed, at minimum, to create those sorts of things.  TXHASH still amounts to deploying a non-recursive covenant construction.


This seems false to me. 

<Only hash a single input scriptpubkey> txhash <only hash a single output scriptpubkey> txhash equalverify

Is that not a recursive covenant? With a little extra work you can also control for amounts and stuff.