summaryrefslogtreecommitdiff
path: root/1d/83ced5644c9f020ae9495544e264d9187772d0
blob: 135b4e4f77aac78508dfe8b712521a3341b69f6a (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
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
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
Return-Path: <gsanders87@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 61B8E9C
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed,  5 Apr 2017 15:37:48 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-qt0-f173.google.com (mail-qt0-f173.google.com
	[209.85.216.173])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id EA23A18F
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed,  5 Apr 2017 15:37:43 +0000 (UTC)
Received: by mail-qt0-f173.google.com with SMTP id x35so13832623qtc.2
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed, 05 Apr 2017 08:37:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc; bh=FEWIBl7mZQGCoGnyJ+Dkh6Ms1XHTiZHXpCFbj8+L02o=;
	b=ALnfP2Z13Qvdc1zKqoabuS8ZRWonhKqvabXxbdy/4+xgQY6QdzrIvAI+5ZpbPzSafX
	+cMu44yqS5HIU46h9f7r9xtyoVRiHksT/uPgv7QP56vkXu/kCFwpIAmLMDs8pugVrV9v
	d/vo9sEZhYx+vk6lvrTRX90TBAsenHGneroxsWOyvuM5enjvKqtYRCYFSnZbPLWaGQeA
	9QHLJJ8VyC6qdSpCzQBQnlTWrYJQHJR50Ogi2/tZuCgu1Bsi0ktonbbxTaFD4cqxg1gN
	vtt7yYT969HNS6oDR6mHz7YcKh+F2T4/prjC0fyiUVVvVQ1fE6RRJ8F5Eke8KMAdcgHJ
	ZiIw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc;
	bh=FEWIBl7mZQGCoGnyJ+Dkh6Ms1XHTiZHXpCFbj8+L02o=;
	b=bmN/b3VcLek/FqJPL/8NHn3CjeH/8NL8y8aqVfXNauImB8ra+v0Lqnv4j6Zl1vE9OF
	nOH8OTnX5//KVNU3s6i6r3szCpqPuXy7eYyqfyMDw40OpW1ATlzdHyDSmLE3C6JiesKT
	g3gMWBETTrms13NYmbjHxTblQwsjjrusu3mC93HsBOahWXwgqux89LXpRL7kXaOvz353
	IcGsxRJ5JuXKPOdDiPbReuSD0ZQTKLWIkK8dOA1+h3plzBc6U6186t54Ezp4zT8SS04I
	ZzUE0v/Ef3fGWi8Y2EU62jtMnRLcYpxIMPg/VcDIvoYQ8UMBcCYYcJLxciK3MzMAPWuT
	PISQ==
X-Gm-Message-State: AFeK/H2RH/TYhMEKmb3u2DbWPQJH9KqZX1pZMtXKdLJgTKV6qpkAKWAMiKjT1+GBoAiXCAkWDAAjB4UIjHXp8w==
X-Received: by 10.200.51.117 with SMTP id u50mr31637187qta.133.1491406662788; 
	Wed, 05 Apr 2017 08:37:42 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.12.137.180 with HTTP; Wed, 5 Apr 2017 08:37:22 -0700 (PDT)
In-Reply-To: <CAO3Pvs9DF6F4gDgrNPoUw5bqwb6ajDwwVP9NpcLzpZMzzgMQjw@mail.gmail.com>
References: <201704041803.57409.luke@dashjr.org>
	<B15790EC-B298-4F6A-BEBF-AF8C3DA74EED@xbt.hk>
	<CAO3Pvs9DF6F4gDgrNPoUw5bqwb6ajDwwVP9NpcLzpZMzzgMQjw@mail.gmail.com>
From: Greg Sanders <gsanders87@gmail.com>
Date: Wed, 5 Apr 2017 11:37:22 -0400
Message-ID: <CAB3F3DvNO5G6WHeDr4qu8NWH3AWWgRN=NfGTNQ1myUZDzC1hnQ@mail.gmail.com>
To: Olaoluwa Osuntokun <laolu32@gmail.com>, 
	Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary=001a113ace705a0e88054c6d2cf6
X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,
	HTML_MESSAGE, RCVD_IN_DNSWL_NONE,
	RCVD_IN_SORBS_SPAM autolearn=no 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, 05 Apr 2017 15:44:54 +0000
Subject: Re: [bitcoin-dev] Extension block proposal by Jeffrey et al
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, 05 Apr 2017 15:37:48 -0000

--001a113ace705a0e88054c6d2cf6
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I'd appreciate the authors chiming in, but I read the PASDA differently:

1) If a transaction is mined with a certain bit set, it reserves 700 bytes
for that particular block.
2) In that space, 2 transactions may happen:
a) First, a transaction penalizing the "parent" transaction for fraud by
spending the funds immediately
b) Second, a "free rider" transaction that penalizes fraud within a ~2 week
window

This means during systematic flooding of closing transactions by
Goldfinger, vigilant watchers of their channels can immediately punish the
fraud in the same block using (a), and if they are unable to, need to find
space within two weeks in (b).

This is really in the LN weeds however, so I'll refrain from evaluating the
efficacy of such a solution.

