1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194]
helo=mx.sourceforge.net)
by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
(envelope-from <rusty@ozlabs.org>) id 1Z4c9N-0008BQ-HF
for bitcoin-development@lists.sourceforge.net;
Mon, 15 Jun 2015 21:42:37 +0000
Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of ozlabs.org
designates 103.22.144.67 as permitted sender)
client-ip=103.22.144.67; envelope-from=rusty@ozlabs.org;
helo=ozlabs.org;
Received: from ozlabs.org ([103.22.144.67])
by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256)
(Exim 4.76) id 1Z4c9L-0004rX-FX
for bitcoin-development@lists.sourceforge.net;
Mon, 15 Jun 2015 21:42:37 +0000
Received: by ozlabs.org (Postfix, from userid 1011)
id 916E8140284; Tue, 16 Jun 2015 07:42:27 +1000 (AEST)
From: Rusty Russell <rusty@rustcorp.com.au>
To: Mark Friedenbach <mark@friedenbach.org>,
Gregory Maxwell <gmaxwell@gmail.com>
In-Reply-To: <CAOG=w-tJjzrR_REJOShULfSO=T3ueHko-oQHdhqMCdZD0G_BDA@mail.gmail.com>
References: <87k2vhfnx9.fsf@rustcorp.com.au>
<CAAS2fgRgWZX_O_2O1bgdFd_04xVp5Lnpw4hf=v6RSTXmsbdzPQ@mail.gmail.com>
<87r3pdembs.fsf@rustcorp.com.au>
<CAAS2fgTY5cqwj5XuKtkD8Z8N1vF=PZMba8EtGkbWnEackOcN8Q@mail.gmail.com>
<CAOG=w-tJjzrR_REJOShULfSO=T3ueHko-oQHdhqMCdZD0G_BDA@mail.gmail.com>
User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.4.1
(x86_64-pc-linux-gnu)
Date: Tue, 16 Jun 2015 06:31:04 +0930
Message-ID: <87eglcelf3.fsf@rustcorp.com.au>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.0 (--)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
See http://spamassassin.org/tag/ for more details.
-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
sender-domain
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
-0.0 SPF_PASS SPF: sender matches SPF record
-0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay
domain
X-Headers-End: 1Z4c9L-0004rX-FX
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] [RFC] Canonical input and output ordering
in transactions
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Mon, 15 Jun 2015 21:42:37 -0000
Mark Friedenbach <mark@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.
|