summaryrefslogtreecommitdiff
path: root/e0/250b8b39827069e964f39f5b41649e97fc0bd7
blob: 86ee7f138c089f6485011efb62bf04ba3c1c66f0 (plain)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
Return-Path: <lf-lists@mattcorallo.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id BD6ECA6E
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sat, 28 Jan 2017 00:36:04 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from mail.bluematt.me (mail.bluematt.me [192.241.179.72])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8B573167
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sat, 28 Jan 2017 00:36:03 +0000 (UTC)
Received: from [172.17.0.2] (gw.vpn.bluematt.me [162.243.132.6])
	by mail.bluematt.me (Postfix) with ESMTPSA id 2EC09137A54;
	Sat, 28 Jan 2017 00:35:58 +0000 (UTC)
From: Matt Corallo <lf-lists@mattcorallo.com>
To: Johnson Lau <jl2012@xbt.hk>,
	Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>,
	Johnson Lau via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>,
	bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>
References: <5B69C153-4623-4664-9C4B-4E0396FF021A@xbt.hk>
Message-ID: <79b7c393-aed5-a5b1-dd5f-f8181dcea9f4@mattcorallo.com>
Date: Sat, 28 Jan 2017 00:35:55 +0000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.6.0
MIME-Version: 1.0
In-Reply-To: <5B69C153-4623-4664-9C4B-4E0396FF021A@xbt.hk>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Subject: Re: [bitcoin-dev] Extension block softfork proposal
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Sat, 28 Jan 2017 00:36:04 -0000

Hey Johnson,

As you know I've always been a rather large critic of this approach.

First a bit of background. Pieter's excellent post on the security of
soft forks [1] covers pretty well why soft forks are preferable to hard
forks by debunking much of the "soft forks are less secure" arguments.
While those arguments apply readily to your proposal, what wasn't
covered are the "soft forks are coercive" arguments. Indeed, many of
those arguments are also bogus. After all, soft forks are not "forks"
without buy-in from the economically relevant community running nodes
which enforce the new rules (ie fork-by-miner-censorship isn't all that
much of a fork at all, and has security properties which I would be
hesitant to use for anything but the smallest of value).

That said, when we start talking about extension blocks, I believe we
start to rapidly enter this "coerciveness" territory. With segwit, we've
seen pretty clearly that the community, much to its detriment, can be
easily made unwilling to speak up for or against a fork, making
consensus an incredibly murky thing.

Luckily, as noted in Pieter's original post, there isn't much harm in
the passive observer not making their voice heard and going along and
enforcing SegWit. SegWit maintains UTXO compatibility and transactions
continue to work as normal, only hiding information necessary to apply
the soft fork's rules from old nodes. This is not significantly
different from any other softfork, where declining to enforce its rules
results in you missing information (only in this case in the form of
additional validity rules instead of signatures themselves, which you
otherwise don't know what to do with). Even better, the bandwidth
increases for fully-validating nodes have been more than offset by other
technology upgrades.

Much of this goes out the window with extension blocks. Instead of the
extra data being reasonable to ignore if you choose to not enforce the
soft fork's rules, all of a sudden a majority (or at least significant
chunk) of transactions on the network are happening in the data you've
chosen to ignore. Instead of being able to reasonably walk back
transaction history to identify risk based on potential
censorship-enforced-transactions (ie transactions in a soft fork you're
not aware of, potentially that only miners are enforcing), all
transactions will look risky. Instead of being able to enforce
fundamental network rules like the 21 million coin limit, you're left to
trust that what is happening on the extension block (which all miners
are largely forced to mine due to the fee revenue opportunity cost).
This ultimately makes it a social cost, not an individual trust problem
- instead of opting into a soft fork's security (or lack thereof) for
your own transaction, the entire network is forced to trust the
extension block.

Finally, this sets us up for some pretty terrible precedent. As we noted
in a footnote of the original sidechains paper, the idea that miners
will start soft-forking in sidechains is a massive risk - it allows
individual large miners and individual economic users to force others to
switch to new consensus rules, with potentially little consensus or review.

[1]
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-December/012014.html

