bitcoin-dev

[BIP] Normalized transaction IDs

[BIP] Normalized transaction IDs

Original Postby Christian Decker

Posted on: October 19, 2015 19:28 UTC

In an email exchange on the bitcoin-dev mailing list, Christian Decker points out that transaction inputs must be normalized by replacing malleable hashes with the normalized hashes.

This has been mentioned in the PR as well. He assures that he will fix the spec and implementation to reflect this. The previous version was using a hard-fork, and the normalized transaction ID is computed only considering the non-malleable parts of a transaction. In other words, signatures are stripped before computing the hash of the transaction. Tier Nolan via bitcoin-dev asks if the proposal is recursive, to which Christian explains that for non-coinbase transactions, sigScripts should be replaced with empty strings and txids in TxIns should be replaced with n-txid for parents. The second step is recursive starting from the coinbases. The rule is that txids are what they would have been if n-txids had been used right from the start.