summaryrefslogtreecommitdiff
path: root/8c/b375e81f9b81997ff2f4a307d3db653afb6dfc
blob: 58b136c9f7b2b27454ad25b10bf853cfb26c1108 (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
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 9820ECAC
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 20 Nov 2017 17:45:28 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from sender-of-o51.zoho.com (sender-of-o51.zoho.com [135.84.80.216])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id BF27155C
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 20 Nov 2017 17:45:26 +0000 (UTC)
Received: from [10.8.0.102] (119246244201.ctinets.com [119.246.244.201]) by
	mx.zohomail.com with SMTPS id 1511199922653339.47954356304626;
	Mon, 20 Nov 2017 09:45:22 -0800 (PST)
From: Johnson Lau <jl2012@xbt.hk>
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_2F38892E-E85A-4E1A-8C5E-36A21E85027D"
Mime-Version: 1.0 (Mac OS X Mail 11.0 \(3445.1.6\))
Date: Tue, 21 Nov 2017 01:45:18 +0800
References: <CAAQs3wuDPktHc6kiZXqTaatOheX4KP=TRgje0_-ED5h8iNs-MA@mail.gmail.com>
To: Praveen Baratam <praveen.baratam@gmail.com>,
	bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>
In-Reply-To: <CAAQs3wuDPktHc6kiZXqTaatOheX4KP=TRgje0_-ED5h8iNs-MA@mail.gmail.com>
Message-Id: <F392E62C-00CF-4D91-BB6B-706F2A59C63B@xbt.hk>
X-Mailer: Apple Mail (2.3445.1.6)
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
Subject: Re: [bitcoin-dev] Why SegWit Anyway?
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, 20 Nov 2017 17:45:28 -0000


--Apple-Mail=_2F38892E-E85A-4E1A-8C5E-36A21E85027D
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

We can=E2=80=99t =E2=80=9Cjust compute the Transaction ID the same way =
the hash for signing the transaction is computed=E2=80=9D because with =
different SIGHASH flags, there are 6 (actually 256) ways to hash a =
transaction.

Also, changing the definition of TxID is a hardfork change, i.e. =
everyone are required to upgrade or a chain split will happen.

It is possible to use =E2=80=9Cnormalised TxID=E2=80=9D (BIP140) to fix =
malleability issue. As a softfork, BIP140 doesn=E2=80=99t change the =
definition of TxID. Instead, the normalised txid (i.e. txid with =
scriptSig removed) is used when making signature. Comparing with segwit =
(BIP141), BIP140 does not have the side-effect of block size increase, =
and doesn=E2=80=99t provide any incentive to control the size of UTXO =
set. Also, BIP140 makes the UTXO set permanently bigger, as the database =
needs to store both txid and normalised txid

> On 21 Nov 2017, at 1:24 AM, Praveen Baratam via bitcoin-dev =
<bitcoin-dev@lists.linuxfoundation.org> wrote:
>=20
> Bitcoin Noob here. Please forgive my ignorance.
>=20
> =46rom what I understand, in SegWit, the transaction needs to be =
serialized into a data structure that is different from the current one =
where signatures are separated from the rest of the transaction data.
>=20
> Why change the format at all? Why cant we just compute the Transaction =
ID the same way the hash for signing the transaction is computed?
>=20
> --=20
> Dr. Praveen Baratam
>=20
> about.me =
<http://about.me/praveen.baratam>_________________________________________=
______
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev


--Apple-Mail=_2F38892E-E85A-4E1A-8C5E-36A21E85027D
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; line-break: after-white-space;" class=3D""><div =
class=3D"">We can=E2=80=99t =E2=80=9Cjust compute the Transaction ID the =
same way the hash for signing the transaction is computed=E2=80=9D =
because with different SIGHASH flags, there are 6 (actually 256) ways to =
hash a transaction.</div><div class=3D""><br class=3D""></div><div =
class=3D"">Also, changing the definition of TxID is a hardfork change, =
i.e. everyone are required to upgrade or a chain split will =
happen.</div><div class=3D""><br class=3D""></div>It is possible to use =
=E2=80=9Cnormalised TxID=E2=80=9D (BIP140) to fix malleability issue. As =
a softfork, BIP140 doesn=E2=80=99t change the definition of TxID. =
Instead, the normalised txid (i.e. txid with scriptSig removed) is used =
when making signature. Comparing with segwit (BIP141), BIP140 does not =
have the side-effect of block size increase, and doesn=E2=80=99t provide =
any incentive to control the size of UTXO set. Also, BIP140 makes the =
UTXO set permanently bigger, as the database needs to store both txid =
and normalised txid<br class=3D""><div class=3D""><div><br =
class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">On 21 =
Nov 2017, at 1:24 AM, Praveen Baratam via bitcoin-dev &lt;<a =
href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" =
class=3D"">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" =
class=3D""><div class=3D""><span =
style=3D"font-family:Verdana,arial,sans-serif;font-size:14px" =
class=3D"">Bitcoin Noob here. Please forgive my =
ignorance.</span></div><span =
style=3D"font-family:Verdana,arial,sans-serif;font-size:14px" =
class=3D""><div class=3D""><span =
style=3D"font-family:Verdana,arial,sans-serif;font-size:14px" =
class=3D""><br class=3D""></span></div>=46rom what I understand, in =
SegWit, the transaction needs to be serialized into a data structure =
that is different from the current one where signatures are separated =
from the rest of the transaction data.</span><div class=3D""><span =
style=3D"font-family:Verdana,arial,sans-serif;font-size:14px" =
class=3D""><br class=3D""></span></div><div class=3D""><span =
style=3D"font-family:Verdana,arial,sans-serif;font-size:14px" =
class=3D"">Why change the format at all? Why cant we just compute the =
Transaction ID the same way the hash for signing the transaction is =
computed?</span><br clear=3D"all" class=3D""><div class=3D""><br =
class=3D""></div>-- <br class=3D""><div class=3D"gmail_signature"><div =
style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;b=
ackground-color:rgb(255,255,255)" class=3D"">Dr. Praveen =
Baratam</div><div =
style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;b=
ackground-color:rgb(255,255,255)" class=3D""><br class=3D""></div><div =
style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;b=
ackground-color:rgb(255,255,255)" class=3D""><a =
href=3D"http://about.me/praveen.baratam" style=3D"color:rgb(17,85,204)" =
target=3D"_blank" class=3D"">about.me</a></div></div>
</div></div>
_______________________________________________<br class=3D"">bitcoin-dev =
mailing list<br class=3D""><a =
href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" =
class=3D"">bitcoin-dev@lists.linuxfoundation.org</a><br =
class=3D"">https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev<=
br class=3D""></div></blockquote></div><br class=3D""></div></body></html>=

--Apple-Mail=_2F38892E-E85A-4E1A-8C5E-36A21E85027D--