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
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
|
Return-Path: <dscotese@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
[172.17.192.35])
by mail.linuxfoundation.org (Postfix) with ESMTPS id C39B0136F
for <bitcoin-dev@lists.linuxfoundation.org>;
Wed, 3 Apr 2019 21:39:47 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-io1-f41.google.com (mail-io1-f41.google.com
[209.85.166.41])
by smtp1.linuxfoundation.org (Postfix) with ESMTPS id B23F5E3
for <bitcoin-dev@lists.linuxfoundation.org>;
Wed, 3 Apr 2019 21:39:45 +0000 (UTC)
Received: by mail-io1-f41.google.com with SMTP id e13so200222ioq.6
for <bitcoin-dev@lists.linuxfoundation.org>;
Wed, 03 Apr 2019 14:39:45 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=9WvO8PmUjx1fk7Ux5SUzqnDmLAD574gTg3fk89gr2HQ=;
b=NnebnaJJo3aSuegOfTGP0AvV6GzX0m65CrsbS06XHAZ2+RBgHyv38fVss3Nm4yOANL
/4jFVtk6kF2LWyCQsBvrR5uf+UbuLG77QoJsy3e04vaAB52LAAx/QfjHUgZ2OEmW3wCY
j+4aXO/89kNgdoqOoe2DjmTva9C/UY/WcgJ3JGzGS8Q1Tzet7DpHVmsdgyyl4ApLT11e
GQ/8oNuUPfwytjpbthLA2z2HSdbX+wiz3HJ6kdIug80snOGFqwf7QqAU5VN5DZVLfLVs
gyyz+ETXjKkszSttujSvH9eqWtS52HcOqQDz9sr2VSm2tgNQ+xh1VF59cOZQ4fD/HrBc
O8+g==
X-Gm-Message-State: APjAAAU3eA1QTFJOgTvzfPM8kmfrEGbKJnxojO5EO8rtCH4qaMEWTR5u
TGDBHGQ8i8uOmbtQH6leuBNYwfk0WS7rPNJGqfc=
X-Google-Smtp-Source: APXvYqwMhHkV+x0MB6B1E4DgWTjkDPVXwuOYmhH5J+XoYqM7vRNueX32uvsmCE/cgNr1oJesjyktBFIx4q/7M7i1d1U=
X-Received: by 2002:a6b:6f0a:: with SMTP id k10mr1782883ioc.185.1554327584849;
Wed, 03 Apr 2019 14:39:44 -0700 (PDT)
MIME-Version: 1.0
References: <CAPfvXf+JS6ZhXUieWVxiaNa4uhhWwafCk3odMKy5F_yi=XwngA@mail.gmail.com>
<816FFA03-B4D9-4ECE-AF15-85ACBFA4BA8F@jonasschnelli.ch>
<CACiOHGxxqm5Qn8J9u5oDE5Ek5smqB4E4iz4PJOZHpJO5kwP=-A@mail.gmail.com>
In-Reply-To: <CACiOHGxxqm5Qn8J9u5oDE5Ek5smqB4E4iz4PJOZHpJO5kwP=-A@mail.gmail.com>
From: Dave Scotese <dscotese@litmocracy.com>
Date: Wed, 3 Apr 2019 14:39:32 -0700
Message-ID: <CAGLBAhf1NZfT9TunhHAb==mFTfaAacjekQh6Pqn4yBS+90Zw6A@mail.gmail.com>
To: Ethan Scruples <ethan.scruples@gmail.com>,
Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="0000000000008f45780585a71791"
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
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: Wed, 03 Apr 2019 22:47:39 +0000
Subject: Re: [bitcoin-dev] assumeutxo and UTXO snapshots
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: Wed, 03 Apr 2019 21:39:47 -0000
--0000000000008f45780585a71791
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Every block's hash is smaller than the difficulty at that time. Block
569927's hash was VERY small (started with 21 zeros). The ratio of block
hash to difficulty requirement (0xffffffff - difficulty, I think) could be
used to identify blocks as "special," thus providing the opportunity to
popularize unimportant but memorable-and-therefore-useful details. How can
they be useful if they are unimportant? They are useful for sanity
checking. For example, if the drunken bishop walk (or some other popular
randomart) produced by block 569927's hash looked like a face, that would
be memorable: "The block with the smallest hash in 2019 (maybe ever?) looks
like a face after the drunken bishop walk."
If a few of these showed up each year, then Bob and/or Alice would have a
good chance of seeing that something was wrong if and when they checked.
It would not be surprising, given Ethan's assumption that the invalid block
Bob found contributed to Alice's UTXOs, that at some point, the history one
of them has would be missing the memorable things beginning at some block
height because, clearly, one of them has been forked.
Luke's comment that it could "lead to users trusting third parties (like
developers) way too much" is pertinent too, but I think an honest abatement
of that concern is impossible without teaching everyone C++. "Developers"
as an open group (anyone can fork the github repo, find a problem, and make
an issue) deserve the trust we put in them, and that's because they're
accountable (any such error found in the repo will have been put there by
someone). The same thing goes for making it possible to download (*not
just the compiled software*, but) the entire UTXO Set if a commitment of it
is hardcoded into the software, as James suggests. We all trust
"developers" like that, and it's okay. No one holds the "ring of power."
On Wed, Apr 3, 2019 at 8:39 AM Ethan Scruples via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:
> Jonas,
>
> If we can get mandatory UTXO commitments soft forked into Bitcoin, we get
> the advantage of a non-growing IBD, which I think everyone would agree is=
a
> benefit that, uh, grows over time. The thing I do not see people noticing
> is that we actually pay little to no security price for this benefit.
>
> To see this, consider Alice, who starts from a UTXO snapshot made at
> current height - 50,000 and Bob who validates from genesis.
>
> After her partial validation, Alice is satisfied that she is in possessio=
n
> of the UTXO set-- she is in consensus with the rest of the network peers.
>
> However, Bob realizes that there is actually an invalid block at current
> height - 50,001.
>
> Three things to notice:
>
> 1. This scenario essentially cannot happen. There is no way that the
> miners are going to stack 50,000 blocks on top of an invalid block withou=
t
> the economic majority abandoning the invalid chain.
>
> 2. If this scenario DOES happen, Bob has learned about it too late for it
> to matter to Bob. The blockchain Bob wants to be on is the one that
> everyone has been using for the last year, whether or not it is besmirche=
d
> by an invalid block.
>
> 3. If this scenario DOES happen, and Bob DOES want to reject the last
> 50,000 mined blocks as invalid, he may discover to his dismay that in the=
1
> year since the invalid block, mischievous entities have enough time to mi=
ne
> equally weighted alternative histories from the Genesis block forward to
> the invalid block, meaning that Bob has no way to use POW to come to
> consensus with other Bobs out there.
>
> On Wed, Apr 3, 2019 at 3:33 AM Jonas Schnelli via bitcoin-dev <
> bitcoin-dev@lists.linuxfoundation.org> wrote:
>
>> Thanks James for the post.
>>
>> I proposed a similar idea [1] back in 2016 with the difference of signin=
g
>> the UTXO-set hash in a gitian-ish way.
>>
>> While the idea of UTXO-set-syncs are attractive, there are probably stil=
l
>> significant downsides in usability (compared to models with less securit=
y),
>> mainly:
>> * Assume the UTXO set is 6 weeks old (which seems a reasonable age for
>> providing enough security) a peer using that snapshot would still requir=
e
>> to download and verify ~6048 blocks (~7.9GB at 1.3MB blocks,=E2=80=A6 pr=
obably
>> CPU-days on a phone)
>> * Do we semi-trust the peer that servers the UTXO set (compared to a
>> block or tx which we can validate)? What channel to we use to serve the
>> snapshot?
>>
>> If the goal is to run a full node on a consumer device that is also been
>> used for other CPU intense operations (like a phone, etc.), I=E2=80=99m =
not sure if
>> this proposal will lead to a satisfactory user experience.
>>
>> The longer I think around this problem, the more I lean towards acceptin=
g
>> the fact that one need to use dedicated hardware in his own environment =
to
>> perform a painless full validation.
>>
>> /jonas
>>
>> [1]
>> https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-February/01=
2478.html
>>
>> > Am 02.04.2019 um 22:43 schrieb James O'Beirne via bitcoin-dev <
>> bitcoin-dev@lists.linuxfoundation.org>:
>> >
>> > Hi,
>> >
>> > I'd like to discuss assumeutxo, which is an appealing and simple
>> > optimization in the spirit of assumevalid[0].
>> >
>> > # Motivation
>> >
>> > To start a fully validating bitcoin client from scratch, that client
>> currently
>> > needs to perform an initial block download. To the surprise of no one,
>> IBD
>> > takes a linear amount time based on the length of the chain's history.
>> For
>> > clients running on modest hardware under limited bandwidth constraints=
,
>> > say a mobile device, completing IBD takes a considerable amount of tim=
e
>> > and thus poses serious usability challenges.
>> >
>> > As a result, having fully validating clients run on such hardware is
>> rare and
>> > basically unrealistic. Clients with even moderate resource constraints
>> > are encouraged to rely on the SPV trust model. Though we have promisin=
g
>> > improvements to existing SPV modes pending deployment[1], it's worth
>> > thinking about a mechanism that would allow such clients to use trust
>> > models closer to full validation.
>> >
>> > The subject of this mail is a proposal for a complementary alternative
>> to SPV
>> > modes, and which is in the spirit of an existing default,
>> `assumevalid`. It may
>> > help modest clients transact under a security model that closely
>> resembles
>> > full validation within minutes instead of hours or days.
>> >
>> > # assumeutxo
>> >
>> > The basic idea is to allow nodes to initialize using a serialized
>> version of the
>> > UTXO set rendered by another node at some predetermined height. The
>> > initializing node syncs the headers chain from the network, then
>> obtains and
>> > loads one of these UTXO snapshots (i.e. a serialized version of the
>> UTXO set
>> > bundled with the block header indicating its "base" and some other
>> metadata).
>> >
>> > Based upon the snapshot, the node is able to quickly reconstruct its
>> chainstate,
>> > and compares a hash of the resulting UTXO set to a preordained hash
>> hard-coded
>> > in the software a la assumevalid. This all takes ~23 minutes, not
>> accounting for
>> > download of the 3.2GB snapshot[2].
>> >
>> > The node then syncs to the network tip and afterwards begins a
>> simultaneous
>> > background validation (i.e., a conventional IBD) up to the base height
>> of the
>> > snapshot in order to achieve full validation. Crucially, even while th=
e
>> > background validation is happening the node can validate incoming
>> blocks and
>> > transact with the benefit of the full (assumed-valid) UTXO set.
>> >
>> > Snapshots could be obtained from multiple separate peers in the same
>> manner as
>> > block download, but I haven't put much thought into this. In concept i=
t
>> doesn't
>> > matter too much where the snapshots come from since their validity is
>> > determined via content hash.
>> >
>> > # Security
>> >
>> > Obviously there are some security implications due consideration. Whil=
e
>> this
>> > proposal is in the spirit of assumevalid, practical attacks may become
>> easier.
>> > Under assumevalid, a user can be tricked into transacting under a fals=
e
>> history
>> > if an attacker convinces them to start bitcoind with a malicious
>> `-assumevalid`
>> > parameter, sybils their node, and then feeds them a bogus chain
>> encompassing
>> > all of the hard-coded checkpoints[3].
>> >
>> > The same attack is made easier in assumeutxo because, unlike in
>> assumevalid,
>> > the attacker need not construct a valid PoW chain to get the victim's
>> node into
>> > a false state; they simply need to get the user to accept a bad
>> `-assumeutxo`
>> > parameter and then supply them an easily made UTXO snapshot containing=
,
>> say, a
>> > false coin assignment.
>> >
>> > For this reason, I recommend that if we were to implement assumeutxo,
>> we not
>> > allow its specification via commandline argument[4].
>> >
>> > Beyond this risk, I can't think of material differences in security
>> relative to
>> > assumevalid, though I appeal to the list for help with this.
>> >
>> > # More fully validating clients
>> >
>> > A particularly exciting use-case for assumeutxo is the possibility of
>> mobile
>> > devices functioning as fully validating nodes with access to the
>> complete UTXO
>> > set (as an alternative to SPV models). The total resource burden neede=
d
>> to start a node
>> > from scratch based on a snapshot is, at time of writing, a ~(3.2GB
>> > + blocks_to_tip * 4MB) download and a few minutes of processing time,
>> which sounds
>> > manageable for many mobile devices currently in use.
>> >
>> > A mobile user could initialize an assumed-valid bitcoin node within an
>> hour,
>> > transact immediately, and complete a pruned full validation of their
>> > assumed-valid chain over the next few days, perhaps only doing the
>> background
>> > IBD when their device has access to suitable high-bandwidth connection=
s.
>> >
>> > If we end up implementing an accumulator-based UTXO scaling
>> design[5][6] down
>> > the road, it's easy to imagine an analogous process that would allow
>> very fast
>> > startup using an accumulator of a few kilobytes in lieu of a multi-GB
>> snapshot.
>> >
>> > ---
>> >
>> > I've created a related issue at our Github repository here:
>> > https://github.com/bitcoin/bitcoin/issues/15605
>> >
>> > and have submitted a draft implementation of snapshot usage via RPC
>> here:
>> > https://github.com/bitcoin/bitcoin/pull/15606
>> >
>> > I'd like to discuss here whether this is a good fit for Bitcoin
>> conceptually. Concrete
>> > plans for deployment steps should be discussed in the Github issue, an=
d
>> after all
>> > that my implementation may be reviewed as a sketch of the specific
>> software
>> > changes necessary.
>> >
>> > Regards,
>> > James
>> >
>> >
>> > [0]:
>> https://bitcoincore.org/en/2017/03/08/release-0.14.0/#assumed-valid-bloc=
ks
>> > [1]: https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki
>> > [2]: as tested at height 569895, on a 12 core Intel Xeon Silver 4116
>> CPU @ 2.10GHz
>> > [3]:
>> https://github.com/bitcoin/bitcoin/blob/84d0fdc/src/chainparams.cpp#L145=
-L161
>> > [4]: Marco Falke is due credit for this point
>> > [5]: utreexo: https://www.youtube.com/watch?v=3DedRun-6ubCc
>> > [6]: Boneh, Bunz, Fisch on accumulators:
>> https://eprint.iacr.org/2018/1188
>> >
>> > _______________________________________________
>> > bitcoin-dev mailing list
>> > bitcoin-dev@lists.linuxfoundation.org
>> > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>>
>> _______________________________________________
>> bitcoin-dev mailing list
>> bitcoin-dev@lists.linuxfoundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>
--=20
I like to provide some work at no charge to prove my value. Do you need a
techie?
I own Litmocracy <http://www.litmocracy.com> and Meme Racing
<http://www.memeracing.net> (in alpha).
I'm the webmaster for The Voluntaryist <http://www.voluntaryist.com> which
now accepts Bitcoin.
I also code for The Dollar Vigilante <http://dollarvigilante.com/>.
"He ought to find it more profitable to play by the rules" - Satoshi
Nakamoto
--0000000000008f45780585a71791
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div></div><div>Every block's hash is smaller than the=
difficulty at that time.=C2=A0 Block 569927's hash was VERY small (sta=
rted with 21 zeros).=C2=A0 The ratio of block hash to difficulty requiremen=
t (0xffffffff - difficulty, I think) could be used to identify blocks as &q=
uot;special," thus providing the opportunity to popularize unimportant=
but memorable-and-therefore-useful details.=C2=A0 How can they be useful i=
f they are unimportant?=C2=A0 They are useful for sanity checking.=C2=A0 Fo=
r example, if the drunken bishop walk (or some other popular randomart) pro=
duced by=20
block 569927's hash
looked like a face, that would be memorable: "The block with the small=
est hash in 2019 (maybe ever?) looks like a face after the drunken bishop w=
alk."<br></div><div><br></div><div>If a few of these showed up each ye=
ar, then Bob and/or Alice would have a good chance of seeing that something=
was wrong if and when they checked.=C2=A0 It would not be surprising, give=
n Ethan's assumption that the invalid block Bob found contributed to Al=
ice's UTXOs, that at some point, the history one of them has would be m=
issing the memorable things beginning at some block height because, clearly=
, one of them has been forked.<br></div><div><br></div><div>Luke's comm=
ent that it could "lead to users trusting third parties (like develope=
rs) way too much" is pertinent too, but I think an honest abatement of=
that concern is impossible without teaching everyone C++.=C2=A0 "Deve=
lopers" as an open group (anyone can fork the github repo, find a prob=
lem, and make an issue) deserve the trust we put in them, and that's be=
cause they're accountable (any such error found in the repo will have b=
een put there by someone).=C2=A0 The same thing goes for making it possible=
to download (<b>not just the compiled software</b>, but) the entire UTXO S=
et if a commitment of it is hardcoded into the software, as James suggests.=
=C2=A0 We all trust "developers" like that, and it's okay.=C2=
=A0 No one holds the "ring of power."<br></div></div><br><div cla=
ss=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Apr 3, 201=
9 at 8:39 AM Ethan Scruples via bitcoin-dev <<a href=3D"mailto:bitcoin-d=
ev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a>>=
wrote:<br></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"><div dir=
=3D"ltr">Jonas,<div><br></div><div>If we can get mandatory UTXO commitments=
soft forked into Bitcoin, we get the advantage of a non-growing IBD, which=
I think everyone would agree is a benefit that, uh, grows over time. The t=
hing I do not see people noticing is that we actually pay little to no secu=
rity price for this benefit.</div><div><br></div><div>To see this, consider=
Alice, who starts from a UTXO snapshot made at current height - 50,000 and=
Bob who validates from genesis.</div><div><br></div><div>After her partial=
validation, Alice is satisfied that she is in possession of the UTXO set--=
she is in consensus with the rest of the network peers.</div><div><br></di=
v><div>However, Bob realizes that there is actually an invalid block at cur=
rent height - 50,001.</div><div><br></div><div>Three things to notice:</div=
><div><br></div><div>1. This scenario essentially cannot happen. There is n=
o way that the miners are going to stack 50,000 blocks on top of an invalid=
block without the economic majority abandoning the invalid chain.</div><di=
v><br></div><div>2. If this scenario DOES happen, Bob has learned about it =
too late for it to matter to Bob. The blockchain Bob wants to be on is the =
one that everyone has been using for the last year, whether or not it is be=
smirched by an invalid block.</div><div><br></div><div>3. If this scenario =
DOES happen, and Bob DOES want to reject the last 50,000 mined blocks as in=
valid, he may discover to his dismay that in the 1 year since the invalid b=
lock, mischievous entities have enough time to mine equally weighted altern=
ative histories from the Genesis block forward to the invalid block, meanin=
g that Bob has no way to use POW to come to consensus with other Bobs out t=
here.<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=
=3D"gmail_attr">On Wed, Apr 3, 2019 at 3:33 AM Jonas Schnelli via bitcoin-d=
ev <<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_=
blank">bitcoin-dev@lists.linuxfoundation.org</a>> wrote:<br></div><block=
quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1=
px solid rgb(204,204,204);padding-left:1ex">Thanks James for the post.<br>
<br>
I proposed a similar idea [1] back in 2016 with the difference of signing t=
he UTXO-set hash in a gitian-ish way.<br>
<br>
While the idea of UTXO-set-syncs are attractive, there are probably still s=
ignificant downsides in usability (compared to models with less security), =
mainly:<br>
* Assume the UTXO set is 6 weeks old (which seems a reasonable age for prov=
iding enough security) a peer using that snapshot would still require to do=
wnload and verify ~6048 blocks (~7.9GB at 1.3MB blocks,=E2=80=A6 probably C=
PU-days on a phone)<br>
* Do we semi-trust the peer that servers the UTXO set (compared to a block =
or tx which we can validate)? What channel to we use to serve the snapshot?=
<br>
<br>
If the goal is to run a full node on a consumer device that is also been us=
ed for other CPU intense operations (like a phone, etc.), I=E2=80=99m not s=
ure if this proposal will lead to a satisfactory user experience.<br>
<br>
The longer I think around this problem, the more I lean towards accepting t=
he fact that one need to use dedicated hardware in his own environment to p=
erform a painless full validation.<br>
<br>
/jonas<br>
<br>
[1] <a href=3D"https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016=
-February/012478.html" rel=3D"noreferrer" target=3D"_blank">https://lists.l=
inuxfoundation.org/pipermail/bitcoin-dev/2016-February/012478.html</a><br>
<br>
> Am 02.04.2019 um 22:43 schrieb James O'Beirne via bitcoin-dev <=
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">=
bitcoin-dev@lists.linuxfoundation.org</a>>:<br>
> <br>
> Hi,<br>
> <br>
> I'd like to discuss assumeutxo, which is an appealing and simple<b=
r>
> optimization in the spirit of assumevalid[0].<br>
> <br>
> # Motivation<br>
> <br>
> To start a fully validating bitcoin client from scratch, that client c=
urrently<br>
> needs to perform an initial block download. To the surprise of no one,=
IBD<br>
> takes a linear amount time based on the length of the chain's hist=
ory. For<br>
> clients running on modest hardware under limited bandwidth constraints=
,<br>
> say a mobile device, completing IBD takes a considerable amount of tim=
e<br>
> and thus poses serious usability challenges.<br>
> <br>
> As a result, having fully validating clients run on such hardware is r=
are and<br>
> basically unrealistic. Clients with even moderate resource constraints=
<br>
> are encouraged to rely on the SPV trust model. Though we have promisin=
g<br>
> improvements to existing SPV modes pending deployment[1], it's wor=
th<br>
> thinking about a mechanism that would allow such clients to use trust<=
br>
> models closer to full validation.<br>
> <br>
> The subject of this mail is a proposal for a complementary alternative=
to SPV<br>
> modes, and which is in the spirit of an existing default, `assumevalid=
`. It may<br>
> help modest clients transact under a security model that closely resem=
bles<br>
> full validation within minutes instead of hours or days.<br>
> <br>
> # assumeutxo<br>
> <br>
> The basic idea is to allow nodes to initialize using a serialized vers=
ion of the<br>
> UTXO set rendered by another node at some predetermined height. The<br=
>
> initializing node syncs the headers chain from the network, then obtai=
ns and<br>
> loads one of these UTXO snapshots (i.e. a serialized version of the UT=
XO set<br>
> bundled with the block header indicating its "base" and some=
other metadata).<br>
> <br>
> Based upon the snapshot, the node is able to quickly reconstruct its c=
hainstate,<br>
> and compares a hash of the resulting UTXO set to a preordained hash ha=
rd-coded<br>
> in the software a la assumevalid. This all takes ~23 minutes, not acco=
unting for<br>
> download of the 3.2GB snapshot[2].<br>
> <br>
> The node then syncs to the network tip and afterwards begins a simulta=
neous<br>
> background validation (i.e., a conventional IBD) up to the base height=
of the<br>
> snapshot in order to achieve full validation. Crucially, even while th=
e<br>
> background validation is happening the node can validate incoming bloc=
ks and<br>
> transact with the benefit of the full (assumed-valid) UTXO set.<br>
> <br>
> Snapshots could be obtained from multiple separate peers in the same m=
anner as<br>
> block download, but I haven't put much thought into this. In conce=
pt it doesn't<br>
> matter too much where the snapshots come from since their validity is<=
br>
> determined via content hash.<br>
> <br>
> # Security<br>
> <br>
> Obviously there are some security implications due consideration. Whil=
e this<br>
> proposal is in the spirit of assumevalid, practical attacks may become=
easier.<br>
> Under assumevalid, a user can be tricked into transacting under a fals=
e history<br>
> if an attacker convinces them to start bitcoind with a malicious `-ass=
umevalid`<br>
> parameter, sybils their node, and then feeds them a bogus chain encomp=
assing<br>
> all of the hard-coded checkpoints[3].<br>
> <br>
> The same attack is made easier in assumeutxo because, unlike in assume=
valid,<br>
> the attacker need not construct a valid PoW chain to get the victim=
9;s node into<br>
> a false state; they simply need to get the user to accept a bad `-assu=
meutxo`<br>
> parameter and then supply them an easily made UTXO snapshot containing=
, say, a<br>
> false coin assignment.<br>
> <br>
> For this reason, I recommend that if we were to implement assumeutxo, =
we not<br>
> allow its specification via commandline argument[4].<br>
> <br>
> Beyond this risk, I can't think of material differences in securit=
y relative to<br>
> assumevalid, though I appeal to the list for help with this.<br>
> <br>
> # More fully validating clients<br>
> <br>
> A particularly exciting use-case for assumeutxo is the possibility of =
mobile<br>
> devices functioning as fully validating nodes with access to the compl=
ete UTXO<br>
> set (as an alternative to SPV models). The total resource burden neede=
d to start a node<br>
> from scratch based on a snapshot is, at time of writing, a ~(3.2GB<br>
> + blocks_to_tip * 4MB) download and a few minutes of processing time, =
which sounds<br>
> manageable for many mobile devices currently in use.<br>
> <br>
> A mobile user could initialize an assumed-valid bitcoin node within an=
hour,<br>
> transact immediately, and complete a pruned full validation of their<b=
r>
> assumed-valid chain over the next few days, perhaps only doing the bac=
kground<br>
> IBD when their device has access to suitable high-bandwidth connection=
s.<br>
> <br>
> If we end up implementing an accumulator-based UTXO scaling design[5][=
6] down<br>
> the road, it's easy to imagine an analogous process that would all=
ow very fast<br>
> startup using an accumulator of a few kilobytes in lieu of a multi-GB =
snapshot.<br>
> <br>
> ---<br>
> <br>
> I've created a related issue at our Github repository here:<br>
>=C2=A0 =C2=A0<a href=3D"https://github.com/bitcoin/bitcoin/issues/15605=
" rel=3D"noreferrer" target=3D"_blank">https://github.com/bitcoin/bitcoin/i=
ssues/15605</a><br>
> <br>
> and have submitted a draft implementation of snapshot usage via RPC he=
re:<br>
>=C2=A0 =C2=A0<a href=3D"https://github.com/bitcoin/bitcoin/pull/15606" =
rel=3D"noreferrer" target=3D"_blank">https://github.com/bitcoin/bitcoin/pul=
l/15606</a><br>
> <br>
> I'd like to discuss here whether this is a good fit for Bitcoin co=
nceptually. Concrete<br>
> plans for deployment steps should be discussed in the Github issue, an=
d after all<br>
> that my implementation may be reviewed as a sketch of the specific sof=
tware<br>
> changes necessary.<br>
> <br>
> Regards,<br>
> James<br>
> <br>
> <br>
> [0]: <a href=3D"https://bitcoincore.org/en/2017/03/08/release-0.14.0/#=
assumed-valid-blocks" rel=3D"noreferrer" target=3D"_blank">https://bitcoinc=
ore.org/en/2017/03/08/release-0.14.0/#assumed-valid-blocks</a><br>
> [1]: <a href=3D"https://github.com/bitcoin/bips/blob/master/bip-0157.m=
ediawiki" rel=3D"noreferrer" target=3D"_blank">https://github.com/bitcoin/b=
ips/blob/master/bip-0157.mediawiki</a><br>
> [2]: as tested at height 569895, on a 12 core Intel Xeon Silver 4116 C=
PU @ 2.10GHz<br>
> [3]: <a href=3D"https://github.com/bitcoin/bitcoin/blob/84d0fdc/src/ch=
ainparams.cpp#L145-L161" rel=3D"noreferrer" target=3D"_blank">https://githu=
b.com/bitcoin/bitcoin/blob/84d0fdc/src/chainparams.cpp#L145-L161</a><br>
> [4]: Marco Falke is due credit for this point<br>
> [5]: utreexo: <a href=3D"https://www.youtube.com/watch?v=3DedRun-6ubCc=
" rel=3D"noreferrer" target=3D"_blank">https://www.youtube.com/watch?v=3Ded=
Run-6ubCc</a><br>
> [6]: Boneh, Bunz, Fisch on accumulators: <a href=3D"https://eprint.iac=
r.org/2018/1188" rel=3D"noreferrer" target=3D"_blank">https://eprint.iacr.o=
rg/2018/1188</a><br>
> <br>
> _______________________________________________<br>
> bitcoin-dev mailing list<br>
> <a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_bl=
ank">bitcoin-dev@lists.linuxfoundation.org</a><br>
> <a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-=
dev" rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org=
/mailman/listinfo/bitcoin-dev</a><br>
<br>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">=
bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org/mail=
man/listinfo/bitcoin-dev</a><br>
</blockquote></div>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">=
bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org/mail=
man/listinfo/bitcoin-dev</a><br>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g=
mail_signature"><div dir=3D"ltr">I like to provide some work at no charge t=
o prove my value. Do you need a techie?=C2=A0 <br>I own <a href=3D"http://w=
ww.litmocracy.com" target=3D"_blank">Litmocracy</a> and <a href=3D"http://w=
ww.memeracing.net" target=3D"_blank">Meme Racing</a> (in alpha). <br>I'=
m the webmaster for <a href=3D"http://www.voluntaryist.com" target=3D"_blan=
k">The Voluntaryist</a> which now accepts Bitcoin.<br>I also code for <a hr=
ef=3D"http://dollarvigilante.com/" target=3D"_blank">The Dollar Vigilante</=
a>.<br>"He ought to find it more profitable to play by the rules"=
- Satoshi Nakamoto</div></div>
--0000000000008f45780585a71791--
|