summaryrefslogtreecommitdiff
path: root/26/8a930fcd5d2a0f22bcc181af795ab8d7a1a0c1
blob: 4c129deb03a514e4f7a7b1cc03d34a42d84c7086 (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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
Return-Path: <bounce+33760e.2c141-bitcoin-dev=lists.linuxfoundation.org@suredbits.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id C65FEB1E
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 19 Jun 2017 15:41:06 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from so254-16.mailgun.net (so254-16.mailgun.net [198.61.254.16])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 37416AA
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 19 Jun 2017 15:41:05 +0000 (UTC)
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=suredbits.com;
	q=dns/txt; 
	s=mailo; t=1497886864; h=Content-Type: Cc: To: Subject: Message-ID:
	Date: From: References: In-Reply-To: MIME-Version: Sender;
	bh=kbCU9OOR3n30j5XqGI+z63n7228q+b6BpVYE5VYo2u4=;
	b=te/t4WkOV7YbL0e9I/GKs9RLQv412z3Nm+kBm6uxWC410YOzHxDtAvwmoiKYCRsDuaYYiCy4
	w/wnV1LOGLXgosJSF9XIGgwIYPUfd3mKtVTCDPrX08ZQ2On6Ls3e5UfaJpqtnDZTqAbpbR08
	UxyaDobmN1uCbhqLqTgPL6FTFQw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=suredbits.com; s=mailo;
	q=dns; h=Sender: MIME-Version: In-Reply-To: References: From: Date:
	Message-ID: Subject: To: Cc: Content-Type;
	b=HEy9t/0bD2jkacKR0C8fR1gbLzmiNYxDQhOkrgg73gION45ez4kyew5nXbhoulpeAFpMvQ
	kqXKJHYvXXufT5phRDETqNvlGQeDuna9aZC6MnHGihGD/z1akHche832c+kEwqRmuKH9hTUV
	JJloRmkTIyEHKnuMVGuYRTp22A0zQ=
Sender: chris@suredbits.com
X-Mailgun-Sending-Ip: 198.61.254.16
X-Mailgun-Sid: WyI5MGYzNyIsICJiaXRjb2luLWRldkBsaXN0cy5saW51eGZvdW5kYXRpb24ub3JnIiwgIjJjMTQxIl0=
Received: from mail-it0-f50.google.com (mail-it0-f50.google.com
	[209.85.214.50])
	by mxa.mailgun.org with ESMTP id 5947f08e.7f29b82afdf0-smtp-out-n03;
	Mon, 19 Jun 2017 15:41:02 -0000 (UTC)
Received: by mail-it0-f50.google.com with SMTP id m47so68724980iti.1
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 19 Jun 2017 08:41:02 -0700 (PDT)
X-Gm-Message-State: AKS2vOzUNcKWMIGDjm8mlUKYe/NBgdDjXFdOflABZXciZN6KJIJoY+4o
	Bwt+xMWNsDa2b4XOKLw/Z/WXk4Shfg==
X-Received: by 10.36.0.70 with SMTP id 67mr15567410ita.114.1497886861969; Mon,
	19 Jun 2017 08:41:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.185.3 with HTTP; Mon, 19 Jun 2017 08:41:01 -0700 (PDT)
In-Reply-To: <CAGL6+mGZZ=wG8P_DNj3PXVf==mLjJwA_bESh0_UdH2iVBY7GQA@mail.gmail.com>
References: <24f2b447-a237-45eb-ef9f-1a62533fad5c@gmail.com>
	<dhstGQudLBiwjDlaRrmMfy-ixwvXcwMr1CzCkPKh285RLICGZixkbdwpTDc2Sgz8eYIqSem8lwxW6QeJCD7aFfwQjLDnZ2NmOw0Zzd-KgSs=@protonmail.com>
	<CA+XQW1jZpJ9wnEg47fouyywL09=_vU8dMP3owkkuNqRvzTZUDg@mail.gmail.com>
	<CAE-z3OUYuAXE2+h60A=r4UyGU4CSQuF98oFgHnD7iaj-=Z=yOw@mail.gmail.com>
	<CA+XQW1hRhcxJBoOJ57YG0t5y5j1Qm3RO4wr2eXV5V-UzDaiPPw@mail.gmail.com>
	<CAE-z3OVWXN58X-+nAFTm61G1=v_1xrniyrBy8x=VRG4N149aXQ@mail.gmail.com>
	<141a0cd1-9d4f-c137-a349-17248f9cafd4@gmail.com>
	<CAE-z3OXY2YiQ5fzxZBw4FooRsUzXricHmpv_+t+HbTf0MxP0kg@mail.gmail.com>
	<CAGL6+mFu-W9BXs+ipDQod33XZn85Rj=cDzhanVDY5wLzRbkFTQ@mail.gmail.com>
	<a60d1d58-59cd-e304-3b49-ba29ddf4de45@gmail.com>
	<CAGL6+mGZZ=wG8P_DNj3PXVf==mLjJwA_bESh0_UdH2iVBY7GQA@mail.gmail.com>
From: Chris Stewart <chris@suredbits.com>
Date: Mon, 19 Jun 2017 10:41:01 -0500
X-Gmail-Original-Message-ID: <CAGL6+mGJYAVDcpPq6AyDE1iqfFUNt+0LVaAm+ic-yO3FmtKS+g@mail.gmail.com>
Message-ID: <CAGL6+mGJYAVDcpPq6AyDE1iqfFUNt+0LVaAm+ic-yO3FmtKS+g@mail.gmail.com>
To: CryptAxe <cryptaxe@gmail.com>
Content-Type: multipart/alternative; boundary="001a11c01b1852991d055251f6f2"
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, HTML_MESSAGE,
	RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
X-Mailman-Approved-At: Mon, 19 Jun 2017 15:43:33 +0000
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Drivechain -- Request for Discussion
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: Mon, 19 Jun 2017 15:41:06 -0000

--001a11c01b1852991d055251f6f2
Content-Type: text/plain; charset="UTF-8"

>
> Since the sidechain has the sidechain BMM headers that they want the LD
> (bribe) data for, I think that they could specifically request LD data
> relevant only to that sidechain by providing a list of hashes to the
> mainchain, and the mainchain can return a list of boolean values telling
> the sidechain if the LD data exists. That way the data never even has to
> go over the network, just a verification that it exists on the mainchain
> and
>

Since you seem to be talking about the initial block download process for
the drivechain. It seems that we might as well request the set of *valid*
blocks from a bitcoin peer first, since at the end of the day they are in
control of the mining process on the sidechain. Here is what I envision:

   1. Request all hashes for sidechain from a bitcoin peer
   2. Request all sidechain block header's for the hashes the bitcoin peer
   gave us
   3. Order the set of sidechain block headers by looking at hashPrevBlock.
   4. Request full sidechain blocks and start validating against the
   consensus rule set of the sidechain


we can drop the sidechain_id from the script.

I agree the 'sidechain_id' is unneeded in the coinbase tx output. We should
just fix these based on index. This should be reflected in my latest commit
if we are talking about the same thing:
https://github.com/Christewart/bitcoin/blob/c355e39fbe2ea48856ea86b25cb8a97710feb032/src/script/script.cpp#L254


and have the sidechain handle filtering out invalid LD data /
> only requesting the verification of LD data that they know to be valid
> as far as chain order goes.
>

 I agree, the whole point of BMM is to have bitcoin miners indifferent to
what happens in the sidechain (although Paul argues in a wonky way they do
care sort of). If there is an invalid (in the sense the block it represents
does *not* follow the sidechain's consensus rule set) OP_BRIBEVERIFY that
pays *more* money than a valid OP_BRIBEVERIFY output, we need to assume
that a 'blind' bitcoin miner will choose the one that pays them the most
money.

>I might be wrong but I thought that OP_RETURN outputs do not go into the
UTXO set. Anyone else want to chime in?

I'm fairly certain you are right. It just feels like we should be able to
exploit the fact that *only* miners can claim these OP_BRIBEVERIFY outputs.
I'll have to think about this more, maybe some one else can come up with
something clever that exploits that fact.

On Mon, Jun 19, 2017 at 10:24 AM, Chris Stewart <stewart.chris1234@gmail.com
> wrote:

> Since the sidechain has the sidechain BMM headers that they want the LD
>> (bribe) data for, I think that they could specifically request LD data
>> relevant only to that sidechain by providing a list of hashes to the
>> mainchain, and the mainchain can return a list of boolean values telling
>> the sidechain if the LD data exists. That way the data never even has to
>> go over the network, just a verification that it exists on the mainchain
>> and
>>
>
> Since you seem to be talking about the initial block download process for
> the drivechain. It seems that we might as well request the set of *valid*
> blocks from a bitcoin peer first, since at the end of the day they are in
> control of the mining process on the sidechain. Here is what I envision:
>
>    1. Request all hashes for sidechain from a bitcoin peer
>    2. Request all sidechain block header's for the hashes the bitcoin
>    peer gave us
>    3. Order the set of sidechain block headers by looking at
>    hashPrevBlock.
>    4. Request full sidechain blocks and start validating against the
>    consensus rule set of the sidechain
>
>
> we can drop the sidechain_id from the script.
>
> I agree the 'sidechain_id' is unneeded in the coinbase tx output. We
> should just fix these based on index. This should be reflected in my latest
> commit if we are talking about the same thing: https://github.com/
> Christewart/bitcoin/blob/c355e39fbe2ea48856ea86b25cb8a9
> 7710feb032/src/script/script.cpp#L254
>
>
> and have the sidechain handle filtering out invalid LD data /
>> only requesting the verification of LD data that they know to be valid
>> as far as chain order goes.
>>
>
>  I agree, the whole point of BMM is to have bitcoin miners indifferent to
> what happens in the sidechain (although Paul argues in a wonky way they do
> care sort of). If there is an invalid (in the sense the block it represents
> does *not* follow the sidechain's consensus rule set) OP_BRIBEVERIFY that
> pays *more* money than a valid OP_BRIBEVERIFY output, we need to assume
> that a 'blind' bitcoin miner will choose the one that pays them the most
> money.
>
> >I might be wrong but I thought that OP_RETURN outputs do not go into the
> UTXO set. Anyone else want to chime in?
>
> I'm fairly certain you are right. It just feels like we should be able to
> exploit the fact that *only* miners can claim these OP_BRIBEVERIFY outputs.
> I'll have to think about this more, maybe some one else can come up with
> something clever that exploits that fact.
>
> On Sun, Jun 18, 2017 at 4:27 PM, CryptAxe via bitcoin-dev <
> bitcoin-dev@lists.linuxfoundation.org> wrote:
>
>> > >OP_RETURN <sidechain_id> <critical hash>
>> >
>> > I think it is redundant here to have the <sidechain id>, we can
>> > implicitly assume what the sidechain_id is since we have a fixed set
>> > of drivechains. I.e. mining reward is index 0, mimblewimble sidechain
>> > is index 1, etc. CryptAxe has specific indexes defined already in his
>> > implementation:
>> > https://github.com/drivechain-project/bitcoin/blob/mainchain
>> BMM/src/sidechain.h#L26-L30.
>> >
>>
>> Since the sidechain has the sidechain BMM headers that they want the LD
>> (bribe) data for, I think that they could specifically request LD data
>> relevant only to that sidechain by providing a list of hashes to the
>> mainchain, and the mainchain can return a list of boolean values telling
>> the sidechain if the LD data exists. That way the data never even has to
>> go over the network, just a verification that it exists on the mainchain
>> and we can drop the sidechain_id from the script.
>>
>>
>> > I think it would be wise to include a version byte to allow us to
>> > upgrade this commitment structure in the future. Similar to how
>> > witness program's are now versioned.
>>
>> Agreed, we need that.
>>
>>
>> >
>> > ><block height> <sidechain_id> <critical hash> OP_BRIBE_VERIFY
>> >
>> > If <block height> is an argument that OP_BRIBE_VERIFY takes, doesn't
>> > that mean the mainchain miner has to validate this *is* the actual
>> > block height on the sidechain? Does that take the 'blindness' away
>> > from BMM?
>>
>> No, OP_BRIBE (the old version) didn't care about the block height. Where
>> the blockheight was relevant is when bribe data is added to LD. In order
>> to be added to LD, the bribe needed to either be a fork (block height
>> less than the sidechain tip height) or extending the current side-chain
>> (block height = sidechain tip height + 1). The goal of this was to allow
>> for reorgs, and also make it so that people cannot skip forward (which
>> would never be valid so it's a waste of time and space) so that the
>> sidechain makes progress. With the new design that we have been talking
>> about, I think that we will need to drop this requirement from the
>> mainchain, and have the sidechain handle filtering out invalid LD data /
>> only requesting the verification of LD data that they know to be valid
>> as far as chain order goes.
>>
>>
>> >
>> > Overall, I think we need to work on the commitment structure to the
>> > coinbase tx.
>>
>> Agreed. It might be helpful if you outlined the idea you had on IRC to
>> the mailing list.
>>
>>
>> > If I understand the current implementation correctly we can have up to
>> > 256 OP_RETURNs embedded in the coinbase tx signifying new blocks mined
>> > on drivechains.. this seems less than ideal. It might be prudent to
>> > make these outputs ANYONECANSPEND, and then have miners spending these
>> > outputs to themselves for every block mined.. maybe this doesn't have
>> > a benefit over using OP_RETURNs though?
>> >
>> > The structure could be something like:
>> > <version> <critical hash>
>> >
>> > and then in a subsequent block the miner spends that output to
>> > themselves. I will admit I'm not super familiar with how OP_RETURNs
>> > work with the UTXO set -- maybe this scheme doesn't have any benefit.
>> >
>> > -Chris
>>
>> I might be wrong but I thought that OP_RETURN outputs do not go into the
>> UTXO set. Anyone else want to chime in?
>>
>>
>>
>>
>>
>> _______________________________________________
>> bitcoin-dev mailing list
>> bitcoin-dev@lists.linuxfoundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>>
>
>

--001a11c01b1852991d055251f6f2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><blockquote class=3D"gmail_quote" style=3D"margin:0px=
 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Sin=
ce the sidechain has the sidechain BMM headers that they want the LD<br>
(bribe) data for, I think that they could specifically request LD data<br>
relevant only to that sidechain by providing a list of hashes to the<br>
mainchain, and the mainchain can return a list of boolean values telling<br=
>
the sidechain if the LD data exists. That way the data never even has to<br=
>
go over the network, just a verification that it exists on the mainchain<br=
>
and <br></blockquote><div><br></div>Since you seem to be talking about=20
the initial block download process for the drivechain. It seems that we=20
might as well request the set of *valid* blocks from a bitcoin peer=20
first, since at the end of the day they are in control of the mining=20
process on the sidechain. Here is what I envision:<br><ol><li>Request all h=
ashes for sidechain from a bitcoin peer</li><li>Request all sidechain block=
 header&#39;s for the hashes the bitcoin peer gave us</li><li>Order the set=
 of sidechain block headers by looking at hashPrevBlock.<br></li><li>Reques=
t full sidechain blocks and start validating against the consensus rule set=
 of the sidechain</li></ol></div><br><div><blockquote class=3D"gmail_quote"=
 style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p=
adding-left:1ex">we can drop the sidechain_id from the script.</blockquote>=
</div><div>I
 agree the &#39;sidechain_id&#39; is unneeded in the coinbase tx output. We=
=20
should just fix these based on index. This should be reflected in my=20
latest commit if we are talking about the same thing:=20
<a href=3D"https://github.com/Christewart/bitcoin/blob/c355e39fbe2ea48856ea=
86b25cb8a97710feb032/src/script/script.cpp#L254">https://github.com/Christe=
wart/bitcoin/blob/c355e39fbe2ea48856ea86b25cb8a97710feb032/src/script/scrip=
t.cpp#L254</a><br><br><br></div><blockquote class=3D"gmail_quote" style=3D"=
margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef=
t:1ex">and have the sidechain handle filtering out invalid LD data /<br>
only requesting the verification of LD data that they know to be valid<br>
as far as chain order goes.<br></blockquote><div><br></div><div>=C2=A0I=20
agree, the whole point of BMM is to have bitcoin miners indifferent to=20
what happens in the sidechain (although Paul argues in a wonky way they=20
do care sort of). If there is an invalid (in the sense the block it=20
represents does *not* follow the sidechain&#39;s consensus rule set)=20
OP_BRIBEVERIFY that pays *more* money than a valid OP_BRIBEVERIFY=20
output, we need to assume that a &#39;blind&#39; bitcoin miner will choose =
the=20
one that pays them the most money.<br><br>&gt;I might be wrong but I though=
t that OP_RETURN outputs do not go into the<br>
UTXO set. Anyone else want to chime in?<br><br></div>I&#39;m fairly=20
certain you are right. It just feels like we should be able to exploit=20
the fact that *only* miners can claim these OP_BRIBEVERIFY outputs. I&#39;l=
l
 have to think about this more, maybe some one else can come up with=20
something clever that exploits that fact. </div><div class=3D"gmail_extra">=
<br><div class=3D"gmail_quote">On Mon, Jun 19, 2017 at 10:24 AM, Chris Stew=
art <span dir=3D"ltr">&lt;<a href=3D"mailto:stewart.chris1234@gmail.com" ta=
rget=3D"_blank">stewart.chris1234@gmail.com</a>&gt;</span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex"><div dir=3D"ltr"><div><span class=3D""><blockquote=
 class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so=
lid rgb(204,204,204);padding-left:1ex">Since the sidechain has the sidechai=
n BMM headers that they want the LD<br>
(bribe) data for, I think that they could specifically request LD data<br>
relevant only to that sidechain by providing a list of hashes to the<br>
mainchain, and the mainchain can return a list of boolean values telling<br=
>
the sidechain if the LD data exists. That way the data never even has to<br=
>
go over the network, just a verification that it exists on the mainchain<br=
>
and <br></blockquote><div><br></div></span>Since you seem to be talking abo=
ut=20
the initial block download process for the drivechain. It seems that we=20
might as well request the set of *valid* blocks from a bitcoin peer=20
first, since at the end of the day they are in control of the mining=20
process on the sidechain. Here is what I envision:<br><ol><li>Request all h=
ashes for sidechain from a bitcoin peer</li><li>Request all sidechain block=
 header&#39;s for the hashes the bitcoin peer gave us</li><li>Order the set=
 of sidechain block headers by looking at hashPrevBlock.<br></li><li>Reques=
t full sidechain blocks and start validating against the consensus rule set=
 of the sidechain</li></ol></div><span class=3D""><br><div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r=
gb(204,204,204);padding-left:1ex">we can drop the sidechain_id from the scr=
ipt.</blockquote></div></span><div>I
 agree the &#39;sidechain_id&#39; is unneeded in the coinbase tx output. We=
=20
should just fix these based on index. This should be reflected in my=20
latest commit if we are talking about the same thing:=20
<a href=3D"https://github.com/Christewart/bitcoin/blob/c355e39fbe2ea48856ea=
86b25cb8a97710feb032/src/script/script.cpp#L254" target=3D"_blank">https://=
github.com/<wbr>Christewart/bitcoin/blob/<wbr>c355e39fbe2ea48856ea86b25cb8a=
9<wbr>7710feb032/src/script/script.<wbr>cpp#L254</a><br><br><br></div><span=
 class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">and have the =
sidechain handle filtering out invalid LD data /<br>
only requesting the verification of LD data that they know to be valid<br>
as far as chain order goes.<br></blockquote><div><br></div></span><div>=C2=
=A0I=20
agree, the whole point of BMM is to have bitcoin miners indifferent to=20
what happens in the sidechain (although Paul argues in a wonky way they=20
do care sort of). If there is an invalid (in the sense the block it=20
represents does *not* follow the sidechain&#39;s consensus rule set)=20
OP_BRIBEVERIFY that pays *more* money than a valid OP_BRIBEVERIFY=20
output, we need to assume that a &#39;blind&#39; bitcoin miner will choose =
the=20
one that pays them the most money.<span class=3D""><br><br>&gt;I might be w=
rong but I thought that OP_RETURN outputs do not go into the<br>
UTXO set. Anyone else want to chime in?<br><br></span></div>I&#39;m fairly=
=20
certain you are right. It just feels like we should be able to exploit=20
the fact that *only* miners can claim these OP_BRIBEVERIFY outputs. I&#39;l=
l
 have to think about this more, maybe some one else can come up with=20
something clever that exploits that fact. </div><div class=3D"HOEnZb"><div =
class=3D"h5"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On S=
un, Jun 18, 2017 at 4:27 PM, CryptAxe via bitcoin-dev <span dir=3D"ltr">&lt=
;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank"=
>bitcoin-dev@lists.<wbr>linuxfoundation.org</a>&gt;</span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex"><span>&gt; &gt;OP_RETURN &lt;sidechain_id&gt; &lt;=
critical hash&gt;<br>
&gt;<br>
&gt; I think it is redundant here to have the &lt;sidechain id&gt;, we can<=
br>
&gt; implicitly assume what the sidechain_id is since we have a fixed set<b=
r>
&gt; of drivechains. I.e. mining reward is index 0, mimblewimble sidechain<=
br>
&gt; is index 1, etc. CryptAxe has specific indexes defined already in his<=
br>
&gt; implementation:<br>
&gt; <a href=3D"https://github.com/drivechain-project/bitcoin/blob/mainchai=
nBMM/src/sidechain.h#L26-L30" rel=3D"noreferrer" target=3D"_blank">https://=
github.com/drivechain-<wbr>project/bitcoin/blob/mainchain<wbr>BMM/src/sidec=
hain.h#L26-L30</a>.<br>
&gt;<br>
<br>
</span>Since the sidechain has the sidechain BMM headers that they want the=
 LD<br>
(bribe) data for, I think that they could specifically request LD data<br>
relevant only to that sidechain by providing a list of hashes to the<br>
mainchain, and the mainchain can return a list of boolean values telling<br=
>
the sidechain if the LD data exists. That way the data never even has to<br=
>
go over the network, just a verification that it exists on the mainchain<br=
>
and we can drop the sidechain_id from the script.<br>
<span><br>
<br>
&gt; I think it would be wise to include a version byte to allow us to<br>
&gt; upgrade this commitment structure in the future. Similar to how<br>
&gt; witness program&#39;s are now versioned.<br>
<br>
</span>Agreed, we need that.<br>
<span><br>
<br>
&gt;<br>
&gt; &gt;&lt;block height&gt; &lt;sidechain_id&gt; &lt;critical hash&gt; OP=
_BRIBE_VERIFY<br>
&gt;<br>
&gt; If &lt;block height&gt; is an argument that OP_BRIBE_VERIFY takes, doe=
sn&#39;t<br>
&gt; that mean the mainchain miner has to validate this *is* the actual<br>
&gt; block height on the sidechain? Does that take the &#39;blindness&#39; =
away<br>
&gt; from BMM?<br>
<br>
</span>No, OP_BRIBE (the old version) didn&#39;t care about the block heigh=
t. Where<br>
the blockheight was relevant is when bribe data is added to LD. In order<br=
>
to be added to LD, the bribe needed to either be a fork (block height<br>
less than the sidechain tip height) or extending the current side-chain<br>
(block height =3D sidechain tip height + 1). The goal of this was to allow<=
br>
for reorgs, and also make it so that people cannot skip forward (which<br>
would never be valid so it&#39;s a waste of time and space) so that the<br>
sidechain makes progress. With the new design that we have been talking<br>
about, I think that we will need to drop this requirement from the<br>
mainchain, and have the sidechain handle filtering out invalid LD data /<br=
>
only requesting the verification of LD data that they know to be valid<br>
as far as chain order goes.<br>
<span><br>
<br>
&gt;<br>
&gt; Overall, I think we need to work on the commitment structure to the<br=
>
&gt; coinbase tx.<br>
<br>
</span>Agreed. It might be helpful if you outlined the idea you had on IRC =
to<br>
the mailing list.<br>
<span><br>
<br>
&gt; If I understand the current implementation correctly we can have up to=
<br>
&gt; 256 OP_RETURNs embedded in the coinbase tx signifying new blocks mined=
<br>
&gt; on drivechains.. this seems less than ideal. It might be prudent to<br=
>
&gt; make these outputs ANYONECANSPEND, and then have miners spending these=
<br>
&gt; outputs to themselves for every block mined.. maybe this doesn&#39;t h=
ave<br>
&gt; a benefit over using OP_RETURNs though?<br>
&gt;<br>
&gt; The structure could be something like:<br>
&gt; &lt;version&gt; &lt;critical hash&gt;<br>
&gt;<br>
&gt; and then in a subsequent block the miner spends that output to<br>
&gt; themselves. I will admit I&#39;m not super familiar with how OP_RETURN=
s<br>
&gt; work with the UTXO set -- maybe this scheme doesn&#39;t have any benef=
it.<br>
&gt;<br>
&gt; -Chris<br>
<br>
</span>I might be wrong but I thought that OP_RETURN outputs do not go into=
 the<br>
UTXO set. Anyone else want to chime in?<br>
<div class=3D"m_80009271272942707HOEnZb"><div class=3D"m_80009271272942707h=
5"><br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">=
bitcoin-dev@lists.linuxfoundat<wbr>ion.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.<wbr>org=
/mailman/listinfo/bitcoin-d<wbr>ev</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>

--001a11c01b1852991d055251f6f2--