Pages:
Author

Topic: Stats on malled transactions (Read 17391 times)

legendary
Activity: 1974
Merit: 1029
February 15, 2014, 01:11:28 PM
I am however certain that it will come back again until we fix malleability.

Until we fix? Developers done that 4 days ago, pull request merged into bitcoin:master
https://github.com/bitcoin/bitcoin/pull/3651

It's over. Now on to another "bug in the bitcoin software", whenever it may come Cheesy

That patch doesn't fix malleability. There's still a bunch of things that allows us to alter txid en route. https://gist.github.com/sipa/8907691
hero member
Activity: 900
Merit: 1014
advocate of a cryptographic attack on the globe
February 15, 2014, 10:56:35 AM
It is not over until it has been released and enough miners have upgraded + 95% of the last 1000 blocks are version 3.
This will take some time.

Is there a page to track block version # as a % of the net as there was when we went to block version #2?

Will this change be in 0.8.7 and/or 0.9?
Jan
legendary
Activity: 1043
Merit: 1002
February 15, 2014, 07:22:57 AM
It is not over until it has been released and enough miners have upgraded + 95% of the last 1000 blocks are version 3.
This will take some time.
full member
Activity: 216
Merit: 100
February 15, 2014, 07:20:31 AM
Over? Not exactly. The hole has been plugged but there's still a hole in the ship.

Which hole is still there, I don't follow you? If you think protocol should be changed to sign the TxID that will not happen for many reasons, they were explained earlier. This fix removes the possibility your new transactions being rejected because of malleability, so there's 0 chance regular users will be again effected by this issue. When and if will MtGox fix their own implementation is their own problem, they are rapidly becoming irrelevant.

As long as transaction malleability is in the protocol the hole is still there - even though most exchanges will have plugged it.
legendary
Activity: 1428
Merit: 1000
February 15, 2014, 07:17:20 AM
they are rapidly becoming irrelevant.

ive heard this to often before
legendary
Activity: 1974
Merit: 1077
^ Will code for Bitcoins
February 15, 2014, 07:15:36 AM
Over? Not exactly. The hole has been plugged but there's still a hole in the ship.

Which hole is still there, I don't follow you? If you think protocol should be changed to sign the TxID that will not happen for many reasons, they were explained earlier. This fix removes the possibility your new transactions being rejected because of malleability, so there's 0 chance regular users will be again effected by this issue. When and if will MtGox fix their own implementation is their own problem, they are rapidly becoming irrelevant.
full member
Activity: 216
Merit: 100
February 15, 2014, 06:55:37 AM
We haven't seen any large scale malleability attempts for the last few days, so I am going to stop tracking this for a while.
I am however certain that it will come back again until we fix malleability.

Until we fix? Developers done that 4 days ago, pull request merged into bitcoin:master
https://github.com/bitcoin/bitcoin/pull/3651

It's over. Now on to another "bug in the bitcoin software", whenever it may come Cheesy

Over? Not exactly. The hole has been plugged but there's still a hole in the ship.
legendary
Activity: 1974
Merit: 1077
^ Will code for Bitcoins
February 15, 2014, 06:47:16 AM
We haven't seen any large scale malleability attempts for the last few days, so I am going to stop tracking this for a while.
I am however certain that it will come back again until we fix malleability.

Until we fix? Developers done that 4 days ago, pull request merged into bitcoin:master
https://github.com/bitcoin/bitcoin/pull/3651

It's over. Now on to another "bug in the bitcoin software", whenever it may come Cheesy
full member
Activity: 216
Merit: 100
February 15, 2014, 06:39:23 AM
2014-02-14 54
Updating OP.

We haven't seen any large scale malleability attempts for the last few days, so I am going to stop tracking this for a while.
I am however certain that it will come back again until we fix malleability.

Thanks for your updates so far! Smiley
Jan
legendary
Activity: 1043
Merit: 1002
February 15, 2014, 05:59:47 AM
2014-02-14 54
Updating OP.

We haven't seen any large scale malleability attempts for the last few days, so I am going to stop tracking this for a while.
I am however certain that it will come back again until we fix malleability.
Jan
legendary
Activity: 1043
Merit: 1002
February 14, 2014, 02:55:17 PM
2014-02-13 219
Updating OP.
Jan
legendary
Activity: 1043
Merit: 1002
February 14, 2014, 02:49:19 PM
I am curious as to how the client knows in the first place if a transaction has propagated, thus allowing spending uncofirmed changed output? I mean your ISP can MITM you or all the nodes  connected can just drop it, if you put your tinfoil hat on.

It doesn't it will just keep rebroadcasting periodically.  If you are concerned about that scenario, ensure you have a high number of peers and use a vpn tunnel to get "past" your ISP.  No client does this but you could design a client so that it only broadcasts a tx randomly to some of its peers.  If the tx fully propagates the network the other half should inform you about it.  If they don't that would be a warning sign.  The node could also rotate peers to make isolation even more difficult.

For a commercial entity this can be taken a step further by putting a number of geo diverse listening nodes out that which communicate with your main node via an out of band channel.  We use a setup similar to that to troubleshoot customer reports of "transaction not showing up".  The listening nodes can also be used by 0-confirm merchants to look for things like double spend attempts.  If you imagine a 0-confirm merchant who has 8 listening nodes setup around the world each with an average of 2,000 peers connected, there may be some overlap put lets assume that gives the merchant 10,000 or so unique peers.  If any one of those 10,000 unique peers is relayed the double spend, then it would be relayed to one of the listening nodes who would alert the main node.

And you can go even further.
- make your transaction confidence depend on the depth and width of the parent chain of unconfirmed transactions
- has any unconfirmed parent been malled
- has any unconfirmed parent been attempted double spent
- have sufficient feed been paid for unconfirmed parents
- do any unconfirmed parents have an nlocktime
- are any unconfirmed parents non-standard

These parameters are what the new Mycelium p2p trading feature uses to determine the 0-99% "transaction confidence".
In the end you can never be 100% certain, not even when a transaction has gotten its first confirmation, but you can use it as a tool and throw in  other circumstances like the value of the goods exchanged, your trust in the peer etc.
legendary
Activity: 1974
Merit: 1077
^ Will code for Bitcoins
February 14, 2014, 03:47:57 AM
For a commercial entity this can be taken a step further by putting a number of geo diverse listening nodes out that which communicate with your main node via an out of band channel.  We use a setup similar to that to troubleshoot customer reports of "transaction not showing up".  The listening nodes can also be used by 0-confirm merchants to look for things like double spend attempts.  If you imagine a 0-confirm merchant who has 8 listening nodes setup around the world each with an average of 2,000 peers connected, there may be some overlap put lets assume that gives the merchant 10,000 or so unique peers.  If any one of those 10,000 unique peers is relayed the double spend, then it would be relayed to one of the listening nodes who would alert the main node.

Nice idea. Is this deployed already? Open source by any chance?
donator
Activity: 1218
Merit: 1079
Gerald Davis
February 13, 2014, 11:16:01 PM
I am curious as to how the client knows in the first place if a transaction has propagated, thus allowing spending uncofirmed changed output? I mean your ISP can MITM you or all the nodes  connected can just drop it, if you put your tinfoil hat on.

It doesn't it will just keep rebroadcasting periodically.  If you are concerned about that scenario, ensure you have a high number of peers and use a vpn tunnel to get "past" your ISP.  No client does this but you could design a client so that it only broadcasts a tx randomly to some of its peers.  If the tx fully propagates the network the other half should inform you about it.  If they don't that would be a warning sign.  The node could also rotate peers to make isolation even more difficult.

For a commercial entity this can be taken a step further by putting a number of geo diverse listening nodes out that which communicate with your main node via an out of band channel.  We use a setup similar to that to troubleshoot customer reports of "transaction not showing up".  The listening nodes can also be used by 0-confirm merchants to look for things like double spend attempts.  If you imagine a 0-confirm merchant who has 8 listening nodes setup around the world each with an average of 2,000 peers connected, there may be some overlap put lets assume that gives the merchant 10,000 or so unique peers.  If any one of those 10,000 unique peers is relayed the double spend, then it would be relayed to one of the listening nodes who would alert the main node.


hero member
Activity: 784
Merit: 1000
February 13, 2014, 11:07:58 PM
I am curious as to how the client knows in the first place if a transaction has propagated, thus allowing spending uncofirmed changed output? I mean your ISP can MITM you or all the nodes  connected can just drop it, if you put your tinfoil hat on.

Maybe the miners can be configured to respond to queries about if a transaction is in the mempool, but that opens them up to possible DDOS attacks.
legendary
Activity: 2576
Merit: 2267
1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k
February 13, 2014, 05:33:25 PM
Interesting. More involved than it sounded.
donator
Activity: 1218
Merit: 1079
Gerald Davis
February 13, 2014, 05:17:14 PM
What about a soft fork: pools don't include malled txs and clients don't relay them. I think this would very quickly solve the problem.

What is a malled tx look like?  There are many ways that a tx can be mutated that makes identifying the "correct" one impossible.  Most nodes and pools already drop the duplicate the issue is the duplicate is getting to the pool before the original.  It wouldn't end up in a block otherwise.

If you have two tx each are equally valid and correct, how do you know which one was mutated after sending?   You can't so you do what you already do.  You keep the one you receive first and you drop the other one.  That means if the mutated tx gets to a miner's memory pool first, it will get included in a block.

I thought it was possible to determine if a tx looks like it was created by the standard client or not. Should this not be possible or there are too many different legitimate tx styles out there then I guess we will have to deal with malled txs.

All that really needs to be done is for transactions to be reformatted to standard format and txids generated from that. Any other txid would be invalid. Surely?