On Wed, Apr 5, 2017 at 10:05 AM, Olaoluwa Osuntokun via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> Hi Y'all,
>
> Thanks to luke-jr and jl2012 for publishing your analysis of the
> xblocks proposal. I'd like to also present some analysis but instead focu=
s
> on the professed LN safety enhancing scheme in the proposal. It's a bit
> underspecified, so I've taken the liberty of extrapolating a bit to fill
> in the gaps to the point that I can analyze it.
>
> TLDR; The xblock proposal includes a sub-proposal for LN which is
> essentially a block-size decrease for each open channel within the networ=
k.
> This decrease reserves space in blocks to allow honest parties guaranteed
> space in the blocks to punish dishonest channel counter parties. As a
> result
> the block size is permanently decreased for each channel open. Some may
> consider this cost prohibitively high.
>
> >> If the second highest transaction version bit (30th bit) is set to to
> `1`
> >> within an extension block transaction, an extra 700-bytes is reserved =
on
> >> the transaction space used up in the block.
>
> > Why wouldn't users set this on all transactions?
>
> As the proposal stands now, it seems that users _are_ able to unilaterall=
y
> use this for all their Bitcoin transactions, as there's no additional cos=
t
> to using the smart-contract safety feature outlined in the proposal.
>
> The new safety measures proposed near the end of this xblock proposal
> could itself consume a dedicated document outlining the prior background,
> context, and implications of this new safety feature. Throughout the rest
> of this post, I'll be referring to the scheme as a Pre-Allocated
> Smart-contract Dispute arena (PASDA, chosen because it sounds kinda like
> "pasta", which brings me many keks). It's rather insufficiently described
> and
> under specified as it stands in the proposal. As a result, if one doesn't
> have the necessary prior context, it might've been skipped over entirely
> as it's difficult to extract the sub-proposal from the greater proposal. =
I
> think I possess the necessary prior context required to required to
> properly analyze the sub-proposal. As a result, I would like to illuminat=
e
> the readers of the ML so y'all may also be able to evaluate this
> sub-proposal independently.
>
>
> ## Background
>
> First, some necessary background. Within LN as it exists today there is
> one particularly nasty systematic risk related to blockchain availability
> in the case of a channel dispute. This risk is clearly outlined in the
> original white paper, and in my opinion a satisfactory solution to the
> risks which safe guard the use of very high-value channels has yet to be
> presented.
>
>
> ### Chain Spam/Censorship Attack Vector
>
> The attack vector mentioned in the original paper is a reoccurring attack
> in systems of this nature: DoS attacks. As it stands today, if a channel
> counterparty is able to (solely, or in collaboration with other attackers=
)
> prevent one from committing a transaction to the chain, they're able to
> steal money from the honest participant in the channel. The attack
> proceeds something like this:
>
>    * Mallory opens a very large channel with me.
>    * We transfer money back and forth in the channel as normal. The natur=
e
>      of these transfers isn't very important. The commitment balances may
>      be modified due to Mallory making multi-hop payments through my
>      channel, or possibly from Mallory directly purchasing some goods I
>      offer, paying via the channel.
>    * Let's call the current commitment number state S_i. In the lifetime
>      of the channel there may exist some state S_j (i < j) s.t Mallory's
>      balance in S_i, is larger than S_j.
>    * At this point, depending on the value of the channel's time-based
>      security parameter (T) it may be possible for Mallory to broadcast
>      state S_i (which has been revoked), and prevent me being able to
>      include by my punishment transaction (PTX) within the blockchain.
>    * If Mallory is able to incapacitate me for a period of time T, or
>      censor my transactions from the chain (either selectively or via a
>      spam attack), then at time K (K > T + B, where B is the time the
>      commitment transaction was stamped in the chain), then she'll be fre=
e
>      to walk away with her settled balance at state S_i. For the sake of
>      simplicity, we're ignoring HTLC's.
>    * Mallory's gain is the difference between the balance at state S_i an=
d
>      S_j. Deepening on the gap between the states, my settled balance at
>      state S_i and the her balance delta, she may be able to fully recoup
>      the funds she initially place in the channel.
>
>
> ### The Role of Channel Reserves as Partial Mitigation
>
> A minor mitigation to this attack that's purely commitment transaction
> policy is to mandate that Mallory's balance in the channel never dips
> below some reserve value R. Otherwise, if at state S_j, Mallory has a
> settled balance of 0 within he channel (all the money if on my side), the=
n
> the attack outline above can under certain conditions be _costless_ from
> her PoV. Replicate this simultaneously across the network in a synchroniz=
ed
> manner (possibly getting some help from your miner friends) and this
> becomes a bit of a problem (to say the least).
>
> Taking this a step further another mitigation that's been proposed is to
> also use the channel reserve to implement a _ceiling_ on the maximum size
> of _any_ in flight HTLC. Similar to the scheme above, this is meant to
> eliminate the possibility of a "costless" attack, as if channel throughpu=
t
> is artificially constrained, then the value of pending HTLC's isn't
> enticing enough to launch a channel breach attack.
>
>
> ### Analysis of Attack Feasibility/Difficulty
>
> The difficulty of the attack is dependant on the time-denominated securit=
y
> parameter T, and the adversaries ability to collude with miners. Purely
> spamming the chain given a very larger T value may be prohibitively
> expensive for the attacker and their profit from launching the attack
> would need to outweigh the cost in transaction fees and idle bitcoin
> required to launch the attack. Considering the case of colluding with
> miners, if mining is highly centralized (as it is now), then that may be =
a
> more attractive attack avenue. In a world of highly decentralized mining
> (let's say a lofty goal of no pool commanding > 5% of the hash power),
> then the attack is much more difficult.
>
> (as an aside schemes that involve transactions committing to the inputs
> they're spending and revealing them at a later date/block (committed
> transactions) may address the miner censorship attack vector)
>
> Depending one's target use of channels, the individuals they open channel=
s
> with, the applications that run on top of the channels, the amount of
> coins within the channel, and the choice of the time parameter T, the
> attack outline above may or may not be an issue from your PoV.  However,
> in order to realize LN's maximum potential of being able to enter a
> smart-contract with a complete stranger on the internet trustlessly,
> without fearing conditions that may lead to monetary losses, the attack
> vector should be mitigated if possible.
>
> In the words of The Architect of the Matrix (and referenced by Tadge at
> his "Level of LN" talk at Scaling Bitcoin Hong Kong: "There are levels of
> survival we are prepared to accept". There exist levels of LN and usage o=
f
> channels, that may not consider this a dire issue.
>
> OK, with the necessary background and context laid out, I'll now analyze
> the solution proposed within the greater xblock proposal, making a brief
> detour to briefly described another proposed solution.
>
> ### Timestop
>
> A prior proposed solution to the failure scenario described above is
> what's known as "time stop". This was proposed by gmaxwell and was briefl=
y
> touched upon in the original LN white paper. The mechanism of the
> time-denominated security parameter T in today's channel construction is
> enforced using OpCheckSequenceVerify. After broadcasting a commitment
> transaction, all outputs paying to the broadcaster of the commitment are
> encumbered with a relative time delay of T blocks, meaning they are unabl=
e
> to claim the funds until time T has elapsed. This time margin gives the
> honest party an opportunity to broadcast their punishment transaction
> iff, the broadcaster has broadcast a prior revoked state.
>
> The idea of time stomp is to introduce a special sequence-locks block
> height to the system. This block height would increase with each block
> along with the regular block height _unless_ the block reaches a certain
> sustained "high water mark". As an example, let's assume that when 3
> blocks in row are above 75% capacity, then the sequence-lock clock stops
> ticking.
>
> The effect of this change is to morph the security risk into simply a
> postponement of the judgment within the contract. With this, DoS attacks
> simply delay the (seemingly) inevitable punishment of the dishonest party
> within the contract.
>
> Aside from some informal discussions and the brief section within the
> original white paper, many details of this proposal are left
> underspecified. For example: how do miners signal to full nodes that the
> sequence-lock clock has stopped? What's the high water mark threshold? Ca=
n
> it go on indefinitely? Should this feature be opt-in?
>
> I think this proposal should be considered in tandem with the proposal
> within the xblock proposal as both have a few unanswered questions that
> need to be further explored.
>
> ## Pre-Allocated Smart-Contract Dispute Area (PASDA)
>
> Aight, now to the LN enhancing proposal that's buried within the
> greater xblock proposal. Introducing some new terminology, I've been
> calling this a: Pre-Allocated Smart-contract Dispute Arena or (PASDA) for
> short. In a nut shell, the key idea of the proposal is this: transactions
> that mark the commencement of a smart contract who's security depends on
> availability of block space for disputes are able to _pre allocate_ a
> section of the block that will _always_ be _reserved_ for dispute
> transactions. With this, contracts is  _guaranteed_ space in blocks to
> handle disputes in the case that the contract breaks down. As an analogy:
> when you enter in a contract with a contractor to build your dream
> kitchen, you _also_ go to a court and reserve a 1-hour block in their
> scheduled to handle a dispute _just in case_ one arises. In the event of =
a
> peaceful resolution to the contract, the space is freed up.
>
> The description in the paper is a bit light on the details, so I'll say u=
p
> front that I'm extrapolating w.r.t to some mechanisms of the construction=
.
> However, I've been involved in some private conversations where the idea
> was thrown around, so I think I have enough context to _maybe_ fill in
> some of the gaps in the proposal.
>
> I'll now restate the proposal. Smart contract transactions set a certain
> bit in their version number. This bit indicates that they wish to
> pre-allocate N bytes in _all_ further blocks _until_ the contract has bee=
n
> reserved. In the specific context of payment channels, this means that
> once a channel is open, until it has been closed, it _decreases_ the
> available block size for all other transactions. As this is a very
> aggressive proposal I think the authors took advantage of the new design
> space within xblocks to include something that may not be readily accepte=
d
> as a modification to the rules of the main chain.
>
> The concrete parameters chosen in the proposal are: each channel opening
> transaction reserves 700-bytes within _each_ block in the chain until the
> transaction has been closed. This pre-allocation has the following
> constraint: a transaction can _only_ take advantage of this allocation if=
f
> it's spending the _first_ output of a smart-contract transaction (has a
> particular bit in the version set). This means that only dispute
> resolution transactions can utilize this space.
>
> The proposal references two allocations, which I've squinted very hard at
> for half a day in an attempt to parse the rules governing them, but so fa=
r
> I've been unable to glean any further details. From my squinting, I
> interpret that half of the allocation is reserved for spending the
> self-output of a transaction in the last 2016 blocks (two weeks) and the
> other half is dedicated to spending the first output of a commitment
> transaction in the _same_ block.
>
> I'm unsure as to why these allocations are separate, and why they aren't
> just combined into a single allocation.
>
> ### Modification to LN Today
>
> This change would require a slight modification to LN as it's currently
> defined today. ATM, we use BIP 69 in order the inputs and outputs of a
> transaction. This is helpful as it lets us just send of signatures for ne=
w
> states as both sides already know the order of the inputs and outputs.
> With PASDA, we'd now need to omit the to-self-output (the output in my
> commitment transaction paying to myself my settled balance) from this
> ordering and _always_ make it the first output (txid:0).
>
> The second change is that this proposal puts a ceiling on on the CSV valu=
e
> allowed by any channel. All CSV delays _must-weeks otherwise, they're
> unable to take advantage of the arena.
>
> ### Modifications to Bitcoin
>
> In order to implement this within Bitcoin, a third utxo set (regular
> block, xblock) must be maintained by all full nodes. Alternatively, this
> can just be a bit in the xblock utxo set. The implementation doesn't
> really matter. Before attempting to pack transactions into a block, the
> total allocation within the PASDA utxo-set must be summed up, and
> subtracted from the block size cap. Only transactions which validly spend
> from one of these UTXO's are able to take advantage of the new space in
> the block.
>
> ## Analysis of PASDA
>
> OK, now for some analysis. First, let's assume that transactions which
> create PASDA UTXO's aren't subject to any additional constraints. If so,
> then this means that _any_ transaction can freely create PASDA UTXO's and
> _decrease_ the block size for _all_ transactions until the UTXO has been
> spent. If my interpretation is correct, then this introduces a new attack
> vector which allows _anyone_ to nearly permanently decrease the block siz=
e
> for all-time with next to zero additional cost. If this is correct, then
> it seems that miners have _zero_ incentive to _ever_ include a transactio=
n
> that creates a PASDA output in their blocks as it robs them of future
> revenue and decreases the available capacity in the system, possibly
> permanently proportionally to _each_ unspent PASDA output in the chain.
>
> Alternatively, let's say the transactions which create PASDA outputs
> _must_ pay a disproportionately high fee in order to pay up front for
> their consumption of the size within all future blocks. If so, then a
> question that arises is: How large a fee? If the fee is very large, then
> the utilization of the smart-contract battling arena is only reserved to
> very high valued channels who can afford very high fees. This may be
> acceptable as if you have a $5 channel, then are you really at risk at
> such a large scale attack on Bitcoin just to steal $5 from you? It's
> important to note that many attacks on LN's contract resolution
> capabilities are also a direct attack on Bitcoin. However, in a world of
> dynamic fees, then it may be the case that the fee paid 6 months ago is
> now a measly fee an no longer covers the costs to miners (and even the
> entire system...).
>
> Finally, here's something I thought of earlier today that possibly
> mitigates the downside from the PoV of the miners (everyone else must
> still accept the costs of a permanent block size decrease). Let's say tha=
t
> in order to create a PASDA output fees are paid as normal. However, for
> _each_ subsequent block, the participants of the contract _must_ pay a
> tribute to miners to account for their loss in revenue due to the
> reduction in block size. Essentially, all PASDA outputs must pay _rent_
> for their pre-allocated space. If rent isn't paid sufficiently and on-tim=
e,
> then the pre-allocate arena space is revoked by miners. There're a few
> ways to construct this payment, but I'll leave that to follow up work as =
I
> just want to shed some light on the PASDA and its implications.
>
> ## Conclusion
>
> I've attempted to fill in some gaps for y'all w.r.t exactly what the
> sub-proposal within the greater xblock proposal consists of and some
> possible implications. I'd like to note that I've taken the liberty of
> filling on some gaps within the sub-proposal as only a single section
> within the greater proposal has been allocated to it. PASDA itself could
> likely fill up an entirely distinct propsal by itself spanning several
> pages. To the authors of the proposal: if my interpretation is inaccurate
> please correct me as I'd also like to better understand the proposal. It'=
s
> possible that everything I've said in this (now rather long) email is
> incorrect.
>
> If you've made it this far, thank you for taking the time out of your day
> to consider my thoughts. It's my hope that we can further analyze this
> sub-proposal in detail and discuss its construction as well as its
> implications on smart-contracts like payment channels on top of Bitcoin.
>
> PASDA purports to address one half of the systematic risks in LN by
> possibly eliminating the DoS vector attack against LN. However, the costs
> of PASDA are very high, and possibly prohibitively so. In my opinion, the
> second attack vector lies in the ability of miners to arbitrarily censor
> transactions spending a particular output. Fungibility enhancing
> techniques such as Committed Transactions may be a viable path forward to
> patch this attack vector.
>
> -- roasbeef
>
>
> On Tue, Apr 4, 2017 at 8:35 PM Johnson Lau via bitcoin-dev <
> bitcoin-dev@lists.linuxfoundation.org> wrote:
>
>> I feel particularly disappointed that while this BIP is 80% similar to m=
y
>> proposal made 2 months ago ( https://lists.linuxfoundation.
>> org/pipermail/bitcoin-dev/2017-January/013490.html ), Matt Corallo was
>> only the person replied me. Also, this BIP seems ignored the txid
>> malleability of the resolution tx, as my major technical critique of xbl=
ock
>> design.
>>
>> But anyway, here I=E2=80=99m only making comments on the design. As I sa=
id in my
>> earlier post, I consider this more as an academic topic than something
>> really ready for production use.
>>
>> > This specification defines a method of increasing bitcoin transaction
>> throughput without altering any existing consensus rules.
>>
>> Softforks by definition tighten consensus rules
>>
>> > There has been great debate regarding other ways of increasing
>> transaction throughput, with no proposed consensus-layer solutions that
>> have proven themselves to be particularly safe.
>>
>> so the authors don=E2=80=99t consider segwit as a consensus-layer soluti=
on to
>> increase transaction throughput, or not think segwit is safe? But logica=
lly
>> speaking if segwit is not safe, this BIP could only be worse. OTOH, segw=
it
>> also obviously increases tx throughput, although it may not be as much a=
s
>> some people wish to have.
>>
>> > This specification refines many of Lau's ideas, and offers a much
>> simpler method of tackling the value transfer issue, which, in Lau's
>> proposal, was solved with consensus-layer UTXO selection.
>>
>> The 2013 one is outdated. As the authors are not quoting it, not sure if
>> they read my January proposal
>>
>> >  extension block activation entails BIP141 activation.
>>
>> I think extension block in the proposed form actually breaks BIP141. It
>> may say it activates segregated witness as a general idea, but not a
>> specific proposal like BIP141
>>
>> > The merkle root is to be calculated as a merkle tree with all extensio=
n
>> block txids and wtxids as the leaves.
>>
>> It needs to be more specific here. How are they exactly arranged? I
>> suggest it uses a root of all txids, and a root of all wtxids, and combi=
ne
>> them as the commitment. The reason is to allow people to prune the witne=
ss
>> data, yet still able to serve the pruned tx to light wallets. If it make=
s
>> txid and wtxid as pairs, after witness pruning it still needs to store a=
ll
>> the wtxids or it can=E2=80=99t reconstruct the tree
>>
>> > Outputs signal to exit the extension block if the contained script is
>> either a minimally encoded P2PKH or P2SH script.
>>
>> This hits the biggest question I asked in my January post: do you want t=
o
>> allow direct exit payment to legacy addresses? As a block reorg will alm=
ost
>> guarantee changing txid of the resolution tx, that will permanently
>> invalidate all the child txs based on the resolution tx. This is a
>> significant change to the current tx model. To fix this, you need to mak=
e
>> exit outputs unspendable for up to 100 blocks. Doing this, however, will
>> make legacy wallet users very confused as they do not anticipate funding
>> being locked up for a long period of time. So you can=E2=80=99t let the =
money sent
>> back to a legacy address directly, but sent to a new format address that
>> only recognized by new wallet, which understands the lock up requirement=
.
>> This way, however, introduces friction and some fungibility issues, and =
I=E2=80=99d
>> expect people using cross chain atomic swap to exchange bitcoin and xbit=
coin
>>
>> To summarise, my questions are:
>> 1. Is it acceptable to have massive txid malleability and transaction
>> chain invalidation for every natural happening reorg?  Yes: the current
>> spec is ok; No: next question (I=E2=80=99d say no)
>> 2. Is locking up exit outputs the best way to deal with the problem? (I
>> tried really hard to find a better solution but failed)
>> 3. How long the lock-up period should be? Answer could be anywhere from =
1
>> to 100
>> 4. With a lock-up period, should it allow direct exit to legacy address?
>> (I think it=E2=80=99s ok if the lock-up is short, like 1-2 block. But is=
 that safe
>> enough?)
>> 5. Due to the fungibility issues, it may need a new name for the tokens
>> in the ext-block
>>
>> > Verification of transactions within the extension block shall enforce
>> all currently deployed softforks, along with an extra BIP141-like rulese=
t.
>>
>> I suggest to only allow push-only and OP_RETURN scriptPubKey in xblock.
>> Especially, you don=E2=80=99t want to replicate the sighash bug to xbloc=
k. Also,
>> requires scriptSig to be always empty
>>
>> > This leaves room for 7 future soft-fork upgrades to relax DoS limits.
>>
>> Why 7? There are 16 unused witness program versions
>>
>> > Witness script hash v0 shall be worth the number of accurately counted
>> sigops in the redeem script, multiplied by a factor of 8.
>>
>> There is a flaw here: witness script with no sigop will be counted as 0
>> and have a lot free space
>>
>> > every 73 bytes in the serialized witness vector is worth 1 additional
>> point.
>>
>> so 72 bytes is 1 point or 0 point? Maybe it should just scale everything
>> up by 64 or 128, and make 1 witness byte =3D 1 point . So it won=E2=80=
=99t provide
>> any =E2=80=9Cfree space=E2=80=9D in the block.
>>
>> > Currently defined witness programs (v0) are each worth 8 points.
>> Unknown witness program outputs are worth 1 point. Any exiting output is
>> always worth 8 points.
>>
>> I=E2=80=99d suggest to have at least 16 points for each witness v0 outpu=
t, so it
>> will make it always more expensive to create than spend UTXO. It may eve=
n
>> provide extra =E2=80=9Cdiscount=E2=80=9D if a tx has more input than out=
put. The overall
>> objective is to limit the UTXO growth. The ext block should be mainly fo=
r
>> making transactions, not store of value (I=E2=80=99ll explain later)
>>
>> > Dust Threshold
>>
>> In general I think it=E2=80=99s ok, but I=E2=80=99d suggest a higher thr=
eshold like 5000
>> satoshi. It may also combine the threshold with the output witness versi=
on,
>> so unknown version may have a lower or no threshold. Alternatively, it m=
ay
>> start with a high threshold and leave a backdoor softfork to reduce it.
>>
>> > Deactivation
>>
>> It is a double-edged sword. While it is good for us to be able to discar=
d
>> an unused chain, it may create really bad user experience and people may
>> even lose money. For example, people may have opened Lightning channels =
and
>> they will find it not possible to close the channel. So you need to make
>> sure people are not making time-locked tx for years, and require people =
to
>> refresh their channel regularly. And have big red warning when the
>> deactivation SF is locked in. Generally, xblock with deactivation should
>> never be used as long-term storage of value.
>>
>> =E2=80=94=E2=80=94=E2=80=94=E2=80=94
>> some general comments:
>>
>> 1. This BIP in current form is not compatible with BIP141. Since most
>> nodes are already upgraded to BIP141, this BIP must not be activated unl=
ess
>> BIP141 failed to activate. However, if the community really endorse the
>> idea of ext block, I see no reason why we couldn=E2=80=99t activate BIP1=
41 first
>> (which could be done in 2 weeks), then work together to make ext block
>> possible. Ext block is more complicated than segwit. If it took dozens o=
f
>> developers a whole year to release segwit, I don=E2=80=99t see how ext b=
lock could
>> become ready for production with less time and efforts.
>>
>> 2. Another reason to make this BIP compatible with BIP141 is we also nee=
d
>> malleability fix in the main chain. As the xblock has a deactivation
>> mechanism, it can=E2=80=99t be used for longterm value storage.
>>
>> 3. I think the size and cost limit of the xblock should be lower at the
>> beginning, and increases as we find it works smoothly. It could be a
>> predefined growth curve like BIP103, or a backdoor softfork. With the
>> current design, it leaves a massive space for miners to fill up with non=
-tx
>> garbage. Also, I=E2=80=99d also like to see a complete SPV fraud-proof s=
olution
>> before the size grows bigger.
>>
>>
>> > On 5 Apr 2017, at 02:03, Luke Dashjr via bitcoin-dev <
>> bitcoin-dev@lists.linuxfoundation.org> wrote:
>> >
>> > Recently there has been some discussion of an apparent work-in-progres=
s
>> > extension block proposal by Christopher Jeffrey, Joseph Poon, Fedor
>> Indutny,
>> > and Steven Pair. Since this hasn't been formally posted on the ML yet,
>> perhaps
>> > it is still in pre-draft stages and not quite ready for review, but in
>> light
>> > of public interest, I think it is appropriate to open it to discussion=
,
>> and
>> > toward this end, I have reviewed the current revision.
>> >
>> > For reference, the WIP proposal itself is here:
>> >    https://github.com/tothemoon-org/extension-blocks
>> >
>> > =3D=3DOverall analysis & comparison=3D=3D
>> >
>> > This is a relatively complicated proposal, creating a lot of additiona=
l
>> > technical debt and complexity in comparison to both BIP 141 and
>> hardforks. It
>> > offers no actual benefits beyond BIP 141 or hardforks, so seems
>> irrational to
>> > consider at face value. In fact, it fits much better the inaccurate
>> criticisms
>> > made by segwit detractors against BIP 141.
>> >
>> > That being said, this proposal is very interesting in construction and
>> is for
>> > the most part technically sound. While ill-fit to merely making blocks
>> larger,
>> > it may be an ideal fit for fundamentally different block designs such =
as
>> > Rootstock and MimbleWimble in absence of decentralised non-integrated
>> > sidechains (extension blocks are fundamentally sidechains tied into
>> Bitcoin
>> > directly).
>> >
>> > =3D=3DFundamental problem=3D=3D
>> >
>> > Extension blocks are a risk of creating two classes of "full nodes":
>> those
>> > which verify the full block (and are therefore truly full nodes), and
>> those
>> > which only verify the "base" block. However, because the extension is
>> > consensus-critical, the latter are in fact not full nodes at all, and
>> are left
>> > insecure like pseudo-SPV (not even real SPV) nodes. This technical
>> nature is
>> > of course true of a softfork as well, but softforks are intentionally
>> designed
>> > such that all nodes are capable of trivially upgrading, and there is n=
o
>> > expectation for anyone to run with pre-softfork rules.
>> >
>> > In general, hardforks can provide the same benefits of an extension
>> block, but
>> > without the false expectation and pointless complexity.
>> >
>> > =3D=3DOther problems & questions=3D=3D
>> >
>> >> These outpoints may not be spent inside the mempool (they must be
>> redeemed
>> > from the next resolution txid in reality).
>> >
>> > This breaks the ability to spend unconfirmed funds in the same block
>> (as is
>> > required for CPFP).
>> >
>> > The extension block's transaction count is not cryptographically
>> committed-to
>> > anywhere. (This is an outstanding bug in Bitcoin today, but impractica=
l
>> to
>> > exploit in practice; however, exploiting it in an extension block may
>> not be
>> > as impractical, and it should be fixed given the opportunity.)
>> >
>> >> The merkle root is to be calculated as a merkle tree with all extensi=
on
>> > block txids and wtxids as the leaves.
>> >
>> > This needs to elaborate how the merkle tree is constructed. Are all th=
e
>> txids
>> > followed by all the wtxids (tx hashes)? Are they alternated? Are txid
>> and
>> > wtxid trees built independently and merged at the tip?
>> >
>> >> Output script code aside from witness programs, p2pkh or p2sh is
>> considered
>> > invalid in extension blocks.
>> >
>> > Why? This prevents extblock users from sending to bare multisig or oth=
er
>> > various possible destinations. (While static address forms do not exis=
t
>> for
>> > other types, they can all be used by the payment protocol.)
>> >
>> > Additionally, this forbids datacarrier (OP_RETURN), and forces spam to
>> create
>> > unprovably-unspendable UTXOs. Is that intentional?
>> >
>> >> The maximum extension size should be intentionally high.
>> >
>> > This has the same "attacks can do more damage than ordinary benefit"
>> issue as
>> > BIP141, but even more extreme since it is planned to be used for futur=
e
>> size
>> > increases.
>> >
>> >> Witness key hash v0 shall be worth 1 point, multiplied by a factor of
>> 8.
>> >
>> > What is a "point"? What does it mean multiplied by a factor of 8? Why
>> not just
>> > say "8 points"?
>> >
>> >> Witness script hash v0 shall be worth the number of accurately counte=
d
>> > sigops in the redeem script, multiplied by a factor of 8.
>> >
>> > Please define "accurately counted" here. Is this using BIP16 static
>> counting,
>> > or accurately counting sigops during execution?
>> >
>> >> To reduce the chance of having redeem scripts which simply allow for
>> garbage
>> > data in the witness vector, every 73 bytes in the serialized witness
>> vector is
>> > worth 1 additional point.
>> >
>> > Is the size rounded up or down? If down, 72-byte scripts will carry 0
>> > points...)
>> >
>> > =3D=3DTrivial & process=3D=3D
>> >
>> > BIPs must be in MediaWiki format, not Markdown. They should be
>> submitted for
>> > discussion to the bitcoin-dev mailing list, not social media and news.
>> >
>> >> Layer: Consensus (soft-fork)
>> >
>> > Extension blocks are more of a hard-fork IMO.
>> >
>> >> License: Public Domain
>> >
>> > BIPs may not be "public domain" due to non-recognition in some
>> jurisdictions.
>> > Can you agree on one or more of these?
>> > https://github.com/bitcoin/bips/blob/master/bip-0002.
>> mediawiki#Recommended_licenses
>> >
>> >> ## Abstract
>> >>
>> >> This specification defines a method of increasing bitcoin transaction
>> > throughput without altering any existing consensus rules.
>> >
>> > This is inaccurate. Even softforks alter consensus rules.
>> >
>> >> ## Motivation
>> >>
>> >> Bitcoin retargetting ensures that the time in between mined blocks
>> will be
>> > roughly 10 minutes. It is not possible to change this rule. There has
>> been
>> > great debate regarding other ways of increasing transaction throughput=
,
>> with
>> > no proposed consensus-layer solutions that have proven themselves to b=
e
>> > particularly safe.
>> >
>> > Block time seems entirely unrelated to this spec. Motivation is unclea=
r.
>> >
>> >> Extension blocks leverage several features of BIP141, BIP143, and
>> BIP144 for
>> > transaction opt-in, serialization, verification, and network services,
>> and as
>> > such, extension block activation entails BIP141 activation.
>> >
>> > As stated in the next paragraph, the rules in BIP 141 are fundamentall=
y
>> > incompatible with this one, so saying BIP 141 is activated is
>> confusingly
>> > incorrect.
>> >
>> >> This specification should be considered an extension and modification
>> to
>> > these BIPs. Extension blocks are _not_ compatible with BIP141 in its
>> current
>> > form, and will require a few minor additional rules.
>> >
>> > Extension blocks should be compatible with BIP 141, there doesn=E2=80=
=99t
>> appear to be
>> > any justification for not making them compatible.
>> >
>> >> This specification prescribes a way of fooling non-upgraded nodes int=
o
>> > believing the existing UTXO set is still behaving as they would expect=
.
>> >
>> > The UTXO set behaves fundamentally different to old nodes with this
>> proposal,
>> > albeit in a mostly compatible manner.
>> >
>> >> Note that canonical blocks containing entering outputs MUST contain a=
n
>> > extension block commitment (all zeroes if nothing is present in the
>> extension
>> > block).
>> >
>> > Please explain why in Rationale.
>> >
>> >> Coinbase outputs MUST NOT contain witness programs, as they cannot be
>> > sweeped by the resolution transaction due to previously existing
>> consensus
>> > rules.
>> >
>> > Seems like an annoying technical debt. I wonder if it can be avoided.
>> >
>> >> The genesis resolution transaction MAY also include a 1-100 byte
>> pushdata in
>> > the first input script, allowing the miner of the genesis resolution t=
o
>> add a
>> > special message. The pushdata MUST be castable to a true boolean.
>> >
>> > Why? Unlike the coinbase, this seems to create additional technical
>> debt with
>> > no apparent purpose. Better to just have a consensus rule every input
>> must be
>> > null.
>> >
>> >> The resolution transaction's version MUST be set to the uint32 max
>> (`2^32 -
>> > 1`).
>> >
>> > Transaction versions are signed, so I assume this is actually simply -=
1.
>> > (While signed transaction versions seemed silly to me, using it for
>> special
>> > cases like this actually makes sense.)
>> >
>> >> ### Exiting the extension block
>> >
>> > Should specify that spending such an exit must use the resolution txid=
,
>> not
>> > the extblock's txid.
>> >
>> >> On the policy layer, transaction fees may be calculated by transactio=
n
>> cost
>> > as well as additional size/legacy-sigops added to the canonical block
>> due to
>> > entering or exiting outputs.
>> >
>> > BIPs should not specify policy at all. Perhaps prefix "For the
>> avoidance of
>> > doubt:" to be clear that miners may perform any fee logic they like.
>> >
>> >> Transactions within the extended transaction vector MAY include a
>> witness
>> > vector using BIP141 transaction serialization.
>> >
>> > Since extblock transactions are all required to be segwit, why wouldn'=
t
>> this
>> > be mandatory?
>> >
>> >> - BIP141's nested P2SH feature is no longer available, and no longer =
a
>> > consensus rule.
>> >
>> > Note this makes adoption slower: wallets cannot use the extblock until
>> the
>> > economy has updated to support segwit-native addresses.
>> >
>> >> To reduce the chance of having redeem scripts which simply allow for
>> garbage
>> > data in the witness vector, every 73 bytes in the serialized witness
>> vector is
>> > worth 1 additional point.
>> >
>> > Please explain why 73 bytes in Rationale.
>> >
>> >> This leaves room for 7 future soft-fork upgrades to relax DoS limits.
>> >
>> > How so? Please explain.
>> >
>> >> A consensus dust threshold is now enforced within the extension block=
.
>> >
>> > Why?
>> >
>> >> If the second highest transaction version bit (30th bit) is set to to
>> `1`
>> > within an extension block transaction, an extra 700-bytes is reserved
>> on the
>> > transaction space used up in the block.
>> >
>> > Why wouldn't users set this on all transactions?
>> >
>> >> `default_witness_commitment` has been renamed to
>> > `default_extension_commitment` and includes the extension block
>> commitment
>> > script.
>> >
>> > `default_witness_commitment` was never part of the GBT spec. At least
>> describe
>> > what this new key is.
>> >
>> >> - Deployment name: `extblk` (appears as `!extblk` in GBT).
>> >
>> > Should be just `extblk` if backward compatibility is supported (and
>> `!extblk`
>> > when not).
>> >
>> >> The "deactivation" deployment's start time...
>> >
>> > What about timeout? None? To continue the extension block, must it be
>> > deactivated and reactivated in parallel?
>> >
>> >
>> > _______________________________________________
>> > 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
>
>

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

<div dir=3D"ltr">I&#39;d appreciate the authors chiming in, but I read the =
PASDA differently:<div><br></div><div>1) If a transaction is mined with a c=
ertain bit set, it reserves 700 bytes for that particular block.</div><div>=
2) In that space, 2 transactions may happen:</div><div>a) First, a transact=
ion penalizing the &quot;parent&quot; transaction for fraud by spending the=
 funds immediately</div><div>b) Second, a &quot;free rider&quot; transactio=
n that penalizes fraud within a ~2 week window</div><div><br></div><div>Thi=
s means during systematic flooding of closing transactions by Goldfinger, v=
igilant watchers of their channels can immediately punish the fraud in the =
same block using (a), and if they are unable to, need to find space within =
two weeks in (b).</div><div><br></div><div>This is really in the LN weeds h=
owever, so I&#39;ll refrain from evaluating the efficacy of such a solution=
.</div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On W=
ed, Apr 5, 2017 at 10:05 AM, Olaoluwa Osuntokun via bitcoin-dev <span dir=
=3D"ltr">&lt;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" targe=
t=3D"_blank">bitcoin-dev@lists.linuxfoundation.org</a>&gt;</span> wrote:<br=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div>Hi Y&#39;all,=C2=
=A0</div><div><br></div><div>Thanks to luke-jr and jl2012 for publishing yo=
ur analysis of the</div><div>xblocks proposal. I&#39;d like to also present=
 some analysis but instead focus</div><div>on the professed LN safety enhan=
cing scheme in the proposal. It&#39;s a bit</div><div>underspecified, so I&=
#39;ve taken the liberty of extrapolating a bit to fill</div><div>in the ga=
ps to the point that I can analyze it.</div><div><br></div><div>TLDR; The x=
block proposal includes a sub-proposal for LN which is</div><div>essentiall=
y a block-size decrease for each open channel within the network.</div><div=
>This decrease reserves space in blocks to allow honest parties guaranteed<=
/div><div>space in the blocks to punish dishonest channel counter parties. =
As a result</div><div>the block size is permanently decreased for each chan=
nel open. Some may</div><div>consider this cost prohibitively high.</div><s=
pan class=3D""><div><br></div><div>&gt;&gt; If the second highest transacti=
on version bit (30th bit) is set to to `1`</div><div>&gt;&gt; within an ext=
ension block transaction, an extra 700-bytes is reserved on</div><div>&gt;&=
gt; the transaction space used up in the block.</div><div><br></div><div>&g=
t; Why wouldn&#39;t users set this on all transactions?</div><div><br></div=
></span><div>As the proposal stands now, it seems that users _are_ able to =
unilaterally</div><div>use this for all their Bitcoin transactions, as ther=
e&#39;s no additional cost</div><div>to using the smart-contract safety fea=
ture outlined in the proposal.=C2=A0</div><div><br></div><div>The new safet=
y measures proposed near the end of this xblock proposal</div><div>could it=
self consume a dedicated document outlining the prior background,</div><div=
>context, and implications of this new safety feature. Throughout the rest<=
/div><div>of this post, I&#39;ll be referring to the scheme as a Pre-Alloca=
ted</div><div>Smart-contract Dispute arena (PASDA, chosen because it sounds=
 kinda like</div><div>&quot;pasta&quot;, which brings me many keks). It&#39=
;s rather insufficiently described and</div><div>under specified as it stan=
ds in the proposal. As a result, if one doesn&#39;t</div><div>have the nece=
ssary prior context, it might&#39;ve been skipped over entirely</div><div>a=
s it&#39;s difficult to extract the sub-proposal from the greater proposal.=
 I</div><div>think I possess the necessary prior context required to requir=
ed to</div><div>properly analyze the sub-proposal. As a result, I would lik=
e to illuminate</div><div>the readers of the ML so y&#39;all may also be ab=
le to evaluate this</div><div>sub-proposal independently.</div><div><br></d=
iv><div><br></div><div>## Background</div><div><br></div><div>First, some n=
ecessary background. Within LN as it exists today there is</div><div>one pa=
rticularly nasty systematic risk related to blockchain availability</div><d=
iv>in the case of a channel dispute. This risk is clearly outlined in the</=
div><div>original white paper, and in my opinion a satisfactory solution to=
 the</div><div>risks which safe guard the use of very high-value channels h=
as yet to be</div><div>presented.=C2=A0</div><div><br></div><div><br></div>=
<div>### Chain Spam/Censorship Attack Vector</div><div><br></div><div>The a=
ttack vector mentioned in the original paper is a reoccurring attack</div><=
div>in systems of this nature: DoS attacks. As it stands today, if a channe=
l</div><div>counterparty is able to (solely, or in collaboration with other=
 attackers)</div><div>prevent one from committing a transaction to the chai=
n, they&#39;re able to</div><div>steal money from the honest participant in=
 the channel. The attack</div><div>proceeds something like this:</div><div>=
<br></div><div>=C2=A0 =C2=A0* Mallory opens a very large channel with me.</=
div><div>=C2=A0 =C2=A0* We transfer money back and forth in the channel as =
normal. The nature</div><div>=C2=A0 =C2=A0 =C2=A0of these transfers isn&#39=
;t very important. The commitment balances may</div><div>=C2=A0 =C2=A0 =C2=
=A0be modified due to Mallory making multi-hop payments through my</div><di=
v>=C2=A0 =C2=A0 =C2=A0channel, or possibly from Mallory directly purchasing=
 some goods I</div><div>=C2=A0 =C2=A0 =C2=A0offer, paying via the channel.<=
/div><div>=C2=A0 =C2=A0* Let&#39;s call the current commitment number state=
 S_i. In the lifetime</div><div>=C2=A0 =C2=A0 =C2=A0of the channel there ma=
y exist some state S_j (i &lt; j) s.t Mallory&#39;s</div><div>=C2=A0 =C2=A0=
 =C2=A0balance in S_i, is larger than S_j.=C2=A0</div><div>=C2=A0 =C2=A0* A=
t this point, depending on the value of the channel&#39;s time-based</div><=
div>=C2=A0 =C2=A0 =C2=A0security parameter (T) it may be possible for Mallo=
ry to broadcast</div><div>=C2=A0 =C2=A0 =C2=A0state S_i (which has been rev=
oked), and prevent me being able to</div><div>=C2=A0 =C2=A0 =C2=A0include b=
y my punishment transaction (PTX) within the blockchain.</div><div>=C2=A0 =
=C2=A0* If Mallory is able to incapacitate me for a period of time T, or</d=
iv><div>=C2=A0 =C2=A0 =C2=A0censor my transactions from the chain (either s=
electively or via a</div><div>=C2=A0 =C2=A0 =C2=A0spam attack), then at tim=
e K (K &gt; T + B, where B is the time the</div><div>=C2=A0 =C2=A0 =C2=A0co=
mmitment transaction was stamped in the chain), then she&#39;ll be free</di=
v><div>=C2=A0 =C2=A0 =C2=A0to walk away with her settled balance at state S=
_i. For the sake of</div><div>=C2=A0 =C2=A0 =C2=A0simplicity, we&#39;re ign=
oring HTLC&#39;s.</div><div>=C2=A0 =C2=A0* Mallory&#39;s gain is the differ=
ence between the balance at state S_i and</div><div>=C2=A0 =C2=A0 =C2=A0S_j=
. Deepening on the gap between the states, my settled balance at</div><div>=
=C2=A0 =C2=A0 =C2=A0state S_i and the her balance delta, she may be able to=
 fully recoup</div><div>=C2=A0 =C2=A0 =C2=A0the funds she initially place i=
n the channel.</div><div><br></div><div><br></div><div>### The Role of Chan=
nel Reserves as Partial Mitigation</div><div><br></div><div>A minor mitigat=
ion to this attack that&#39;s purely commitment transaction</div><div>polic=
y is to mandate that Mallory&#39;s balance in the channel never dips</div><=
div>below some reserve value R. Otherwise, if at state S_j, Mallory has a</=
div><div>settled balance of 0 within he channel (all the money if on my sid=
e), then</div><div>the attack outline above can under certain conditions be=
 _costless_ from</div><div>her PoV. Replicate this simultaneously across th=
e network in a synchronized</div><div>manner (possibly getting some help fr=
om your miner friends) and this</div><div>becomes a bit of a problem (to sa=
y the least).</div><div><br></div><div>Taking this a step further another m=
itigation that&#39;s been proposed is to</div><div>also use the channel res=
erve to implement a _ceiling_ on the maximum size</div><div>of _any_ in fli=
ght HTLC. Similar to the scheme above, this is meant to</div><div>eliminate=
 the possibility of a &quot;costless&quot; attack, as if channel throughput=
</div><div>is artificially constrained, then the value of pending HTLC&#39;=
s isn&#39;t</div><div>enticing enough to launch a channel breach attack.</d=
iv><div><br></div><div><br></div><div>### Analysis of Attack Feasibility/Di=
fficulty</div><div><br></div><div>The difficulty of the attack is dependant=
 on the time-denominated security</div><div>parameter T, and the adversarie=
s ability to collude with miners. Purely</div><div>spamming the chain given=
 a very larger T value may be prohibitively</div><div>expensive for the att=
acker and their profit from launching the attack</div><div>would need to ou=
tweigh the cost in transaction fees and idle bitcoin</div><div>required to =
launch the attack. Considering the case of colluding with</div><div>miners,=
 if mining is highly centralized (as it is now), then that may be a</div><d=
iv>more attractive attack avenue. In a world of highly decentralized mining=
</div><div>(let&#39;s say a lofty goal of no pool commanding &gt; 5% of the=
 hash power),</div><div>then the attack is much more difficult.=C2=A0</div>=
<div><br></div><div>(as an aside schemes that involve transactions committi=
ng to the inputs</div><div>they&#39;re spending and revealing them at a lat=
er date/block (committed</div><div>transactions) may address the miner cens=
orship attack vector)</div><div><br></div><div>Depending one&#39;s target u=
se of channels, the individuals they open channels</div><div>with, the appl=
ications that run on top of the channels, the amount of</div><div>coins wit=
hin the channel, and the choice of the time parameter T, the</div><div>atta=
ck outline above may or may not be an issue from your PoV.=C2=A0 However,</=
div><div>in order to realize LN&#39;s maximum potential of being able to en=
ter a</div><div>smart-contract with a complete stranger on the internet tru=
stlessly,</div><div>without fearing conditions that may lead to monetary lo=
sses, the attack</div><div>vector should be mitigated if possible.</div><di=
v><br></div><div>In the words of The Architect of the Matrix (and reference=
d by Tadge at</div><div>his &quot;Level of LN&quot; talk at Scaling Bitcoin=
 Hong Kong: &quot;There are levels of</div><div>survival we are prepared to=
 accept&quot;. There exist levels of LN and usage of</div><div>channels, th=
at may not consider this a dire issue.</div><div><br></div><div>OK, with th=
e necessary background and context laid out, I&#39;ll now analyze</div><div=
>the solution proposed within the greater xblock proposal, making a brief</=
div><div>detour to briefly described another proposed solution.</div><div><=
br></div><div>### Timestop</div><div><br></div><div>A prior proposed soluti=
on to the failure scenario described above is</div><div>what&#39;s known as=
 &quot;time stop&quot;. This was proposed by gmaxwell and was briefly</div>=
<div>touched upon in the original LN white paper. The mechanism of the</div=
><div>time-denominated security parameter T in today&#39;s channel construc=
tion is</div><div>enforced using OpCheckSequenceVerify. After broadcasting =
a commitment</div><div>transaction, all outputs paying to the broadcaster o=
f the commitment are</div><div>encumbered with a relative time delay of T b=
locks, meaning they are unable</div><div>to claim the funds until time T ha=
s elapsed. This time margin gives the</div><div>honest party an opportunity=
 to broadcast their punishment transaction</div><div>iff, the broadcaster h=
as broadcast a prior revoked state.=C2=A0</div><div><br></div><div>The idea=
 of time stomp is to introduce a special sequence-locks block</div><div>hei=
ght to the system. This block height would increase with each block</div><d=
iv>along with the regular block height _unless_ the block reaches a certain=
</div><div>sustained &quot;high water mark&quot;. As an example, let&#39;s =
assume that when 3</div><div>blocks in row are above 75% capacity, then the=
 sequence-lock clock stops</div><div>ticking.</div><div><br></div><div>The =
effect of this change is to morph the security risk into simply a</div><div=
>postponement of the judgment within the contract. With this, DoS attacks</=
div><div>simply delay the (seemingly) inevitable punishment of the dishones=
t party</div><div>within the contract.=C2=A0</div><div><br></div><div>Aside=
 from some informal discussions and the brief section within the</div><div>=
original white paper, many details of this proposal are left</div><div>unde=
rspecified. For example: how do miners signal to full nodes that the</div><=
div>sequence-lock clock has stopped? What&#39;s the high water mark thresho=
ld? Can</div><div>it go on indefinitely? Should this feature be opt-in?=C2=
=A0</div><div><br></div><div>I think this proposal should be considered in =
tandem with the proposal</div><div>within the xblock proposal as both have =
a few unanswered questions that</div><div>need to be further explored.</div=
><div><br></div><div>## Pre-Allocated Smart-Contract Dispute Area (PASDA)</=
div><div><br></div><div>Aight, now to the LN enhancing proposal that&#39;s =
buried within the</div><div>greater xblock proposal. Introducing some new t=
erminology, I&#39;ve been</div><div>calling this a: Pre-Allocated Smart-con=
tract Dispute Arena or (PASDA) for</div><div>short. In a nut shell, the key=
 idea of the proposal is this: transactions</div><div>that mark the commenc=
ement of a smart contract who&#39;s security depends on</div><div>availabil=
ity of block space for disputes are able to _pre allocate_ a</div><div>sect=
ion of the block that will _always_ be _reserved_ for dispute</div><div>tra=
nsactions. With this, contracts is =C2=A0_guaranteed_ space in blocks to</d=
iv><div>handle disputes in the case that the contract breaks down. As an an=
alogy:</div><div>when you enter in a contract with a contractor to build yo=
ur dream</div><div>kitchen, you _also_ go to a court and reserve a 1-hour b=
lock in their</div><div>scheduled to handle a dispute _just in case_ one ar=
ises. In the event of a</div><div>peaceful resolution to the contract, the =
space is freed up.</div><div><br></div><div>The description in the paper is=
 a bit light on the details, so I&#39;ll say up</div><div>front that I&#39;=
m extrapolating w.r.t to some mechanisms of the construction.</div><div>How=
ever, I&#39;ve been involved in some private conversations where the idea</=
div><div>was thrown around, so I think I have enough context to _maybe_ fil=
l in</div><div>some of the gaps in the proposal.</div><div><br></div><div>I=
&#39;ll now restate the proposal. Smart contract transactions set a certain=
</div><div>bit in their version number. This bit indicates that they wish t=
o</div><div>pre-allocate N bytes in _all_ further blocks _until_ the contra=
ct has been</div><div>reserved. In the specific context of payment channels=
, this means that</div><div>once a channel is open, until it has been close=
d, it _decreases_ the</div><div>available block size for all other transact=
ions. As this is a very</div><div>aggressive proposal I think the authors t=
ook advantage of the new design</div><div>space within xblocks to include s=
omething that may not be readily accepted</div><div>as a modification to th=
e rules of the main chain.</div><div><br></div><div>The concrete parameters=
 chosen in the proposal are: each channel opening</div><div>transaction res=
erves 700-bytes within _each_ block in the chain until the</div><div>transa=
ction has been closed. This pre-allocation has the following</div><div>cons=
traint: a transaction can _only_ take advantage of this allocation iff</div=
><div>it&#39;s spending the _first_ output of a smart-contract transaction =
(has a</div><div>particular bit in the version set). This means that only d=
ispute</div><div>resolution transactions can utilize this space.=C2=A0</div=
><div><br></div><div>The proposal references two allocations, which I&#39;v=
e squinted very hard at</div><div>for half a day in an attempt to parse the=
 rules governing them, but so far</div><div>I&#39;ve been unable to glean a=
ny further details. From my squinting, I</div><div>interpret that half of t=
he allocation is reserved for spending the</div><div>self-output of a trans=
action in the last 2016 blocks (two weeks) and the</div><div>other half is =
dedicated to spending the first output of a commitment</div><div>transactio=
n in the _same_ block.</div><div><br></div><div>I&#39;m unsure as to why th=
ese allocations are separate, and why they aren&#39;t</div><div>just combin=
ed into a single allocation.</div><div><br></div><div>### Modification to L=
N Today</div><div><br></div><div>This change would require a slight modific=
ation to LN as it&#39;s currently</div><div>defined today. ATM, we use BIP =
69 in order the inputs and outputs of a</div><div>transaction. This is help=
ful as it lets us just send of signatures for new</div><div>states as both =
sides already know the order of the inputs and outputs.</div><div>With PASD=
A, we&#39;d now need to omit the to-self-output (the output in my</div><div=
>commitment transaction paying to myself my settled balance) from this</div=
><div>ordering and _always_ make it the first output (txid:0).</div><div><b=
r></div><div>The second change is that this proposal puts a ceiling on on t=
he CSV value</div><div>allowed by any channel. All CSV delays _must-weeks o=
therwise, they&#39;re</div><div>unable to take advantage of the arena.</div=
><div><br></div><div>### Modifications to Bitcoin</div><div><br></div><div>=
In order to implement this within Bitcoin, a third utxo set (regular</div><=
div>block, xblock) must be maintained by all full nodes. Alternatively, thi=
s</div><div>can just be a bit in the xblock utxo set. The implementation do=
esn&#39;t</div><div>really matter. Before attempting to pack transactions i=
nto a block, the</div><div>total allocation within the PASDA utxo-set must =
be summed up, and</div><div>subtracted from the block size cap. Only transa=
ctions which validly spend</div><div>from one of these UTXO&#39;s are able =
to take advantage of the new space in</div><div>the block.</div><div><br></=
div><div>## Analysis of PASDA</div><div><br></div><div>OK, now for some ana=
lysis. First, let&#39;s assume that transactions which</div><div>create PAS=
DA UTXO&#39;s aren&#39;t subject to any additional constraints. If so,</div=
><div>then this means that _any_ transaction can freely create PASDA UTXO&#=
39;s and</div><div>_decrease_ the block size for _all_ transactions until t=
he UTXO has been</div><div>spent. If my interpretation is correct, then thi=
s introduces a new attack</div><div>vector which allows _anyone_ to nearly =
permanently decrease the block size</div><div>for all-time with next to zer=
o additional cost. If this is correct, then</div><div>it seems that miners =
have _zero_ incentive to _ever_ include a transaction</div><div>that create=
s a PASDA output in their blocks as it robs them of future</div><div>revenu=
e and decreases the available capacity in the system, possibly</div><div>pe=
rmanently proportionally to _each_ unspent PASDA output in the chain.</div>=
<div><br></div><div>Alternatively, let&#39;s say the transactions which cre=
ate PASDA outputs</div><div>_must_ pay a disproportionately high fee in ord=
er to pay up front for</div><div>their consumption of the size within all f=
uture blocks. If so, then a</div><div>question that arises is: How large a =
fee? If the fee is very large, then</div><div>the utilization of the smart-=
contract battling arena is only reserved to</div><div>very high valued chan=
nels who can afford very high fees. This may be</div><div>acceptable as if =
you have a $5 channel, then are you really at risk at</div><div>such a larg=
e scale attack on Bitcoin just to steal $5 from you? It&#39;s</div><div>imp=
ortant to note that many attacks on LN&#39;s contract resolution</div><div>=
capabilities are also a direct attack on Bitcoin. However, in a world of</d=
iv><div>dynamic fees, then it may be the case that the fee paid 6 months ag=
o is</div><div>now a measly fee an no longer covers the costs to miners (an=
d even the</div><div>entire system...).</div><div><br></div><div>Finally, h=
ere&#39;s something I thought of earlier today that possibly</div><div>miti=
gates the downside from the PoV of the miners (everyone else must</div><div=
>still accept the costs of a permanent block size decrease). Let&#39;s say =
that</div><div>in order to create a PASDA output fees are paid as normal. H=
owever, for</div><div>_each_ subsequent block, the participants of the cont=
ract _must_ pay a</div><div>tribute to miners to account for their loss in =
revenue due to the</div><div>reduction in block size. Essentially, all PASD=
A outputs must pay _rent_</div><div>for their pre-allocated space. If rent =
isn&#39;t paid sufficiently and on-time,</div><div>then the pre-allocate ar=
ena space is revoked by miners. There&#39;re a few</div><div>ways to constr=
uct this payment, but I&#39;ll leave that to follow up work as I</div><div>=
just want to shed some light on the PASDA and its implications.</div><div><=
br></div><div>## Conclusion</div><div><br></div><div>I&#39;ve attempted to =
fill in some gaps for y&#39;all w.r.t exactly what the</div><div>sub-propos=
al within the greater xblock proposal consists of and some</div><div>possib=
le implications. I&#39;d like to note that I&#39;ve taken the liberty of</d=
iv><div>filling on some gaps within the sub-proposal as only a single secti=
on</div><div>within the greater proposal has been allocated to it. PASDA it=
self could</div><div>likely fill up an entirely distinct propsal by itself =
spanning several</div><div>pages. To the authors of the proposal: if my int=
erpretation is inaccurate</div><div>please correct me as I&#39;d also like =
to better understand the proposal. It&#39;s</div><div>possible that everyth=
ing I&#39;ve said in this (now rather long) email is</div><div>incorrect.</=
div><div><br></div><div>If you&#39;ve made it this far, thank you for takin=
g the time out of your day</div><div>to consider my thoughts. It&#39;s my h=
ope that we can further analyze this</div><div>sub-proposal in detail and d=
iscuss its construction as well as its</div><div>implications on smart-cont=
racts like payment channels on top of Bitcoin.</div><div><br></div><div>PAS=
DA purports to address one half of the systematic risks in LN by</div><div>=
possibly eliminating the DoS vector attack against LN. However, the costs</=
div><div>of PASDA are very high, and possibly prohibitively so. In my opini=
on, the</div><div>second attack vector lies in the ability of miners to arb=
itrarily censor</div><div>transactions spending a particular output. Fungib=
ility enhancing</div><div>techniques such as Committed Transactions may be =
a viable path forward to</div><div>patch this attack vector.</div><div><br>=
</div><div>-- roasbeef</div></div><div><br></div></div><div class=3D"HOEnZb=
"><div class=3D"h5"><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Tue,=
 Apr 4, 2017 at 8:35 PM Johnson Lau via bitcoin-dev &lt;<a href=3D"mailto:b=
itcoin-dev@lists.linuxfoundation.org" target=3D"_blank">bitcoin-dev@lists.<=
wbr>linuxfoundation.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_=
quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1=
ex">I feel particularly disappointed that while this BIP is 80% similar to =
my proposal made 2 months ago ( <a href=3D"https://lists.linuxfoundation.or=
g/pipermail/bitcoin-dev/2017-January/013490.html" rel=3D"noreferrer" class=
=3D"m_7042370033019349982gmail_msg" target=3D"_blank">https://lists.linuxfo=
undation.<wbr>org/pipermail/bitcoin-dev/<wbr>2017-January/013490.html</a> )=
, Matt Corallo was only the person replied me. Also, this BIP seems ignored=
 the txid malleability of the resolution tx, as my major technical critique=
 of xblock design.<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
But anyway, here I=E2=80=99m only making comments on the design. As I said =
in my earlier post, I consider this more as an academic topic than somethin=
g really ready for production use.<br class=3D"m_7042370033019349982gmail_m=
sg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; This specification defines a method of increasing bitcoin transaction =
throughput without altering any existing consensus rules.<br class=3D"m_704=
2370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
Softforks by definition tighten consensus rules<br class=3D"m_7042370033019=
349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; There has been great debate regarding other ways of increasing transac=
tion throughput, with no proposed consensus-layer solutions that have prove=
n themselves to be particularly safe.<br class=3D"m_7042370033019349982gmai=
l_msg">
<br class=3D"m_7042370033019349982gmail_msg">
so the authors don=E2=80=99t consider segwit as a consensus-layer solution =
to increase transaction throughput, or not think segwit is safe? But logica=
lly speaking if segwit is not safe, this BIP could only be worse. OTOH, seg=
wit also obviously increases tx throughput, although it may not be as much =
as some people wish to have.<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; This specification refines many of Lau&#39;s ideas, and offers a much =
simpler method of tackling the value transfer issue, which, in Lau&#39;s pr=
oposal, was solved with consensus-layer UTXO selection.<br class=3D"m_70423=
70033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
The 2013 one is outdated. As the authors are not quoting it, not sure if th=
ey read my January proposal<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt;=C2=A0 extension block activation entails BIP141 activation.<br class=
=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
I think extension block in the proposed form actually breaks BIP141. It may=
 say it activates segregated witness as a general idea, but not a specific =
proposal like BIP141<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; The merkle root is to be calculated as a merkle tree with all extensio=
n block txids and wtxids as the leaves.<br class=3D"m_7042370033019349982gm=
ail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
It needs to be more specific here. How are they exactly arranged? I suggest=
 it uses a root of all txids, and a root of all wtxids, and combine them as=
 the commitment. The reason is to allow people to prune the witness data, y=
et still able to serve the pruned tx to light wallets. If it makes txid and=
 wtxid as pairs, after witness pruning it still needs to store all the wtxi=
ds or it can=E2=80=99t reconstruct the tree<br class=3D"m_70423700330193499=
82gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; Outputs signal to exit the extension block if the contained script is =
either a minimally encoded P2PKH or P2SH script.<br class=3D"m_704237003301=
9349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
This hits the biggest question I asked in my January post: do you want to a=
llow direct exit payment to legacy addresses? As a block reorg will almost =
guarantee changing txid of the resolution tx, that will permanently invalid=
ate all the child txs based on the resolution tx. This is a significant cha=
nge to the current tx model. To fix this, you need to make exit outputs uns=
pendable for up to 100 blocks. Doing this, however, will make legacy wallet=
 users very confused as they do not anticipate funding being locked up for =
a long period of time. So you can=E2=80=99t let the money sent back to a le=
gacy address directly, but sent to a new format address that only recognize=
d by new wallet, which understands the lock up requirement. This way, howev=
er, introduces friction and some fungibility issues, and I=E2=80=99d expect=
 people using cross chain atomic swap to exchange bitcoin and xbitcoin<br c=
lass=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
To summarise, my questions are:<br class=3D"m_7042370033019349982gmail_msg"=
>
1. Is it acceptable to have massive txid malleability and transaction chain=
 invalidation for every natural happening reorg?=C2=A0 Yes: the current spe=
c is ok; No: next question (I=E2=80=99d say no)<br class=3D"m_7042370033019=
349982gmail_msg">
2. Is locking up exit outputs the best way to deal with the problem? (I tri=
ed really hard to find a better solution but failed)<br class=3D"m_70423700=
33019349982gmail_msg">
3. How long the lock-up period should be? Answer could be anywhere from 1 t=
o 100<br class=3D"m_7042370033019349982gmail_msg">
4. With a lock-up period, should it allow direct exit to legacy address? (I=
 think it=E2=80=99s ok if the lock-up is short, like 1-2 block. But is that=
 safe enough?)<br class=3D"m_7042370033019349982gmail_msg">
5. Due to the fungibility issues, it may need a new name for the tokens in =
the ext-block<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; Verification of transactions within the extension block shall enforce =
all currently deployed softforks, along with an extra BIP141-like ruleset.<=
br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
I suggest to only allow push-only and OP_RETURN scriptPubKey in xblock. Esp=
ecially, you don=E2=80=99t want to replicate the sighash bug to xblock. Als=
o, requires scriptSig to be always empty<br class=3D"m_7042370033019349982g=
mail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; This leaves room for 7 future soft-fork upgrades to relax DoS limits.<=
br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
Why 7? There are 16 unused witness program versions<br class=3D"m_704237003=
3019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; Witness script hash v0 shall be worth the number of accurately counted=
 sigops in the redeem script, multiplied by a factor of 8.<br class=3D"m_70=
42370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
There is a flaw here: witness script with no sigop will be counted as 0 and=
 have a lot free space<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; every 73 bytes in the serialized witness vector is worth 1 additional =
point.<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
so 72 bytes is 1 point or 0 point? Maybe it should just scale everything up=
 by 64 or 128, and make 1 witness byte =3D 1 point . So it won=E2=80=99t pr=
ovide any =E2=80=9Cfree space=E2=80=9D in the block.<br class=3D"m_70423700=
33019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; Currently defined witness programs (v0) are each worth 8 points. Unkno=
wn witness program outputs are worth 1 point. Any exiting output is always =
worth 8 points.<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
I=E2=80=99d suggest to have at least 16 points for each witness v0 output, =
so it will make it always more expensive to create than spend UTXO. It may =
even provide extra =E2=80=9Cdiscount=E2=80=9D if a tx has more input than o=
utput. The overall objective is to limit the UTXO growth. The ext block sho=
uld be mainly for making transactions, not store of value (I=E2=80=99ll exp=
lain later)<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; Dust Threshold<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
In general I think it=E2=80=99s ok, but I=E2=80=99d suggest a higher thresh=
old like 5000 satoshi. It may also combine the threshold with the output wi=
tness version, so unknown version may have a lower or no threshold. Alterna=
tively, it may start with a high threshold and leave a backdoor softfork to=
 reduce it.<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; Deactivation<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
It is a double-edged sword. While it is good for us to be able to discard a=
n unused chain, it may create really bad user experience and people may eve=
n lose money. For example, people may have opened Lightning channels and th=
ey will find it not possible to close the channel. So you need to make sure=
 people are not making time-locked tx for years, and require people to refr=
esh their channel regularly. And have big red warning when the deactivation=
 SF is locked in. Generally, xblock with deactivation should never be used =
as long-term storage of value.<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
=E2=80=94=E2=80=94=E2=80=94=E2=80=94<br class=3D"m_7042370033019349982gmail=
_msg">
some general comments:<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
1. This BIP in current form is not compatible with BIP141. Since most nodes=
 are already upgraded to BIP141, this BIP must not be activated unless BIP1=
41 failed to activate. However, if the community really endorse the idea of=
 ext block, I see no reason why we couldn=E2=80=99t activate BIP141 first (=
which could be done in 2 weeks), then work together to make ext block possi=
ble. Ext block is more complicated than segwit. If it took dozens of develo=
pers a whole year to release segwit, I don=E2=80=99t see how ext block coul=
d become ready for production with less time and efforts.<br class=3D"m_704=
2370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
2. Another reason to make this BIP compatible with BIP141 is we also need m=
alleability fix in the main chain. As the xblock has a deactivation mechani=
sm, it can=E2=80=99t be used for longterm value storage.<br class=3D"m_7042=
370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
3. I think the size and cost limit of the xblock should be lower at the beg=
inning, and increases as we find it works smoothly. It could be a predefine=
d growth curve like BIP103, or a backdoor softfork. With the current design=
, it leaves a massive space for miners to fill up with non-tx garbage. Also=
, I=E2=80=99d also like to see a complete SPV fraud-proof solution before t=
he size grows bigger.<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
&gt; On 5 Apr 2017, at 02:03, Luke Dashjr via bitcoin-dev &lt;<a href=3D"ma=
ilto:bitcoin-dev@lists.linuxfoundation.org" class=3D"m_7042370033019349982g=
mail_msg" target=3D"_blank">bitcoin-dev@lists.<wbr>linuxfoundation.org</a>&=
gt; wrote:<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Recently there has been some discussion of an apparent work-in-progres=
s<br class=3D"m_7042370033019349982gmail_msg">
&gt; extension block proposal by Christopher Jeffrey, Joseph Poon, Fedor In=
dutny,<br class=3D"m_7042370033019349982gmail_msg">
&gt; and Steven Pair. Since this hasn&#39;t been formally posted on the ML =
yet, perhaps<br class=3D"m_7042370033019349982gmail_msg">
&gt; it is still in pre-draft stages and not quite ready for review, but in=
 light<br class=3D"m_7042370033019349982gmail_msg">
&gt; of public interest, I think it is appropriate to open it to discussion=
, and<br class=3D"m_7042370033019349982gmail_msg">
&gt; toward this end, I have reviewed the current revision.<br class=3D"m_7=
042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; For reference, the WIP proposal itself is here:<br class=3D"m_70423700=
33019349982gmail_msg">
&gt;=C2=A0 =C2=A0 <a href=3D"https://github.com/tothemoon-org/extension-blo=
cks" rel=3D"noreferrer" class=3D"m_7042370033019349982gmail_msg" target=3D"=
_blank">https://github.com/tothemoon-<wbr>org/extension-blocks</a><br class=
=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; =3D=3DOverall analysis &amp; comparison=3D=3D<br class=3D"m_7042370033=
019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; This is a relatively complicated proposal, creating a lot of additiona=
l<br class=3D"m_7042370033019349982gmail_msg">
&gt; technical debt and complexity in comparison to both BIP 141 and hardfo=
rks. It<br class=3D"m_7042370033019349982gmail_msg">
&gt; offers no actual benefits beyond BIP 141 or hardforks, so seems irrati=
onal to<br class=3D"m_7042370033019349982gmail_msg">
&gt; consider at face value. In fact, it fits much better the inaccurate cr=
iticisms<br class=3D"m_7042370033019349982gmail_msg">
&gt; made by segwit detractors against BIP 141.<br class=3D"m_7042370033019=
349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; That being said, this proposal is very interesting in construction and=
 is for<br class=3D"m_7042370033019349982gmail_msg">
&gt; the most part technically sound. While ill-fit to merely making blocks=
 larger,<br class=3D"m_7042370033019349982gmail_msg">
&gt; it may be an ideal fit for fundamentally different block designs such =
as<br class=3D"m_7042370033019349982gmail_msg">
&gt; Rootstock and MimbleWimble in absence of decentralised non-integrated<=
br class=3D"m_7042370033019349982gmail_msg">
&gt; sidechains (extension blocks are fundamentally sidechains tied into Bi=
tcoin<br class=3D"m_7042370033019349982gmail_msg">
&gt; directly).<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; =3D=3DFundamental problem=3D=3D<br class=3D"m_7042370033019349982gmail=
_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Extension blocks are a risk of creating two classes of &quot;full node=
s&quot;: those<br class=3D"m_7042370033019349982gmail_msg">
&gt; which verify the full block (and are therefore truly full nodes), and =
those<br class=3D"m_7042370033019349982gmail_msg">
&gt; which only verify the &quot;base&quot; block. However, because the ext=
ension is<br class=3D"m_7042370033019349982gmail_msg">
&gt; consensus-critical, the latter are in fact not full nodes at all, and =
are left<br class=3D"m_7042370033019349982gmail_msg">
&gt; insecure like pseudo-SPV (not even real SPV) nodes. This technical nat=
ure is<br class=3D"m_7042370033019349982gmail_msg">
&gt; of course true of a softfork as well, but softforks are intentionally =
designed<br class=3D"m_7042370033019349982gmail_msg">
&gt; such that all nodes are capable of trivially upgrading, and there is n=
o<br class=3D"m_7042370033019349982gmail_msg">
&gt; expectation for anyone to run with pre-softfork rules.<br class=3D"m_7=
042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; In general, hardforks can provide the same benefits of an extension bl=
ock, but<br class=3D"m_7042370033019349982gmail_msg">
&gt; without the false expectation and pointless complexity.<br class=3D"m_=
7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; =3D=3DOther problems &amp; questions=3D=3D<br class=3D"m_7042370033019=
349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; These outpoints may not be spent inside the mempool (they must be =
redeemed<br class=3D"m_7042370033019349982gmail_msg">
&gt; from the next resolution txid in reality).<br class=3D"m_7042370033019=
349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; This breaks the ability to spend unconfirmed funds in the same block (=
as is<br class=3D"m_7042370033019349982gmail_msg">
&gt; required for CPFP).<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; The extension block&#39;s transaction count is not cryptographically c=
ommitted-to<br class=3D"m_7042370033019349982gmail_msg">
&gt; anywhere. (This is an outstanding bug in Bitcoin today, but impractica=
l to<br class=3D"m_7042370033019349982gmail_msg">
&gt; exploit in practice; however, exploiting it in an extension block may =
not be<br class=3D"m_7042370033019349982gmail_msg">
&gt; as impractical, and it should be fixed given the opportunity.)<br clas=
s=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; The merkle root is to be calculated as a merkle tree with all exte=
nsion<br class=3D"m_7042370033019349982gmail_msg">
&gt; block txids and wtxids as the leaves.<br class=3D"m_704237003301934998=
2gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; This needs to elaborate how the merkle tree is constructed. Are all th=
e txids<br class=3D"m_7042370033019349982gmail_msg">
&gt; followed by all the wtxids (tx hashes)? Are they alternated? Are txid =
and<br class=3D"m_7042370033019349982gmail_msg">
&gt; wtxid trees built independently and merged at the tip?<br class=3D"m_7=
042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; Output script code aside from witness programs, p2pkh or p2sh is c=
onsidered<br class=3D"m_7042370033019349982gmail_msg">
&gt; invalid in extension blocks.<br class=3D"m_7042370033019349982gmail_ms=
g">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Why? This prevents extblock users from sending to bare multisig or oth=
er<br class=3D"m_7042370033019349982gmail_msg">
&gt; various possible destinations. (While static address forms do not exis=
t for<br class=3D"m_7042370033019349982gmail_msg">
&gt; other types, they can all be used by the payment protocol.)<br class=
=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Additionally, this forbids datacarrier (OP_RETURN), and forces spam to=
 create<br class=3D"m_7042370033019349982gmail_msg">
&gt; unprovably-unspendable UTXOs. Is that intentional?<br class=3D"m_70423=
70033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; The maximum extension size should be intentionally high.<br class=
=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; This has the same &quot;attacks can do more damage than ordinary benef=
it&quot; issue as<br class=3D"m_7042370033019349982gmail_msg">
&gt; BIP141, but even more extreme since it is planned to be used for futur=
e size<br class=3D"m_7042370033019349982gmail_msg">
&gt; increases.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; Witness key hash v0 shall be worth 1 point, multiplied by a factor=
 of 8.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; What is a &quot;point&quot;? What does it mean multiplied by a factor =
of 8? Why not just<br class=3D"m_7042370033019349982gmail_msg">
&gt; say &quot;8 points&quot;?<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; Witness script hash v0 shall be worth the number of accurately cou=
nted<br class=3D"m_7042370033019349982gmail_msg">
&gt; sigops in the redeem script, multiplied by a factor of 8.<br class=3D"=
m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Please define &quot;accurately counted&quot; here. Is this using BIP16=
 static counting,<br class=3D"m_7042370033019349982gmail_msg">
