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 0EADEABC for <bitcoin-dev@lists.linuxfoundation.org>; Mon, 20 Nov 2017 19:59:05 +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 33C098A for <bitcoin-dev@lists.linuxfoundation.org>; Mon, 20 Nov 2017 19:59:03 +0000 (UTC) Received: from [10.8.0.102] (119246244201.ctinets.com [119.246.244.201]) by mx.zohomail.com with SMTPS id 1511207941125564.2097344385272; Mon, 20 Nov 2017 11:59:01 -0800 (PST) From: Johnson Lau <jl2012@xbt.hk> Message-Id: <24ADB268-7F46-4451-A53F-23D78CE66274@xbt.hk> Content-Type: multipart/alternative; boundary="Apple-Mail=_E9D453F8-CCA8-4B9E-8EAD-870D5636EE70" Mime-Version: 1.0 (Mac OS X Mail 11.0 \(3445.1.6\)) Date: Tue, 21 Nov 2017 03:58:57 +0800 In-Reply-To: <CAAQs3wth=04PxDL6XzjTVYyZBiM1ZYHTK9-qRP8W+DAb53xMGg@mail.gmail.com> To: Praveen Baratam <praveen.baratam@gmail.com> References: <CAAQs3wuDPktHc6kiZXqTaatOheX4KP=TRgje0_-ED5h8iNs-MA@mail.gmail.com> <F392E62C-00CF-4D91-BB6B-706F2A59C63B@xbt.hk> <CAAQs3wth=04PxDL6XzjTVYyZBiM1ZYHTK9-qRP8W+DAb53xMGg@mail.gmail.com> 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 Cc: bitcoin-dev <bitcoin-dev@lists.linuxfoundation.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 19:59:05 -0000 --Apple-Mail=_E9D453F8-CCA8-4B9E-8EAD-870D5636EE70 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Not really. BIP140 might be easier to implement, but in longterm the = UTXO overhead is significant and unnecessary. There are also other = benefits of segwit written in BIP141. Some of those are applicable even = if you are making a new coin. > On 21 Nov 2017, at 2:07 AM, Praveen Baratam = <praveen.baratam@gmail.com> wrote: >=20 > BIP 140 looks like it solves Tx Malleability with least impact on = current practices. It is still a soft fork though. >=20 > Finally, if we were to create an alternative cyptocurrency similar to = Bitcoin, a Normalized Tx ID approach would be a better choice if I get = it right! > =E1=90=A7 >=20 > On Mon, Nov 20, 2017 at 11:15 PM, Johnson Lau <jl2012@xbt.hk = <mailto:jl2012@xbt.hk>> wrote: > 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. >=20 > Also, changing the definition of TxID is a hardfork change, i.e. = everyone are required to upgrade or a chain split will happen. >=20 > 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 >=20 >> On 21 Nov 2017, at 1:24 AM, Praveen Baratam via bitcoin-dev = <bitcoin-dev@lists.linuxfoundation.org = <mailto: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 = <mailto:bitcoin-dev@lists.linuxfoundation.org> >> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev = <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev> >=20 >=20 >=20 >=20 > --=20 > Dr. Praveen Baratam >=20 > about.me <http://about.me/praveen.baratam> --Apple-Mail=_E9D453F8-CCA8-4B9E-8EAD-870D5636EE70 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 = dir=3D"auto" style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = line-break: after-white-space;" class=3D"">Not really. BIP140 might be = easier to implement, but in longterm the UTXO overhead is significant = and unnecessary. There are also other benefits of segwit written in = BIP141. Some of those are applicable even if you are making a new = coin.<br class=3D""><div><br class=3D""><blockquote type=3D"cite" = class=3D""><div class=3D"">On 21 Nov 2017, at 2:07 AM, Praveen Baratam = <<a href=3D"mailto:praveen.baratam@gmail.com" = class=3D"">praveen.baratam@gmail.com</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" = class=3D"">BIP 140 looks like it solves Tx Malleability with least = impact on current practices. It is still a soft fork though.<div = class=3D""><br class=3D""></div><div class=3D"">Finally, if we were to = create an alternative cyptocurrency similar to Bitcoin, a Normalized Tx = ID approach would be a better choice if I get it right!</div></div><div = hspace=3D"streak-pt-mark" style=3D"max-height:1px" class=3D""><img = alt=3D"" style=3D"width:0px;max-height:0px;overflow:hidden" = src=3D"https://mailfoogae.appspot.com/t?sender=3DacHJhdmVlbi5iYXJhdGFtQGdt= YWlsLmNvbQ%3D%3D&type=3Dzerocontent&guid=3D1dc0cb1a-dc60-4b69-828a= -6db933a55c26" class=3D""><font color=3D"#ffffff" size=3D"1" = class=3D"">=E1=90=A7</font></div><div class=3D"gmail_extra"><br = class=3D""><div class=3D"gmail_quote">On Mon, Nov 20, 2017 at 11:15 PM, = Johnson Lau <span dir=3D"ltr" class=3D""><<a = href=3D"mailto:jl2012@xbt.hk" target=3D"_blank" = class=3D"">jl2012@xbt.hk</a>></span> wrote:<br class=3D""><blockquote = class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc = solid;padding-left:1ex"><div = style=3D"word-wrap:break-word;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 class=3D""><br class=3D""><blockquote type=3D"cite" = class=3D""><div class=3D""><div class=3D"h5"><div class=3D"">On 21 Nov = 2017, at 1:24 AM, Praveen Baratam via bitcoin-dev <<a = href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank" = class=3D"">bitcoin-dev@lists.<wbr class=3D"">linuxfoundation.org</a>> = wrote:</div><br = class=3D"m_-4649666739189099192Apple-interchange-newline"></div></div><div= class=3D""><div class=3D""><div class=3D"h5"><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"m_-4649666739189099192gmail_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></div></div> ______________________________<wbr class=3D"">_________________<span = class=3D""><br class=3D"">bitcoin-dev mailing list<br class=3D""><a = href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank" = class=3D"">bitcoin-dev@lists.<wbr class=3D"">linuxfoundation.org</a><br = class=3D""><a = href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" = target=3D"_blank" class=3D"">https://lists.linuxfoundation.<wbr = class=3D"">org/mailman/listinfo/bitcoin-<wbr class=3D"">dev</a><br = class=3D""></span></div></blockquote></div><br = class=3D""></div></div></blockquote></div><br class=3D""><br clear=3D"all"= class=3D""><div class=3D""><br class=3D""></div>-- <br class=3D""><div = class=3D"gmail_signature" data-smartmail=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></blockquote></div><br class=3D""></div></body></html>= --Apple-Mail=_E9D453F8-CCA8-4B9E-8EAD-870D5636EE70--