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
|
Return-Path: <jl2012@xbt.hk>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
[172.17.192.35])
by mail.linuxfoundation.org (Postfix) with ESMTPS id 256F595E
for <bitcoin-dev@lists.linuxfoundation.org>;
Mon, 3 Apr 2017 03:36:25 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from sender-of-o52.zoho.com (sender-of-o52.zoho.com [135.84.80.217])
by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 2D332107
for <bitcoin-dev@lists.linuxfoundation.org>;
Mon, 3 Apr 2017 03:36:24 +0000 (UTC)
Received: from [192.168.1.111] (137.189.135.19 [137.189.135.19]) by
mx.zohomail.com with SMTPS id 1491190578095694.2786970394118;
Sun, 2 Apr 2017 20:36:18 -0700 (PDT)
From: Johnson Lau <jl2012@xbt.hk>
Message-Id: <9820147A-F1E8-4BF6-BBE0-005D20D49653@xbt.hk>
Content-Type: multipart/alternative;
boundary="Apple-Mail=_1C116E78-B8FE-4131-986A-7A3B0B626FC1"
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
Date: Mon, 3 Apr 2017 11:36:13 +0800
In-Reply-To: <CAMZUoKkFh-uBwzTZoJ0kzyJukEG2HeDf_VmTwgZMm1esD+TaFQ@mail.gmail.com>
To: Russell O'Connor <roconnor@blockstream.io>
References: <2D094CEC-3756-45B0-970F-1EB33DF352C5@xbt.hk>
<CAMZUoKkFh-uBwzTZoJ0kzyJukEG2HeDf_VmTwgZMm1esD+TaFQ@mail.gmail.com>
X-Mailer: Apple Mail (2.3259)
X-ZohoMailClient: External
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE,
RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
smtp1.linux-foundation.org
Cc: bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] BIP draft: Extended block header hardfork
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Mon, 03 Apr 2017 03:36:25 -0000
--Apple-Mail=_1C116E78-B8FE-4131-986A-7A3B0B626FC1
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
> On 3 Apr 2017, at 04:39, Russell O'Connor <roconnor@blockstream.io> =
wrote:
>=20
> On Sun, Apr 2, 2017 at 4:13 PM, Johnson Lau via bitcoin-dev =
<bitcoin-dev@lists.linuxfoundation.org =
<mailto:bitcoin-dev@lists.linuxfoundation.org>> wrote:
> =E2=80=A2 the witness of the first input of the coinbase =
transaction MUST have exactly one stack item (the "extended header"), =
with the following data:
> =E2=80=A2 bytes 0 to 3: nHeight MUST be equal to the =
height of this block (signed little endian)
>=20
> Someone told me a while back that it would be more natural if we move =
the nHeight from the coinbase script to the coinbase locktime. Have you =
considered doing this?
Yes, it=E2=80=99d look much better. But I=E2=80=99m thinking of a =
different approach: instead of using a hash of 0000=E2=80=A6.0000, we =
use the hash of previous block for the coinbase input. With some new =
SIGHASH design, this allows people to pay to a child of a particular =
block. This is actually implemented in my spoonnet2 branch. I=E2=80=99ll =
describe it with a BIP soon
However, what I=E2=80=99m trying to do in the extended block header is =
independent to the design of coinbase tx. Here I=E2=80=99m trying to let =
people knowing the height just by a header and extended header (<300 =
bytes), without requiring all headers in the history.
Also I forgot to post the link of the BIP: =
https://github.com/jl2012/bips/blob/spoonnet/bip-extheader.mediawiki =
<https://github.com/jl2012/bips/blob/spoonnet/bip-extheader.mediawiki>=
--Apple-Mail=_1C116E78-B8FE-4131-986A-7A3B0B626FC1
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=utf-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div =
class=3D"">On 3 Apr 2017, at 04:39, Russell O'Connor <<a =
href=3D"mailto:roconnor@blockstream.io" =
class=3D"">roconnor@blockstream.io</a>> wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" =
class=3D"">On Sun, Apr 2, 2017 at 4:13 PM, Johnson Lau via bitcoin-dev =
<span dir=3D"ltr" class=3D""><<a =
href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank" =
class=3D"">bitcoin-dev@lists.linuxfoundation.org</a>></span> =
wrote:<br class=3D""><div class=3D"gmail_extra"><div =
class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> =
=E2=80=A2 the witness of the first input of the coinbase =
transaction MUST have exactly one stack item (the "extended header"), =
with the following data:<br class=3D"">
=E2=80=A2 bytes =
0 to 3: nHeight MUST be equal to the height of this block (signed little =
endian)<br class=3D""></blockquote><div class=3D""><br =
class=3D""></div><div class=3D""> Someone told me a while back that =
it would be more natural if we move the nHeight from the coinbase script =
to the coinbase locktime. Have you considered doing this?<br =
class=3D""></div></div></div></div>
</div></blockquote></div><div class=3D""><br class=3D""></div><div =
class=3D"">Yes, it=E2=80=99d look much better. But I=E2=80=99m thinking =
of a different approach: instead of using a hash of 0000=E2=80=A6.0000, =
we use the hash of previous block for the coinbase input. With some new =
SIGHASH design, this allows people to pay to a child of a particular =
block. This is actually implemented in my spoonnet2 branch. I=E2=80=99ll =
describe it with a BIP soon</div><div class=3D""><br class=3D""></div><div=
class=3D"">However, what I=E2=80=99m trying to do in the extended block =
header is independent to the design of coinbase tx. Here I=E2=80=99m =
trying to let people knowing the height just by a header and extended =
header (<300 bytes), without requiring all headers in the =
history.</div><div class=3D""><br class=3D""></div><div class=3D"">Also =
I forgot to post the link of the BIP: <a =
href=3D"https://github.com/jl2012/bips/blob/spoonnet/bip-extheader.mediawi=
ki" =
class=3D"">https://github.com/jl2012/bips/blob/spoonnet/bip-extheader.medi=
awiki</a></div></body></html>=
--Apple-Mail=_1C116E78-B8FE-4131-986A-7A3B0B626FC1--
|