On January 26, 2017 4:39:43 AM EST, Johnson Lau via bitcoin-dev
<bitcoin-dev@lists.linuxfoundation.org> wrote:
>This is a pre-BIP which allows extra block space through a soft-fork.
>It is completely transparent to existing wallets (both send and
>receive), but new wallets taking advantage of the extra block space
>will have a very different user experience.
>
>I’m sure this is controversial but I think it’s an interesting academic
>topic. If we’d ever have any fully consensus enforced 2-way-peg side
>chain design, that’d be something like this.
>
>Objectives:
>
>1. Provide more block space through a soft forks
>2. Completely transparent to existing wallets
>3. Not breaking any current security assumptions
>
>
>Specification and Terminology:
>
>Main block / block: the current bitcoin block (with witness if BIP141
>is activated)
>
>Main transaction / tx: txs in the current bitcoin network (with
>witness)
>
>Main UTXO / UTXO: the normal UTXO
>
>Extension transaction / xtx: transactions with a format same as the
>witness tx format described in BIP141, without scriptSig field, and the
>“flag” as 0x02. Only witness program are allowed for scriptPubKey of
>xtx
>
>Extension block / xblock: xblock is a collection of xtx. Each block may
>have 0 or 1 xblock when this softfork is activated.
>
>Extension UTXO / xUTXO: the UTXO set for of the extension block.
>
>Bridging witness program: A new type of witness program is defined. The
>witness script version is OP_2. The program length could be 4 to 40.
>The first byte ("direction flag”[note 1]) must be 0x00 (indicating
>block->xblock) or 0x01 (indicating xblock->block). Like P2WPKH and
>P2WSH, the bridging program could be wrapped by P2SH. There are 2 ways
>to spend this program type on the main block:
>1) Spend it like a usual witness program with a tx. For example, if the
>bridging program is OP_2 <0x000014{20 bytes}>, it could be spent like a
>version-0 20bytes programme, i.e. P2WPKH. Nothing special would happen
>in this case
>2) Spend it like a usual witness program with a special xtx, the
>genesis xtx. In this case, the miner including this xtx will need to do
>more as described below.
>
>Integrating UTXO: a special UTXO with a value >= the total value of all
>existing xUTXO and scriptPubKey is OP_1. (to make the spec easier to
>read, here we assume that now we have a zero value UTXO with its
>outpoint hardcoded as the initial integrating UTXO. In practice we may
>have the first miner making xblock to create the initial integrating
>UTXO)
>
>Integrating transaction: if a block has an xblock, the second
>transaction in the block must be the integrating transaction. The
>inputs include the spent UTXO of all the genesis xtx in this xblock. If
>it is a bare witness program, the witness must be empty. If it is a
>P2SH witness program, the scriptSig must be the bridging witness
>program and the witness must be empty. The last input must be the
>original integrating UTXO, with empty witness and scriptSig. If no one
>is trying to send money back from the xblock to the main block, the
>only output is the updated integrating UTXO, which the value must be >=
>the total value of all xUTXO
>
>————
>Up to now, I have described how we could send bitcoins from the main
>UTXO to the xUTXO. Simply speaking, people send money to a new form of
>witness programme. They have the flexibility to spend it in the main
>block or xblock. Nothing special would happen if they send to the main
>block. If they send to the xblock, the value of such UTXO will be
>collected by the integrating UTXO.
>
>After people sent money to xblock, they could trade inside the xblock
>just like in the main block. Since xblock is invisible to the
>pre-softfork users, we could have whatever size limit for the xblock,
>which is not a topic of this proposal.
>
>The tricky part is sending from xblock to main block.
>
>Returning transaction: returning transaction is a special xtx, sending
>money to a bridging witness program, with a direction flag of 0x01.
>These bridging witness program won’t be recorded in the xUTXO set.
>Instead, an output is added to the integrating tx, with the bridging
>witness program and corresponding value, called the “returning UTXO”.
>The returning UTXOs are not spendable until confirmed by 100 blocks.
>The updated integrating UTXO is the last output, and is not restricted
>by the 100-block requirement
>
>Fees collection in xblock: Same as normal tx, people pay fee in xblock
>by making output value < input value. Since the value of the
>integrating UTXO is >= the total value of all existing xUTXO, if fees
>are paid in the xblock, that will reduce the value of the integrating
>UTXO, and miners are paid through the usual coinbase tx as fee.
>
>xblock commitment: 2 xblock merkle root, with and without witness, are
>placed exactly after the witness commitment in the coinbase tx.(maybe
>we could use the coinbase reserved witness value, details TBD). If
>there is no xblock commitment, xblock must be empty and integrating tx
>is not allowed.
>
>————
>Same as any 2-way-peg proposal, sending money from the side chain to
>the main chain is always the most tricky part. Different from other
>side chain proposals like Rootstock, extension block is fully consensus
>enforced, and has the same security level as existing bitcoin
>transactions. To ensure this, an 100-block maturity is needed for the
>returning UTXO, as the TXID of the integrating transaction is *very*
>likely to change after a reorg, which will break the transaction chains
>coming from it. The 100-block maturity requirement bring us back to the
>usual assumption that txs become permanent after 100 confirmations.
>
>Please note that this drastically changes the user experience, as no
>current users (expect miners) would expect such 100-block freezing.
>That’s why I don’t allow the returning UTXO to have an arbitrary
>scriptPubKey, as users of current wallet would never expect such
>freezing. Using a special output scriptPubKey guarantees that the
>recipient must understand the implications. Users of the new wallet
>should be warned that despite they may enjoy lower fees in the xblock,
>it may be difficult for them to send money to legacy wallets. This is a
>huge limitation.
>
>Maybe we could have some decentralised market (using simple
>hash-time-locked txs) allowing people to exchange value between block
>and xblock, bypassing the 100 block requirement. This is actually
>cheaper, because a full returning is a 2-step process, while p2p
>exchange is only 1-step.
>
>————
>
>Questions:
>
>1. Is it possible to simplify the design, without compromising
>security?
>2. Is it acceptable to do it without the 100-block maturity
>requirement, thus breaking some long-held assumptions? (This would
>vastly improve the usability, until a reorg happens)
>3. Even with maturity requirement, is 100-block an overkill? We never
>had a fork over maybe 20 blocks. Also, breaking of transaction chain
>due to reorg is already possible, as people may double spend during a
>reorg.
>
>[note 1] the direction flag is needed to make sure a recipient won’t be
>paid with a returning transaction, unless explicitly requested. It
>might be combined with the serialised witness version to save one byte.
>_______________________________________________
>bitcoin-dev mailing list
>bitcoin-dev@lists.linuxfoundation.org
>https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev