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
|
Return-Path: <bit.kevin@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
[172.17.192.35])
by mail.linuxfoundation.org (Postfix) with ESMTPS id F3D0997
for <bitcoin-dev@lists.linuxfoundation.org>;
Sun, 8 Oct 2017 09:28:35 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42])
by smtp1.linuxfoundation.org (Postfix) with ESMTPS id CCD5F130
for <bitcoin-dev@lists.linuxfoundation.org>;
Sun, 8 Oct 2017 09:28:34 +0000 (UTC)
Received: by mail-wm0-f42.google.com with SMTP id q124so15727283wmb.0
for <bitcoin-dev@lists.linuxfoundation.org>;
Sun, 08 Oct 2017 02:28:34 -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;
bh=7MEx67JddXOsgfWFiT9Kp/Pb4h5hxYf6QKq21Xncibc=;
b=NXV7DMlTLzmtIE8FZf0afkX1vLXhGEi+6EaYnCcCB2ewfOw1CLQoiGPBHRfUrUZ5s6
h2VDMCsRYq1etkOmb0hjMS84qnjEGog0fqZx7NeREbcNMdSXFwOghwZV3bAmOwGmSh91
XEHiQF65oUiqhALHNkDENu5Zi+NXbnoPqJ/xr9fm8nl9BRsQKXICLoBeKbjOKbjXpny6
1PjtxML7viZgFUKo/NklkaC9uIR0338/q80sMVSL2BDSCnY/+KJH6R2irtpJ8hHPldtE
LI3ZYi8CUy/GFCoH2qPWsShtgO6Gy0oN7+QebSWCZ1LstQLz/DRv9IaTpHxJPqd6U+H2
um7A==
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;
bh=7MEx67JddXOsgfWFiT9Kp/Pb4h5hxYf6QKq21Xncibc=;
b=TBsYwE4ClX6dEn6nzEJaA1/QPG1pqR04N/ef0dunwepKdMDLNwN1JTQ0fAEAA5an+s
JqLJq2hdylsBy8pZOACrWPWJHR8RUsqPtt5snBCwDbQP0N9nMFftKc+snUhJE1jg6h5a
2dfnjhaMxPyDtRqj7Jgv4yslQcltLjmgrIO/iOzTJoVaeuCt9m9Xp69nlMfKgkF9R7Id
a83rVYKgBCqGAYuZBP4mZ5iRbndQTpBtH2iVgPehSauaG1K+SgPPpkhwZyhWKN7syy+G
zYHDpCr3msV9SKf7uiOJ8XaIQxYl+e12NTqk6JkEDcuz4RivJYkMcYGjKx9C8BpVHARV
4Kug==
X-Gm-Message-State: AMCzsaXmfZo1zRW48Iw6kp5nUhurUDGD19BK7UO5+Eur4UcPvs9a9+9d
3hvTtAlrzdAb3LvnPh0aVW9SDD+9utJjaHY0ZzABaHbE
X-Google-Smtp-Source: AOwi7QAIQA2ZjMNc58A80Y8Mo6O50UnbJV0pp3alIOYPUcsCf4TEXErhwNF5j6boAkopiyvWwrCsM+nPmnNOmB68WY4=
X-Received: by 10.80.151.47 with SMTP id c44mr5598207edb.139.1507454913311;
Sun, 08 Oct 2017 02:28:33 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.80.216.6 with HTTP; Sun, 8 Oct 2017 02:28:32 -0700 (PDT)
In-Reply-To: <CADvTj4p09Kq6SKKD_ttbjGsE7eyiq3hvDRQo3vUk6wCGVJU8UA@mail.gmail.com>
References: <CA+fZXJKuE_C7231-OHM2gvFUYBKjfoDoOfh+04YqHZuQF41eag@mail.gmail.com>
<CADvTj4p09Kq6SKKD_ttbjGsE7eyiq3hvDRQo3vUk6wCGVJU8UA@mail.gmail.com>
From: Kevin Pan <bit.kevin@gmail.com>
Date: Sun, 8 Oct 2017 17:28:32 +0800
Message-ID: <CA+fZXJ+dLr6tbKsKPhCvpOiMv-hT6iLGvboxphR7ByB4ghT1Jw@mail.gmail.com>
To: bitcoin-dev@lists.linuxfoundation.org
Content-Type: multipart/alternative; boundary="f403045c2c249f783c055b05b2f3"
X-Spam-Status: No, score=0.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,
RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
smtp1.linux-foundation.org
X-Mailman-Approved-At: Sun, 08 Oct 2017 10:18:13 +0000
Subject: Re: [bitcoin-dev] A solution may solve Block Withholding Attack
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: Sun, 08 Oct 2017 09:28:36 -0000
--f403045c2c249f783c055b05b2f3
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
But I think this one is simpler and better than Luke's.
And now is different like 2012, pools need be more independ today. Pools
want
to express their opinion or standpoint. Some of can't do that like remove
the
NYA tag and one the reason is the Block Withholding Attack.
Kevin Pan
On Fri, Oct 6, 2017 at 10:36 PM, James Hilliard <james.hilliard1@gmail.com>
wrote:
> There have been some other proposals to deal with this such as
> https://lists.linuxfoundation.org/pipermail/bitcoin-dev/
> 2012-June/001506.html
> that may be possible to implement in existing miners.
>
> On Tue, Oct 3, 2017 at 9:52 AM, =E6=BD=98=E5=BF=97=E5=BD=AA via bitcoin-d=
ev
> <bitcoin-dev@lists.linuxfoundation.org> wrote:
> > Here is a solution may solve Block Withholding Attack. The general idea
> is
> > came from Aviv Zohar(avivz@cs.huji.ac.il), I made it work for Bitcoin.
> > Anyway, thanks Aviv.
> >
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> >
> > DIFF_1 =3D 0x00000000FFFF0000000000000000000000000000000000000000000000
> 000000;
> >
> > Diff =3D DIFF_1 / target
> >
> > this is equal to
> >
> > Diff =3D DIFF_1 / (target - 0) or Diff =3D DIFF_1 / abs(target - 0)
> >
> > now, we change diff algo to below:
> >
> > New_Diff =3D DIFF_1 / abs(target - offset)
> >
> > Offset is 32 bytes, like uint256 in Bitcoin, range is [0, 2^256),
> > define: offset_hash =3D DSHA256(offset).
> >
> > we need to do a little change to the merkle root hash algo, put the
> > offset_hash as a tx hash in the front of tx hashes.
> >
> > [offset_hash, coinbase_tx_hash, tx01_hash, tx02_hash, =E2=80=A6 , tx_n_=
hash]
> >
> > Actually could put offset_hash in any place in the array of hashes.
> >
> > network_hash_range =3D network_hash_end - network_hash_begin
> >
> > miner_hash_range =3D miner_hash_end - miner_hash_begin
> >
> > The offset value MUST between network_hash_begin/end or
> > miner_hash_begin/end.
> >
> > https://user-images.githubusercontent.com/514951/
> 31133378-e00d9ca2-a891-11e7-8c61-73325f59f6ed.JPG
> >
> > When mining pool send a job to miners, put the PoW hash range
> > (miner_hash_begin/end) in the job. So if the miners find a hash which
> value
> > is between [miner_hash_begin, miner_hash_end], means it's SHOULD be a
> > valid share, could submit the share to the pool. If the hash value is
> > between [network_hash_begin, network_hash_end] means find a valid block=
.
> >
> > The network_diff is much much high than the miner's diff, means the
> > network_hash_range is much much smaller than miner_hash_range. By now,
> > a typical miner's pool diff is around 16K, network diff is 112386328513=
2,
> > so miner_hash_range is at least million times bigger than
> > network_hash_range.
> > The miners only know miner_hash_range, it's impossible for cheat miners
> > to find out which share could make a valid block or not.
> >
> > Problems:
> > 1. it's a hard fork.
> > 2. will make existed asic dsha256 chips useless, but I think it's only =
a
> > small change to make new asic chips based on existed tech.
> >
> > _______________________________________________
> > bitcoin-dev mailing list
> > bitcoin-dev@lists.linuxfoundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
> >
>
--f403045c2c249f783c055b05b2f3
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><span style=3D"font-size:12.8px">But I think this one is s=
impler and better than Luke's.</span><div style=3D"font-size:12.8px"><b=
r></div><div style=3D"font-size:12.8px">And now is different like 2012, poo=
ls need be more independ today. Pools want=C2=A0</div><div style=3D"font-si=
ze:12.8px">to express their opinion or standpoint. Some of can't do tha=
t like remove the=C2=A0</div><div style=3D"font-size:12.8px">NYA tag and on=
e the reason is the Block Withholding Attack.</div><div style=3D"font-size:=
12.8px"><br></div><div style=3D"font-size:12.8px">Kevin Pan</div></div><div=
class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Fri, Oct 6, 2017 a=
t 10:36 PM, James Hilliard <span dir=3D"ltr"><<a href=3D"mailto:james.hi=
lliard1@gmail.com" target=3D"_blank">james.hilliard1@gmail.com</a>></spa=
n> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex">There have been some other prop=
osals to deal with this such as<br>
<a href=3D"https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2012-Jun=
e/001506.html" rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoun=
dation.<wbr>org/pipermail/bitcoin-dev/<wbr>2012-June/001506.html</a><br>
that may be possible to implement in existing miners.<br>
<div><div class=3D"h5"><br>
On Tue, Oct 3, 2017 at 9:52 AM, =E6=BD=98=E5=BF=97=E5=BD=AA via bitcoin-dev=
<br>
<<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@li=
sts.<wbr>linuxfoundation.org</a>> wrote:<br>
> Here is a solution may solve Block Withholding Attack. The general ide=
a is<br>
> came from Aviv Zohar(<a href=3D"mailto:avivz@cs.huji.ac.il">avivz@cs.h=
uji.ac.il</a>), I made it work for Bitcoin.<br>
> Anyway, thanks Aviv.<br>
><br>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
><br>
> DIFF_1 =3D 0x00000000FFFF0000000000000000<wbr>000000000000000000000000=
000000<wbr>000000;<br>
><br>
> Diff =3D DIFF_1 / target<br>
><br>
> this is equal to<br>
><br>
> Diff =3D DIFF_1 / (target - 0) or Diff =3D DIFF_1 / abs(target - 0)<br=
>
><br>
> now, we change diff algo to below:<br>
><br>
> New_Diff =3D DIFF_1 / abs(target - offset)<br>
><br>
> Offset is 32 bytes, like uint256 in Bitcoin, range is [0, 2^256),<br>
> define: offset_hash =3D DSHA256(offset).<br>
><br>
> we need to do a little change to the merkle root hash algo, put the<br=
>
> offset_hash as a tx hash in the front of tx hashes.<br>
><br>
> [offset_hash, coinbase_tx_hash, tx01_hash, tx02_hash, =E2=80=A6 , tx_n=
_hash]<br>
><br>
> Actually could put offset_hash in any place in the array of hashes.<br=
>
><br>
> network_hash_range =3D network_hash_end - network_hash_begin<br>
><br>
> miner_hash_range =3D miner_hash_end - miner_hash_begin<br>
><br>
> The offset value MUST between network_hash_begin/end or<br>
> miner_hash_begin/end.<br>
><br>
> <a href=3D"https://user-images.githubusercontent.com/514951/31133378-e=
00d9ca2-a891-11e7-8c61-73325f59f6ed.JPG" rel=3D"noreferrer" target=3D"_blan=
k">https://user-images.<wbr>githubusercontent.com/514951/<wbr>31133378-e00d=
9ca2-a891-11e7-<wbr>8c61-73325f59f6ed.JPG</a><br>
><br>
> When mining pool send a job to miners, put the PoW hash range<br>
> (miner_hash_begin/end) in the job. So if the miners find a hash which =
value<br>
> is between [miner_hash_begin, miner_hash_end], means it's SHOULD b=
e a<br>
> valid share, could submit the share to the pool. If the hash value is<=
br>
> between [network_hash_begin, network_hash_end] means find a valid bloc=
k.<br>
><br>
> The network_diff is much much high than the miner's diff, means th=
e<br>
> network_hash_range is much much smaller than miner_hash_range. By now,=
<br>
> a typical miner's pool diff is around 16K, network diff is 1123863=
285132,<br>
> so miner_hash_range is at least million times bigger than<br>
> network_hash_range.<br>
> The miners only know miner_hash_range, it's impossible for cheat m=
iners<br>
> to find out which share could make a valid block or not.<br>
><br>
> Problems:<br>
> 1. it's a hard fork.<br>
> 2. will make existed asic dsha256 chips useless, but I think it's =
only a<br>
> small change to make new asic chips based on existed tech.<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> bitcoin-dev mailing list<br>
> <a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@l=
ists.<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.<wb=
r>org/mailman/listinfo/bitcoin-<wbr>dev</a><br>
><br>
</blockquote></div><br></div>
--f403045c2c249f783c055b05b2f3--
|