&gt; or accurately counting sigops during execution?<br class=3D"m_70423700=
33019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; To reduce the chance of having redeem scripts which simply allow f=
or garbage<br class=3D"m_7042370033019349982gmail_msg">
&gt; data in the witness vector, every 73 bytes in the serialized witness v=
ector is<br class=3D"m_7042370033019349982gmail_msg">
&gt; worth 1 additional point.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Is the size rounded up or down? If down, 72-byte scripts will carry 0<=
br class=3D"m_7042370033019349982gmail_msg">
&gt; points...)<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; =3D=3DTrivial &amp; process=3D=3D<br class=3D"m_7042370033019349982gma=
il_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; BIPs must be in MediaWiki format, not Markdown. They should be submitt=
ed for<br class=3D"m_7042370033019349982gmail_msg">
&gt; discussion to the bitcoin-dev mailing list, not social media and news.=
<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; Layer: Consensus (soft-fork)<br class=3D"m_7042370033019349982gmai=
l_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Extension blocks are more of a hard-fork IMO.<br class=3D"m_7042370033=
019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; License: Public Domain<br class=3D"m_7042370033019349982gmail_msg"=
>
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; BIPs may not be &quot;public domain&quot; due to non-recognition in so=
me jurisdictions.<br class=3D"m_7042370033019349982gmail_msg">
&gt; Can you agree on one or more of these?<br class=3D"m_70423700330193499=
82gmail_msg">
&gt; <a href=3D"https://github.com/bitcoin/bips/blob/master/bip-0002.mediaw=
iki#Recommended_licenses" rel=3D"noreferrer" class=3D"m_7042370033019349982=
gmail_msg" target=3D"_blank">https://github.com/bitcoin/<wbr>bips/blob/mast=
er/bip-0002.<wbr>mediawiki#Recommended_licenses</a><br class=3D"m_704237003=
3019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; ## Abstract<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; This specification defines a method of increasing bitcoin transact=
ion<br class=3D"m_7042370033019349982gmail_msg">
&gt; throughput without altering any existing consensus rules.<br class=3D"=
m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; This is inaccurate. Even softforks alter consensus rules.<br class=3D"=
m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; ## Motivation<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; Bitcoin retargetting ensures that the time in between mined blocks=
 will be<br class=3D"m_7042370033019349982gmail_msg">
&gt; roughly 10 minutes. It is not possible to change this rule. There has =
been<br class=3D"m_7042370033019349982gmail_msg">
&gt; great debate regarding other ways of increasing transaction throughput=
, with<br class=3D"m_7042370033019349982gmail_msg">
&gt; no proposed consensus-layer solutions that have proven themselves to b=
e<br class=3D"m_7042370033019349982gmail_msg">
&gt; particularly safe.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Block time seems entirely unrelated to this spec. Motivation is unclea=
r.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; Extension blocks leverage several features of BIP141, BIP143, and =
BIP144 for<br class=3D"m_7042370033019349982gmail_msg">
&gt; transaction opt-in, serialization, verification, and network services,=
 and as<br class=3D"m_7042370033019349982gmail_msg">
&gt; such, extension block activation entails BIP141 activation.<br class=
=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; As stated in the next paragraph, the rules in BIP 141 are fundamentall=
y<br class=3D"m_7042370033019349982gmail_msg">
&gt; incompatible with this one, so saying BIP 141 is activated is confusin=
gly<br class=3D"m_7042370033019349982gmail_msg">
&gt; incorrect.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; This specification should be considered an extension and modificat=
ion to<br class=3D"m_7042370033019349982gmail_msg">
&gt; these BIPs. Extension blocks are _not_ compatible with BIP141 in its c=
urrent<br class=3D"m_7042370033019349982gmail_msg">
&gt; form, and will require a few minor additional rules.<br class=3D"m_704=
2370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Extension blocks should be compatible with BIP 141, there doesn=E2=80=
=99t appear to be<br class=3D"m_7042370033019349982gmail_msg">
&gt; any justification for not making them compatible.<br class=3D"m_704237=
0033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; This specification prescribes a way of fooling non-upgraded nodes =
into<br class=3D"m_7042370033019349982gmail_msg">
&gt; believing the existing UTXO set is still behaving as they would expect=
.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; The UTXO set behaves fundamentally different to old nodes with this pr=
oposal,<br class=3D"m_7042370033019349982gmail_msg">
&gt; albeit in a mostly compatible manner.<br class=3D"m_704237003301934998=
2gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; Note that canonical blocks containing entering outputs MUST contai=
n an<br class=3D"m_7042370033019349982gmail_msg">
&gt; extension block commitment (all zeroes if nothing is present in the ex=
tension<br class=3D"m_7042370033019349982gmail_msg">
&gt; block).<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Please explain why in Rationale.<br class=3D"m_7042370033019349982gmai=
l_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; Coinbase outputs MUST NOT contain witness programs, as they cannot=
 be<br class=3D"m_7042370033019349982gmail_msg">
&gt; sweeped by the resolution transaction due to previously existing conse=
nsus<br class=3D"m_7042370033019349982gmail_msg">
&gt; rules.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Seems like an annoying technical debt. I wonder if it can be avoided.<=
br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; The genesis resolution transaction MAY also include a 1-100 byte p=
ushdata in<br class=3D"m_7042370033019349982gmail_msg">
&gt; the first input script, allowing the miner of the genesis resolution t=
o add a<br class=3D"m_7042370033019349982gmail_msg">
&gt; special message. The pushdata MUST be castable to a true boolean.<br c=
lass=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Why? Unlike the coinbase, this seems to create additional technical de=
bt with<br class=3D"m_7042370033019349982gmail_msg">
&gt; no apparent purpose. Better to just have a consensus rule every input =
must be<br class=3D"m_7042370033019349982gmail_msg">
&gt; null.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; The resolution transaction&#39;s version MUST be set to the uint32=
 max (`2^32 -<br class=3D"m_7042370033019349982gmail_msg">
&gt; 1`).<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Transaction versions are signed, so I assume this is actually simply -=
1.<br class=3D"m_7042370033019349982gmail_msg">
&gt; (While signed transaction versions seemed silly to me, using it for sp=
ecial<br class=3D"m_7042370033019349982gmail_msg">
&gt; cases like this actually makes sense.)<br class=3D"m_70423700330193499=
82gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; ### Exiting the extension block<br class=3D"m_7042370033019349982g=
mail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Should specify that spending such an exit must use the resolution txid=
, not<br class=3D"m_7042370033019349982gmail_msg">
&gt; the extblock&#39;s txid.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; On the policy layer, transaction fees may be calculated by transac=
tion cost<br class=3D"m_7042370033019349982gmail_msg">
&gt; as well as additional size/legacy-sigops added to the canonical block =
due to<br class=3D"m_7042370033019349982gmail_msg">
&gt; entering or exiting outputs.<br class=3D"m_7042370033019349982gmail_ms=
g">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; BIPs should not specify policy at all. Perhaps prefix &quot;For the av=
oidance of<br class=3D"m_7042370033019349982gmail_msg">
&gt; doubt:&quot; to be clear that miners may perform any fee logic they li=
ke.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; Transactions within the extended transaction vector MAY include a =
witness<br class=3D"m_7042370033019349982gmail_msg">
&gt; vector using BIP141 transaction serialization.<br class=3D"m_704237003=
3019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Since extblock transactions are all required to be segwit, why wouldn&=
#39;t this<br class=3D"m_7042370033019349982gmail_msg">
&gt; be mandatory?<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; - BIP141&#39;s nested P2SH feature is no longer available, and no =
longer a<br class=3D"m_7042370033019349982gmail_msg">
&gt; consensus rule.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Note this makes adoption slower: wallets cannot use the extblock until=
 the<br class=3D"m_7042370033019349982gmail_msg">
&gt; economy has updated to support segwit-native addresses.<br class=3D"m_=
7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; To reduce the chance of having redeem scripts which simply allow f=
or garbage<br class=3D"m_7042370033019349982gmail_msg">
&gt; data in the witness vector, every 73 bytes in the serialized witness v=
ector is<br class=3D"m_7042370033019349982gmail_msg">
&gt; worth 1 additional point.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Please explain why 73 bytes in Rationale.<br class=3D"m_70423700330193=
49982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; This leaves room for 7 future soft-fork upgrades to relax DoS limi=
ts.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; How so? Please explain.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; A consensus dust threshold is now enforced within the extension bl=
ock.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Why?<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; If the second highest transaction version bit (30th bit) is set to=
 to `1`<br class=3D"m_7042370033019349982gmail_msg">
&gt; within an extension block transaction, an extra 700-bytes is reserved =
on the<br class=3D"m_7042370033019349982gmail_msg">
&gt; transaction space used up in the block.<br class=3D"m_7042370033019349=
982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Why wouldn&#39;t users set this on all transactions?<br class=3D"m_704=
2370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; `default_witness_commitment` has been renamed to<br class=3D"m_704=
2370033019349982gmail_msg">
&gt; `default_extension_commitment` and includes the extension block commit=
ment<br class=3D"m_7042370033019349982gmail_msg">
&gt; script.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; `default_witness_commitment` was never part of the GBT spec. At least =
describe<br class=3D"m_7042370033019349982gmail_msg">
&gt; what this new key is.<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; - Deployment name: `extblk` (appears as `!extblk` in GBT).<br clas=
s=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; Should be just `extblk` if backward compatibility is supported (and `!=
extblk`<br class=3D"m_7042370033019349982gmail_msg">
&gt; when not).<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;&gt; The &quot;deactivation&quot; deployment&#39;s start time...<br cla=
ss=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; What about timeout? None? To continue the extension block, must it be<=
br class=3D"m_7042370033019349982gmail_msg">
&gt; deactivated and reactivated in parallel?<br class=3D"m_704237003301934=
9982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt;<br class=3D"m_7042370033019349982gmail_msg">
&gt; ______________________________<wbr>_________________<br class=3D"m_704=
2370033019349982gmail_msg">
&gt; bitcoin-dev mailing list<br class=3D"m_7042370033019349982gmail_msg">
&gt; <a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" class=3D"m_70=
42370033019349982gmail_msg" target=3D"_blank">bitcoin-dev@lists.<wbr>linuxf=
oundation.org</a><br class=3D"m_7042370033019349982gmail_msg">
&gt; <a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-=
dev" rel=3D"noreferrer" class=3D"m_7042370033019349982gmail_msg" target=3D"=
_blank">https://lists.linuxfoundation.<wbr>org/mailman/listinfo/bitcoin-<wb=
r>dev</a><br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
<br class=3D"m_7042370033019349982gmail_msg">
______________________________<wbr>_________________<br class=3D"m_70423700=
33019349982gmail_msg">
bitcoin-dev mailing list<br class=3D"m_7042370033019349982gmail_msg">
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" class=3D"m_7042370=
033019349982gmail_msg" target=3D"_blank">bitcoin-dev@lists.<wbr>linuxfounda=
tion.org</a><br class=3D"m_7042370033019349982gmail_msg">
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" class=3D"m_7042370033019349982gmail_msg" target=3D"_blan=
k">https://lists.linuxfoundation.<wbr>org/mailman/listinfo/bitcoin-<wbr>dev=
</a><br class=3D"m_7042370033019349982gmail_msg">
</blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.=
<wbr>linuxfoundation.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-<wbr>dev</a><br>
<br></blockquote></div><br></div>

--001a113ace705a0e88054c6d2cf6--