Bitcoin Forum
May 25, 2024, 07:36:21 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why have we not discouraged relaying of malleated transactions?  (Read 3058 times)
mb300sd (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
February 11, 2014, 10:58:55 PM
 #1

It seems like the malleable transaction problem is caused only by the use of non-DER encoded signatures in the transaction. Can we discourage the relaying of these? If the standard client and all good implementations of the protocol are creating properly DER encoded signatures, it would be nice to have nodes prefer to relay the properly encoded signature if more than 1 is seen, as well as updating mempool so that the properly signed version is more likely to be mined.

I would make a pull request but ECDSA code tends to go over my head.

Someone tell me if I'm wrong...or if its already being discussed somewhere I'm not finding. Getting annoyed, impatient, and irritable as I watch my net worth decrease.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
ScripterRon
Full Member
***
Offline Offline

Activity: 136
Merit: 120


View Profile
February 11, 2014, 11:29:22 PM
 #2

The ones that I have seen are caused by modifying the first push-data opcode in the input script, changing it from a 1-byte push-data opcode to a 3-byte push-data opcode.  Since the same amount of data is pushed on to the stack, the script is still valid.  It just changes the transaction hash.

Pieter has listed several things that need to be done.  Canonical push-data scripts are just one of them.  Some of the changes will require changes to all clients in order to implement them (such as fixing malleable signatures).

That said, I did change my node to not relay transactions with non-canonical push-data opcodes.  It seems to be rejecting just the bad transactions, so I'm guessing that existing clients are OK with this change.
mb300sd (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
February 11, 2014, 11:36:17 PM
 #3

The ones that I have seen are caused by modifying the first push-data opcode in the input script, changing it from a 1-byte push-data opcode to a 3-byte push-data opcode.  Since the same amount of data is pushed on to the stack, the script is still valid.  It just changes the transaction hash.

Pieter has listed several things that need to be done.  Canonical push-data scripts are just one of them.  Some of the changes will require changes to all clients in order to implement them (such as fixing malleable signatures).

That said, I did change my node to not relay transactions with non-canonical push-data opcodes.  It seems to be rejecting just the bad transactions, so I'm guessing that existing clients are OK with this change.

I'd been under the impression that changing the opcodes would require the privkey.

Would you mind posting your patch? I'd like to update my nodes as well. Would like to think my ~500 connections are worth something. The less well connected nodes that relay these, the more likely that the non-modified tx makes it to miners first.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4186
Merit: 8424



View Profile WWW
February 12, 2014, 01:41:15 AM
 #4

We already block most forms which can be blocked, this was a change in bitcoin 0.8 (that was, in fact, causing withdraws delays for mtgox because they produced transactions with invalid encoding).

The recent flood of transactions use a pushdata change. A patch to block it was written in September 2013, but didn't make it into the codebase until today. If your node is running git bitcoin, just update and you'll have it.

mb300sd (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
February 12, 2014, 03:05:28 AM
 #5

We already block most forms which can be blocked, this was a change in bitcoin 0.8 (that was, in fact, causing withdraws delays for mtgox because they produced transactions with invalid encoding).

The recent flood of transactions use a pushdata change. A patch to block it was written in September 2013, but didn't make it into the codebase until today. If your node is running git bitcoin, just update and you'll have it.



All nodes updated Smiley

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
vokain
Legendary
*
Offline Offline

Activity: 1834
Merit: 1019



View Profile WWW
February 12, 2014, 03:24:20 AM
 #6

wonderful. thank you Mr. Maxwell!
CanaryInTheMine
Donator
Legendary
*
Offline Offline

Activity: 2352
Merit: 1060


between a rock and a block!


View Profile
February 12, 2014, 05:02:03 AM
 #7

maybe this is in the wrong thread, but i have a tiny node running at my house, bitcoin-qt (0.8.6) on windows 7 serves about 60 connections at any given time...
what can I do to change it/update it to help with this issue?
phelix
Legendary
*
Offline Offline

Activity: 1708
Merit: 1020



View Profile
February 12, 2014, 09:39:13 AM
 #8

We already block most forms which can be blocked, this was a change in bitcoin 0.8 (that was, in fact, causing withdraws delays for mtgox because they produced transactions with invalid encoding).

The recent flood of transactions use a pushdata change. A patch to block it was written in September 2013, but didn't make it into the codebase until today. If your node is running git bitcoin, just update and you'll have it.


This is good news. Also: Sipa is the best!  Cheesy
mb300sd (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
February 13, 2014, 11:09:42 PM
 #9

maybe this is in the wrong thread, but i have a tiny node running at my house, bitcoin-qt (0.8.6) on windows 7 serves about 60 connections at any given time...
what can I do to change it/update it to help with this issue?

This build should be pretty close to the current git and contain the patch, if you are unable to build it yourself.

http://jenkins.bluematt.me/pull-tester/0542619d93811fdb73508abb5299b8fd77f47a0e/out/

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
Holliday
Legendary
*
Offline Offline

Activity: 1120
Merit: 1010



View Profile
February 14, 2014, 12:15:14 AM
 #10

maybe this is in the wrong thread, but i have a tiny node running at my house, bitcoin-qt (0.8.6) on windows 7 serves about 60 connections at any given time...
what can I do to change it/update it to help with this issue?

I bit the bullet and learned how to build from git in order to run this patch on my node. I don't wish it upon anyone who has no idea what they are doing, there isn't a decent guide in existence (although I was not using Windows).

If you aren't the sole controller of your private keys, you don't have any bitcoins.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!