{"type":"rich","version":"1.0","author_name":"npub1wtx5qvewc7pd6znlvwktq03mdld05mv3h5dkzfwd3dc30gdmsptsugtuyn","author_url":"https://nostr.ae/npub1wtx5qvewc7pd6znlvwktq03mdld05mv3h5dkzfwd3dc30gdmsptsugtuyn","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2015-10-20\n📝 Original message:On Tue, Oct 20, 2015 at 12:23 AM s7r via bitcoin-dev \u003c\nbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\n\n\u003e So what exactly is used to create the normalized txid (sha256 hash of\n\u003e what data)? I've read in the linked BIP draft that it will strip the\n\u003e 'malleable parts' but didn't understand what exactly will be used to\n\u003e calculate the normalized transactions ids and how will the change apply\n\u003e retro-active for the transactions so deep buried in the blockchain?\n\u003e\n\nThe normalization involves two steps:\n - strip the scriptSig scripts in the inputs, i.e., the only part whose\nintegrity is not guaranteed by the signature itself, by replacing the\nscripts with empty strings (var length string of size 0)\n - replace the hashes referencing the outputs being spent with the\nnormalized hashes of the transaction that created the outputs. This is done\nrecursively down to the first v2 transactions.\n\nThe second part is not yet explained in the draft, but I will amend it as\nsoon as possible.\n\n\n\u003e Pubkeys (addresses) can be reused infinitely so what guarantees us\n\u003e unique normalized txids all the time and protection against replay\n\u003e attacks? The question is not if this issue is covered or not, I know it\n\u003e is, I am just asking how, in simpler terms.\n\u003e\n\nNon-coinbase transactions can still not be replayed since the normalized\ntransaction still includes a the normalized transaction hashes of claimed\noutputs, hence any attempt to replay a transaction would fail since the\noutputs were already spent. For coinbase transactions it is indeed possible\nthat we create multiple transactions with the same hash (only one of which\nwould be spendable), hence we do not strip coinbase transactions and rely\non BIP 34 to make the coinbase transactions unique (except for blocks 91842\nand 91880 which are the reason we introduced BIP 34 in the first place).\nClarifying the way the normalized transaction ID is computed should remove\nany ambiguities I hope.\n\n\n\u003e\n\u003e SCRIPT_CHECKSIGEX_NORMALIZE could be explained better in the document.\n\u003e\n\u003e Will it also fix \u003e third level malleability (a tx which spends from\n\u003e another unconfirmed tx which spends from yet another unconfirmed tx)?\n\u003e\n\nYes, if the computation of the normalized transaction ID includes replacing\ninput hashes with their normalized counterpart makes a chain of any depth\nnon-malleable.\n\nHTH,\nChristian\n\n\u003e\n\u003e\n\u003e On 10/19/2015 6:23 PM, Tier Nolan via bitcoin-dev wrote:\n\u003e \u003e On Mon, Oct 19, 2015 at 3:01 PM, Christian Decker via bitcoin-dev\n\u003e \u003e \u003cbitcoin-dev at lists.linuxfoundation.org\n\u003e \u003e \u003cmailto:bitcoin-dev at lists.linuxfoundation.org\u003e\u003e wrote:\n\u003e \u003e\n\u003e \u003e     As with the previous version, which was using a hard-fork, the\n\u003e \u003e     normalized transaction ID is computed only considering the\n\u003e \u003e     non-malleable parts of a transaction, i.e., stripping the signatures\n\u003e \u003e     before computing the hash of the transaction.\n\u003e \u003e     \u003chttps://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev\u003e\n\u003e \u003e\n\u003e \u003e\n\u003e \u003e Is this proposal recursive?\n\u003e \u003e\n\u003e \u003e *Coinbase transaction\n\u003e \u003e *\n\u003e \u003e\n\u003e \u003e * n-txid = txid\n\u003e \u003e\n\u003e \u003e *Non-coinbase transactions\n\u003e \u003e *\n\u003e \u003e * replace sigScripts with empty strings\n\u003e \u003e * replace txids in TxIns with n-txid for parents\n\u003e \u003e\n\u003e \u003e The 2nd step is recursive starting from the coinbases.\n\u003e \u003e\n\u003e \u003e In effect, the rule is that txids are what they would have been if\n\u003e \u003e n-txids had been used right from the start.\n\u003e \u003e\n\u003e \u003e\n\u003e _______________________________________________\n\u003e bitcoin-dev mailing list\n\u003e bitcoin-dev at lists.linuxfoundation.org\n\u003e https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev\n\u003e\n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20151020/2655d737/attachment.html\u003e"}
