5 ms·
I've never seen a more FUD headline than that. Got to love the journalistic sensationalism at play here. To clear this up: the technique in the article is lite
by Uptrenda 11y ago
I've never seen a more FUD headline than that. Got to love the journalistic sensationalism at play here.
To clear this up: the technique in the article is literally what we use in unit tests to check that our TX-based event code won't break under malleability. It's something that Bitcoin developers have been writing code around forever (and warning about just as long.) So truly: if there's anyone out there still writing code that assumes static TXIDs they really do deserve what's coming to them.
As I see it: the attack reaches critical mayhem in a similar way to accepting zero-conf transactions in that what you have is a consensus problem. The specific fix for TX malleability is to watch transactions based on their meaning, not their TXID (in this case "meaning" is looking at the inputs, outputs, version, timelock, etc to produce equivalent transactions.) And of course: don't accept zero-confirmation transactions.
Here's some of my ultra-1337 Python code for producing the "attack" just for laughs:
def mutate_tx(tx_hex):
"""
Mutates a raw transaction using TX malleability in the scriptSig (specifically, the OP codes.) This function shouldn't be used beyond testing as it uses an ugly eval() hack.
https://en.bitcoin.it/wiki/Transaction_Malleability
"""
tx = CTransaction.deserialize(binascii.unhexlify(tx_hex))
script_sig = repr(tx.vin[0].scriptSig)[9:]
script_sig = eval("CScript([OP_1, OP_DROP, " + script_sig)
tx.vin[0].scriptSig = script_sig
return b2x(tx.serialize())
As you can see, there's nothing to it. Just a clueless attention whore claiming to an even more clueless journalist that he can break Bitcoin.
- phpnode 11y agoI think the article is confusing two different issues, the malleability attacks and the dust attacks. Amaclin seems to be behind the dust attack, which is a cheap way to DoS the blockchain by causing blocks to reach the maximum number of SIGOPS with dust transactions, preventing real transactions from going through. More details here: https://bitcointalk.org/index.php?topic=1166928.0 https://bitcointalk.org/index.php?topic=1166928.0