bitcoin-dev

[BIP] Normalized transaction IDs

[BIP] Normalized transaction IDs

Original Postby Christian Decker

Posted on: October 20, 2015 10:30 UTC

The email thread from bitcoin-dev mailing list discusses the normalization process for transaction IDs and its implementation.

The normalization involves two steps: stripping the scriptSig scripts in the inputs and replacing the hashes referencing the outputs being spent with the normalized hashes of the transaction that created the outputs. However, the second part is not yet explained in the draft. Non-coinbase transactions cannot be replayed since the normalized transaction still includes a the normalized transaction hashes of claimed outputs, hence any attempt to replay a transaction would fail since the outputs were already spent. For coinbase transactions, multiple transactions can be created with the same hash, relying on BIP 34 to make the coinbase transactions unique except for blocks 91842 and 91880 which are the reason BIP 34 was introduced. The computation of the normalized transaction ID replaces input hashes with their normalized counterpart making a chain of any depth non-malleable. The proposal is recursive in nature and the rule is that txids are what they would have been if n-txids had been used right from the start.