Post
Topic
Board Bitcoin Discussion
Re: Eventually the FUNGIBILITY issue of bitcoin will make headlines ...
by
Trent Russell
on 27/09/2015, 20:10:15 UTC
What are you going to do if I'm a criminal and decide to "taint" your Bitcoin by sending bits to your wallet? Sell your bitcoins?

I'm guessing you mean send some bits to one of his addresses. I suspect "taint" applies to txouts rather than addresses. He can avoid "tainting" his bitcoins with your bits by simply never spending your txout -- even though he has the private key.
 

huh?

I'm confused.  Maybe I don't understand Bitcoin transactions well enough.   

I thought once incoming transactions reach the Bitcoin address, you can either spend them or not -- you don't
get to say which of the inputs of other parties count toward your transaction.  If I'm wrong, please explain.

I'm not sure about other wallets, but in Bitcoin-qt you can enable "coin control features" and select which inputs you want to spend.

Wallets often try to hide the details, but txouts are the only things that are spent in bitcoin transactions.

In bitcoind (or in the QT debug console) a transaction can be created using "createrawtransaction". For example, to create tx spending one tx out to one address it would look like this:

createrawtransaction '[{"txid":"abc...[longtxhashinhex]...0af","vout":1}]' '{"1BitcoinAddress":100.0}'

This spends the output 1 (the second, since output 0 is the first) of the tx with id "abc...0af". It creates one new txout which will be output 0 of this new tx after its signed, relayed and confirmed. This new txout can be spent by creating a new tx that spends this txout as one of the output. It would need to be signed by the private key for "1BitcoinAddress" (which isn't a real Bitcoin address,  of course).

More information about transactions is at the bitcoin wiki page:

https://en.bitcoin.it/wiki/Transaction