Why Nostr? What is Njump?
2023-06-07 15:36:44
in reply to

Rusty Russell [ARCHIVE] on Nostr: 📅 Original date posted:2015-06-15 📝 Original message:Mark Friedenbach <mark at ...

📅 Original date posted:2015-06-15
📝 Original message:Mark Friedenbach <mark at friedenbach.org> writes:
> There's another important use case which you mentioned Greg, that also
> requires special exemption: compact commitments via mid-state compression.
>
> The use case is an OP_RETURN output sorted last, whose last N bytes are a
> commitment of some kind. A proof of the commitment can then use mid state
> compression to elide the beginning of the transaction.
>
> How do you make a special exemption for this category of outputs? I can't
> think of a very clean way of doing so that doesn't require an ugly
> advertising of sort-order exemptions.

Yes, we can suit any one use case, but not all of them.

For example, outputs shall be sorted by:
1. First byte (or 0 if script is zero length) minus 107.
2. The remainder of the script in lexographical order.

This would put OP_RETURN outputs last.

Though Peter Todd's more general best-effort language might make more
sense. It's not like you can hide an OP_RETURN transaction to make it
look like something else, so that transaction not going to be
distinguished by non-canonical ordering.

Cheers,
Rusty.
Author Public Key
npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx