joshlang (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
|
August 26, 2013, 05:21:57 PM |
|
I've been receiving "tx" messages across the wire with 0 inputs and 0 outputs. Literally the payload is 10 bytes { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }. (Version = 1, 0 inputs, 0 outputs, LockTime = 0)
Any idea what those are all about? It's just occasionally. Do they have special purposes or are they just a misbehaving client?
|
|
|
|
gmaxwell
Moderator
Legendary
Offline
Activity: 4298
Merit: 8822
|
|
August 26, 2013, 06:49:12 PM |
|
Somehow these end up in some reference client wallets, and then they rebroadcast them.
It's been observed a number of times, but a cause has not been determined.
|
|
|
|
sebastian
|
|
August 27, 2013, 02:50:26 AM |
|
Can be 2 causes:
1: Certain clients use these transactions as "ping" or "keepalive" to make sure NATs do not tear down the Connection due to inactivity. 2: Malwritten clients, when served with a amount to send = 0 BTC by the end user (propably by mistake, user simply forgot to enter amount), do not validate that the clients amount exceed 0 Before attempting to create a transaction. When the client attempt to create the transaction, it finds out that theres no need for inputs anymore ("do until"-loop) because the amount has been fulfilled. And theres no outputs to add, because the client automatically deletes any outputs with amount=0. Then it ends up with a "empty" transaction, and sends the "empty" transaction.
Those transactions should not harm the network, since each client can only "hold" one such transaction at one time, since its not unique. So its not possible to "flood" a client with such transactions since it will only store one copy of each transaction newertless.
So each block will only store one single copy of these transactions, and each client will only store one such transaction in memory.
So maybe its not a bad idea to keep the possibility for these transactions since they propably fulfil a function to keep holes in NAT open.
|
|
|
|
TierNolan
Legendary
Offline
Activity: 1232
Merit: 1104
|
|
August 27, 2013, 09:54:45 AM |
|
Can be 2 causes:
1: Certain clients use these transactions as "ping" or "keepalive" to make sure NATs do not tear down the Connection due to inactivity.
There is a ping/pong system already as part of the protocol. Those transactions should not harm the network, since each client can only "hold" one such transaction at one time, since its not unique. So its not possible to "flood" a client with such transactions since it will only store one copy of each transaction newertless.
Heh, true. Are 0 input/output transactions actually valid. I thought at least 1 input and 1 output was mandatory (or 0 inputs for coinbase). You can have 0 valued outputs though. So each block will only store one single copy of these transactions, and each client will only store one such transaction in memory.
Have any actually ended up in the block chain?
|
1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
|
|
|
piotr_n
Legendary
Offline
Activity: 2058
Merit: 1416
aka tonikt
|
|
August 27, 2013, 10:39:29 AM |
|
I've been receiving "tx" messages across the wire with 0 inputs and 0 outputs. Literally the payload is 10 bytes { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }. (Version = 1, 0 inputs, 0 outputs, LockTime = 0)
Any idea what those are all about? It's just occasionally. Do they have special purposes or are they just a misbehaving client?
Misbehaving client - I immediately ban nodes sending me a tx with no inputs, though still received 52 of such in the last 40 hours. It's not a big problem for the network - much bigger problem are big txs with "correct horse battery staple" inputs, since these are technically valid (thus no reason to ban a peer), but they take so much more of our b/w (and CPU, if your node gets to verify them).
|
Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.PGP fingerprint: AB9E A551 E262 A87A 13BB 9059 1BE7 B545 CDF3 FD0E
|
|
|
joshlang (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
|
August 27, 2013, 11:55:01 AM |
|
Heh, true. Are 0 input/output transactions actually valid. I thought at least 1 input and 1 output was mandatory (or 0 inputs for coinbase). You can have 0 valued outputs though.
Meh. According to spec, no, they're not valid. But they get serialized fine, it's just nothing happens with them. Have any actually ended up in the block chain?
No. 2: Malwritten clients, when served with a amount to send = 0 BTC by the end user (propably by mistake, user simply forgot to enter amount), do not validate that the clients amount exceed 0 Before attempting to create a transaction. When the client attempt to create the transaction, it finds out that theres no need for inputs anymore ("do until"-loop) because the amount has been fulfilled. And theres no outputs to add, because the client automatically deletes any outputs with amount=0. Then it ends up with a "empty" transaction, and sends the "empty" transaction.
...All sounds good. except... ZOMG ZE END OF ZE WORLD!@@! A "DO UNTIL" LOOP?#^%#$^) kill me now%!## I'm having flashbacks to my pascal/delphi days lol ....And Piotr, wtf is a "correct horse battery staple" input besides my favorite xkcd reference, that is
|
|
|
|
|
piotr_n
Legendary
Offline
Activity: 2058
Merit: 1416
aka tonikt
|
|
August 27, 2013, 03:38:17 PM |
|
There will be spam for as long as stupid pool owners and solo miners allow transactions smaller than 5430 Satoshis. Luckily, I think it happened already. Number of UTXO records was growing very quickly, yet like 3 months ago. But after the change that blocks the dust, after people upgraded their clients, it stopped below 7 millions and have been quite steady ever since then. The idea to treat transactions with outputs below 0.00005430 as non-standard really helped a lot - one of a few realized ideas, of the dev team, that I really and honestly appreciate Still there are the 141462 unspent horse outputs that anyone can use to spam the net - the best solution I see to get rid of them is asking miners to slowly claim them for themselves.
|
Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.PGP fingerprint: AB9E A551 E262 A87A 13BB 9059 1BE7 B545 CDF3 FD0E
|
|
|
jl2012
Legendary
Offline
Activity: 1792
Merit: 1111
|
|
August 27, 2013, 04:25:55 PM |
|
Have any actually ended up in the block chain?
Never: you can search d21633ba23f70118185227be58a63527675641ad37967e2aa461559f577aec43 with google However, I wonder if this is a valid transaction (if someone put it in a block, is the block still valid?)
|
Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY) LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC) PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
|
|
|
piotr_n
Legendary
Offline
Activity: 2058
Merit: 1416
aka tonikt
|
|
August 27, 2013, 04:31:31 PM |
|
However, I wonder if this is a valid transaction (if someone put it in a block, is the block still valid?)
I think it is not, though ATM I cannot point out the exact satoshi's code that discards it. But I am pretty sure it is there...
|
Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.PGP fingerprint: AB9E A551 E262 A87A 13BB 9059 1BE7 B545 CDF3 FD0E
|
|
|
Peter Todd
Legendary
Offline
Activity: 1120
Merit: 1164
|
|
August 27, 2013, 04:36:20 PM |
|
Have any actually ended up in the block chain?
Never: you can search d21633ba23f70118185227be58a63527675641ad37967e2aa461559f577aec43 with google However, I wonder if this is a valid transaction (if someone put it in a block, is the block still valid?) It's not: bool CheckTransaction(const CTransaction& tx, CValidationState &state) { // Basic checks that don't depend on any context if (tx.vin.empty()) return state.DoS(10, error("CheckTransaction() : vin empty")); if (tx.vout.empty()) return state.DoS(10, error("CheckTransaction() : vout empty"));
and in CheckBlock(): // Check transactions BOOST_FOREACH(const CTransaction& tx, block.vtx) if (!CheckTransaction(tx, state)) return error("CheckBlock() : CheckTransaction failed");
|
|
|
|
|