<div dir="ltr"><span style="font-size:13.1999998092651px;line-height:19.7999992370605px">Thanks Stephen, I hadn&#39;t thought about BIP 34 and we need to address this in both proposals. </span><span style="font-size:13.1999998092651px;line-height:19.7999992370605px">If we can avoid it I&#39;d like not to have one transaction hashed one way and other transactions in another way.</span><div><span style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></span></div><div><span style="font-size:13.1999998092651px;line-height:19.7999992370605px">Since BIP 34 explicitly uses the scriptSig to make the coinbase transaction unique, simply removing the scriptSig is not an option as it would potentially cause collisions. I don&#39;t remember why the scriptSig was chosen, but we also have the option of putting the blockchain height in the sequence number of the coinbase input or the locktime of the transaction, restoring the uniqueness constraint in normalized transaction IDs (for both proposals). Is there a specific reason why that was not chosen at the time?<br></span><br><div class="gmail_quote">On Sat, May 16, 2015 at 5:58 AM Stephen &lt;<a href="mailto:stephencalebmorse@gmail.com">stephencalebmorse@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We should make sure to consider how BIP34 affects normalized transaction ids, since the height of the block is included in the scriptSig ensuring that the txid will be different. We wouldn&#39;t want to enable replay attacks in the form of spending coinbase outputs in the same way they were spent from a previous block.<br>
<br>
So maybe normalized txids should strip the scriptSigs of all transactions except for coinbase transactions? This seems to make sense, since coinbase transactions are inherently not malleable anyway.<br>
<br>
Also, s7r linked to my &#39;Build your own nHashType&#39; proposal (although V2 is here: <a href="https://github.com/scmorse/bitcoin-misc/blob/master/sighash_proposal_v2.md" target="_blank">https://github.com/scmorse/bitcoin-misc/blob/master/sighash_proposal_v2.md</a>). I just wanted to add that I think even with normalized ids, it could still be useful to be able to apply these flags to choose which parts of the transaction become signed. I&#39;ve also seen vague references to some kind of a merklized abstract syntax tree, but am not fully sure how that would work. Maybe someone on here could explain it?<br>
<br>
Best,<br>
Stephen<br>
<br>
<br>
<br>
&gt; On May 15, 2015, at 5:54 AM, s7r &lt;<a href="mailto:s7r@sky-ip.org" target="_blank">s7r@sky-ip.org</a>&gt; wrote:<br>
&gt;<br>
&gt; Hello,<br>
&gt;<br>
&gt; How will this exactly be safe against:<br>
&gt; a) the malleability of the parent tx (2nd level malleability)<br>
&gt; b) replays<br>
&gt;<br>
&gt; If you strip just the scriptSig of the input(s), the txid(s) can still<br>
&gt; be mutated (with higher probability before it gets confirmed).<br>
&gt;<br>
&gt; If you strip both the scriptSig of the parent and the txid, nothing can<br>
&gt; any longer be mutated but this is not safe against replays. This could<br>
&gt; work if we were using only one scriptPubKey per tx. But this is not<br>
&gt; enforced, and I don&#39;t think it&#39;s the proper way to do it.<br>
&gt;<br>
&gt; Something similar can be achieved if you would use a combination of<br>
&gt; flags from here:<br>
&gt;<br>
&gt; <a href="https://github.com/scmorse/bitcoin-misc/blob/master/sighash_proposal.md" target="_blank">https://github.com/scmorse/bitcoin-misc/blob/master/sighash_proposal.md</a><br>
&gt;<br>
&gt; But this has some issues too.<br>
&gt;<br>
&gt; I&#39;ve read your draft but didn&#39;t understand how exactly will this prevent<br>
&gt; normal malleability as we know it, second level malleability and replays<br>
&gt; as well as how will we do the transition into mapping the txes in the<br>
&gt; blockchain to normalized txids. Looking forward to read more on this<br>
&gt; topic. Thanks for the brainstorming ;)<br>
&gt;<br>
&gt;<br>
&gt;&gt; On 5/13/2015 3:48 PM, Christian Decker wrote:<br>
&gt;&gt; Hi All,<br>
&gt;&gt;<br>
&gt;&gt; I&#39;d like to propose a BIP to normalize transaction IDs in order to<br>
&gt;&gt; address transaction malleability and facilitate higher level protocols.<br>
&gt;&gt;<br>
&gt;&gt; The normalized transaction ID is an alias used in parallel to the<br>
&gt;&gt; current (legacy) transaction IDs to address outputs in transactions. It<br>
&gt;&gt; is calculated by removing (zeroing) the scriptSig before computing the<br>
&gt;&gt; hash, which ensures that only data whose integrity is also guaranteed by<br>
&gt;&gt; the signatures influences the hash. Thus if anything causes the<br>
&gt;&gt; normalized ID to change it automatically invalidates the signature. When<br>
&gt;&gt; validating a client supporting this BIP would use both the normalized tx<br>
&gt;&gt; ID as well as the legacy tx ID when validating transactions.<br>
&gt;&gt;<br>
&gt;&gt; The detailed writeup can be found<br>
&gt;&gt; here: <a href="https://github.com/cdecker/bips/blob/normalized-txid/bip-00nn.mediawiki" target="_blank">https://github.com/cdecker/bips/blob/normalized-txid/bip-00nn.mediawiki</a>.<br>
&gt;&gt;<br>
&gt;&gt; @gmaxwell: I&#39;d like to request a BIP number, unless there is something<br>
&gt;&gt; really wrong with the proposal.<br>
&gt;&gt;<br>
&gt;&gt; In addition to being a simple alternative that solves transaction<br>
&gt;&gt; malleability it also hugely simplifies higher level protocols. We can<br>
&gt;&gt; now use template transactions upon which sequences of transactions can<br>
&gt;&gt; be built before signing them.<br>
&gt;&gt;<br>
&gt;&gt; I hesitated quite a while to propose it since it does require a hardfork<br>
&gt;&gt; (old clients would not find the prevTx identified by the normalized<br>
&gt;&gt; transaction ID and deem the spending transaction invalid), but it seems<br>
&gt;&gt; that hardforks are no longer the dreaded boogeyman nobody talks about.<br>
&gt;&gt; I left out the details of how the hardfork is to be done, as it does not<br>
&gt;&gt; really matter and we may have a good mechanism to apply a bunch of<br>
&gt;&gt; hardforks concurrently in the future.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m sure it&#39;ll take time to implement and upgrade, but I think it would<br>
&gt;&gt; be a nice addition to the functionality and would solve a long standing<br>
&gt;&gt; problem :-)<br>
&gt;&gt;<br>
&gt;&gt; Please let me know what you think, the proposal is definitely not set in<br>
&gt;&gt; stone at this point and I&#39;m sure we can improve it further.<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Christian<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ------------------------------------------------------------------------------<br>
&gt;&gt; One dashboard for servers and applications across Physical-Virtual-Cloud<br>
&gt;&gt; Widest out-of-the-box monitoring support with 50+ applications<br>
&gt;&gt; Performance metrics, stats and reports that give you Actionable Insights<br>
&gt;&gt; Deep dive visibility with transaction tracing using APM Insight.<br>
&gt;&gt; <a href="http://ad.doubleclick.net/ddm/clk/290420510;117567292;y" target="_blank" style="display:none!important">http://ad.doubleclick.net/ddm/clk/290420510;117567292;y</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Bitcoin-development mailing list<br>
&gt;&gt; <a href="mailto:Bitcoin-development@lists.sourceforge.net" target="_blank">Bitcoin-development@lists.sourceforge.net</a><br>
&gt;&gt; <a href="https://lists.sourceforge.net/lists/listinfo/bitcoin-development" target="_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-development</a><br>
&gt;<br>
&gt; ------------------------------------------------------------------------------<br>
&gt; One dashboard for servers and applications across Physical-Virtual-Cloud<br>
&gt; Widest out-of-the-box monitoring support with 50+ applications<br>
&gt; Performance metrics, stats and reports that give you Actionable Insights<br>
&gt; Deep dive visibility with transaction tracing using APM Insight.<br>
&gt; <a href="http://ad.doubleclick.net/ddm/clk/290420510;117567292;y" target="_blank" style="display:none!important">http://ad.doubleclick.net/ddm/clk/290420510;117567292;y</a><br>
&gt; _______________________________________________<br>
&gt; Bitcoin-development mailing list<br>
&gt; <a href="mailto:Bitcoin-development@lists.sourceforge.net" target="_blank">Bitcoin-development@lists.sourceforge.net</a><br>
&gt; <a href="https://lists.sourceforge.net/lists/listinfo/bitcoin-development" target="_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-development</a><br>
</blockquote></div></div></div>