Re:Not a protocol fault: MtGox and transaction malleability
by bjourne on Monday February 10, 2014 @07:22AM
(#7210580)
That explanation is so simple it just can't be right. :) Usually if two objects are equal their hashes should be identical too. That's the whole point of hashing since otherwise O(1) lookups aren't possible. Apparently the bitcoin protocol breaks that expectation since two semantically equal transactions can have different hashes.
[ Parent
| on HN ]
Re:Not a protocol fault: MtGox and transaction malleability
by pmorici on Monday February 10, 2014 @07:35AM
(#7210620)
It doesn't break that expectation it's just a misunderstanding of what data is included in the hash.
Re:Not a protocol fault: MtGox and transaction malleability
by makomk on Monday February 10, 2014 @08:26AM
(#7210841)
The main and most important use of transaction hashes in Bitcoin is to ensure that, when blocks are mined, the transactions contained within those blocks are locked in and any modification of those transactions can be detected and rejected. Transaction malleability is meant to change the hash of the transaction, because that ensures no-one can mutate transactions after they're in a block. If you really need to track transactions in the way MtGox is doing, you should construct your own transaction ID that hashes everything except the scriptSigs (which are malleable).
Re:Not a protocol fault: MtGox and transaction malleability
by bjourne on Monday February 10, 2014 @08:57AM
(#7211034)
> Transaction malleability is meant to change the hash of the transaction, because that ensures no-one can mutate transactions after they're in a block.
Huh?
> If you really need to track transactions in the way MtGox is doing, you should construct your own transaction ID that hashes everything except the scriptSigs (which are malleable).
Yeah. Except the Bitcoin network also apparently produces its own hashes of transactions and those hashes include mutable data leading to undesirable situations like hash(txn1) != hash(txn2) even though txn1 == txn2. It's like hashing people by their name and age instead of name and date of birth. Next year you won't find them in your table because their age is different.