That is a rather large "all" by itself as the input script is rather "loose".  That isn't all you need to do though.  ECDSA signatures are not immutable - Ouch. You also need to restrict signatures to a single "form" (DER) as OpenSSL (which Bitcoin uses) validates a variety of forms - double ouch.

To produce immutable hashes you need to:
a) Limit signatures to DER.  OpenSSL verifies non canonical forms of signatures.  Initially Bitcoin was no more restrictive than OpenSSL.  Since v0.8 Bitcoin, non-DER signatures are non standard and are not relayed by nodes running v0.8+.  This was MtGox problem their "Goxxed v0" custom client was creating non-DER signatures and thus the tx were being dropped by most nodes.

b) Make ECDSA Signatures immutable.  ECDSA signatures are not immutable, they were never designed to be and they never will be.  ECDSA will produce the same signature with both S and -S for a given payload and priv key.  So same tx data, same signature, different hash.  To resolve this "Bitcoin signatures" will need to be more restrictive than ECDSA signatures.  In other words all (future) valid Bitcoin signatures are valid ECDSA signatures, but not all valid ECDSA signatures will be valid Bitcoin signatures.

c) Allow only one form of input script for a given outcome.  The Bitcoin protocol is rather loose when it comes to op-codes in the input script.  It is possible to make some changes to these and still produce the same output (just like 3 + 2 = 3 + 2 +0).  Fixing this aspect will require tighter rules on what is a valid input script.


That is a lot to do, test, and get right.  Think of the "upgrading a plane in flight" analogy.

It can be done is phases to provide a safer path to the hard fork.
First the improved rules would be implemented in new version of clients (i.e. all clients would always use a +S instead of a + or -S) but clients wouldn't treat the "worse" tx any differently.
Next clients would favor "better" form of the transaction (i.e. if a node receives duplicates it will keep the one with the +S).
Next clients would consider the "worse" forms to be non-standard and would refuse to relay them (i.e. -S = non-standard, and tx is dropped by an upgraded node but still valid if in a block).
Finally clients would tx which break the new "better" rules to be invalid (i.e. after block # XXXXXXXXXX a tx with a -S is invalid, a block containing a tx with a -S is invalid).

It isn't going to happen overnight so in the interim mutable transaction ids are just a reality for Bitcoin.
legendary
Activity: 2576
Merit: 2267
1RichyTrEwPYjZSeAYxeiFBNnKC9UjC5k
February 13, 2014, 04:58:06 PM
What about a soft fork: pools don't include malled txs and clients don't relay them. I think this would very quickly solve the problem.

What is a malled tx look like?  There are many ways that a tx can be mutated that makes identifying the "correct" one impossible.  Most nodes and pools already drop the duplicate the issue is the duplicate is getting to the pool before the original.  It wouldn't end up in a block otherwise.

If you have two tx each are equally valid and correct, how do you know which one was mutated after sending?   You can't so you do what you already do.  You keep the one you receive first and you drop the other one.  That means if the mutated tx gets to a miner's memory pool first, it will get included in a block.

I thought it was possible to determine if a tx looks like it was created by the standard client or not. Should this not be possible or there are too many different legitimate tx styles out there then I guess we will have to deal with malled txs.

All that really needs to be done is for transactions to be reformatted to standard format and txids generated from that. Any other txid would be invalid. Surely?
donator
Activity: 1218
Merit: 1079
Gerald Davis
February 13, 2014, 04:56:50 PM
How do we explain to Bob that he doesn't get his donut without resulting in a fist fight, a discrimination lawsuit, an all day seminar on the technical workings of the blockchain, giving away a free donut, and/or potentially losing Bob as a regular customer?

You probably won't be able to so the only solution is to prevent it from happening to begin with.


So basically stop accepting 0-conf transactions for all purposes, even from trusted customers, until all wallet software has been updated to not spend unconfirmed change?  This seems like an extremely severe setback for bitcoin adoption and its utility in general.

The issue isn't 0-conf transactions.  It is 0-confirm tx which use as their inputs the unconfirmed outputs of another transaction.

All Bitcoin clients ALREADY prevent the client from spending unconfirmed outputs for lots of very good reasons.   However since the wallet can "trusts itself" they wallet makes an exception for unconfirmed CHANGE.   Obviously no user is going to double spend themselves.   So the prior tx will eventually confirm and that means the change will eventually confirm as well.

Except if an attack mutates the original tx, then the original will never confirm, the duplicate will.  That means the change output is now invalid and the subsequent tx will never confirm.

Simple version:
This isn't about 0-conf tx.  This is about transactions using the as their input 0-conf outputs.
legendary
Activity: 2128
Merit: 1005
ASIC Wannabe
February 13, 2014, 04:52:54 PM
my bitcoin-qt is virtually useless as it is including mauled transactions in its balance. blockchain wallet is fine though.

however, its been 22 confirmations since i sent a deposit to btc-e, i have no idea why it isnt added to my account yet
Pages:
Jump to: