What is Nostr?
Anthony Towns [ARCHIVE] /
npub17rl…9l2h
2023-06-07 23:10:45
in reply to nevent1q…q3as

Anthony Towns [ARCHIVE] on Nostr: 📅 Original date posted:2022-06-24 📝 Original message:On Tue, May 10, 2022 at ...

📅 Original date posted:2022-06-24
📝 Original message:On Tue, May 10, 2022 at 08:05:54PM +0930, Rusty Russell via bitcoin-dev wrote:

> OPTX_SEPARATELY: treat fields separately (vs concatenating)
> OPTX_UNHASHED: push on the stack without hashing (vs SHA256 before push)

> OPTX_SELECT_OUTPUT_AMOUNT32x2*: sats out, as a high-low u31 pair
> OPTX_SELECT_OUTPUT_SCRIPTPUBKEY*: output scriptpubkey

Doing random pie-in-the-sky contract design, I had a case where I
wanted to be able to say "update the CTV hash from commiting to outputs
[A,B,C,D,E] to outputs [A,B,X,D,E]". The approach above and the one CTV
takes are somewhat awkward for that:

* you have to include all of A,B,D,E in order to generate both hashes,
which seems less efficient than a merkle path

* proving that you're taking an output in its entirety, rather than,
say, the last 12 bytes of C and the first 30 bytes of D, seems hard.
Again, it seems like a merkle path would be better?

This is more of an upgradability concern I think -- ie, only relevant if
additional features like CAT or TLUV or similar are added; but both OP_TX
and CTV seem to be trying to take upgradability into account in advance,
so I thought this was worth raising.

Cheers,
aj
Author Public Key
npub17rld56k4365lfphyd8u8kwuejey5xcazdxptserx03wc4jc9g24stx9l2h