Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: DGulari on August 14, 2015, 11:18:46 PM



Title: Is this a legal Bitcoin transaction?
Post by: DGulari on August 14, 2015, 11:18:46 PM
Can I have a single Bitcoin transaction with several outputs where two of those outputs are to the same address?

Can I have both these outputs in the same transaction?


Title: Re: Is this a legal Bitcoin transaction?
Post by: tspacepilot on August 15, 2015, 01:36:48 AM
Can I have a single Bitcoin transaction with several outputs where two of those outputs are to the same address?

Can I have both these outputs in the same transaction?


amount1: 1.2 address: 1Ant11EeZU7V49puUeLsDvbUUi9HS5xSg2
amount2: .2 address: 1Ant11EeZU7V49puUeLsDvbUUi9HS5xSg2


My guess is there's nothing illegal about it.  But it's kinda mean, both to the recipient of the transaction and to the network.  The reason is that you have the opportunity here to reduce the UTXO set by one and you're not taking it.  Also, for whoever wants to spend those outputs, you're hurting them a little bit too.  Imagine whoever owns that address wants to spend 1.3BTC, they have to include both of these outputs in their transaction, making their transaction, meaning that they'll probably have to pay a bit more in fees.  Do you see this?

Also, inb4DannyHamilton, the outputs aren't spent to an address, they're spent to an output script.  ;)


Title: Re: Is this a legal Bitcoin transaction?
Post by: btccashacc on August 15, 2015, 02:10:40 AM
Warning! this bitcoin address contains transactions which may be double spends. You should be extremely careful when trusting any transactions to or from this address.


Title: Re: Is this a legal Bitcoin transaction?
Post by: coinableS on August 15, 2015, 02:37:13 AM
Warning! this bitcoin address contains transactions which may be double spends. You should be extremely careful when trusting any transactions to or from this address.


Well that's weird.  Here's the double spend tx for that address (https://blockchain.info/tx/ac1b8610047ba5b6fd0fe7ce27e35b8dd82662a4a19dbe8da7a271adce3fe813/28)

It was a blockreward, newly generated coins. Can someone explain what we are seeing with these newly generated coins being marked as a double spend? Is this what the block reward from an orphaned block looks like?

EDIT:  Nvm, yes it was an orphaned block. https://blockchain.info/block-index/566760 


Title: Re: Is this a legal Bitcoin transaction?
Post by: Realpra on August 15, 2015, 08:12:44 AM
Can I have a single Bitcoin transaction with several outputs where two of those outputs are to the same address?

Can I have both these outputs in the same transaction?


amount1: 1.2 address: 1Ant11EeZU7V49puUeLsDvbUUi9HS5xSg2
amount2: .2 address: 1Ant11EeZU7V49puUeLsDvbUUi9HS5xSg2

Totally legal and there is nothing wrong with it.

There can be cases where this is desirable also, for instance if you need confirmed outputs to spend, it helps you to create more outputs you can spend - so you don't have to do just one transaction per hour.


Title: Re: Is this a legal Bitcoin transaction?
Post by: tspacepilot on August 16, 2015, 09:08:05 PM
Can I have a single Bitcoin transaction with several outputs where two of those outputs are to the same address?

Can I have both these outputs in the same transaction?


amount1: 1.2 address: 1Ant11EeZU7V49puUeLsDvbUUi9HS5xSg2
amount2: .2 address: 1Ant11EeZU7V49puUeLsDvbUUi9HS5xSg2

Totally legal and there is nothing wrong with it.

There can be cases where this is desirable also, for instance if you need confirmed outputs to spend, it helps you to create more outputs you can spend - so you don't have to do just one transaction per hour.

That is very intersting and it contrasts with what I was saying above (that this wouldn't be desirable because of UTXO bloat and bigger transaction sizes).  I think I see your point, though, that if you had joined this into one output and you spent half of it you'd have to wait for that transaction to confirm before attempting to spend the other half from a change address.


Title: Re: Is this a legal Bitcoin transaction?
Post by: iain on August 25, 2015, 09:22:52 PM
Can I have a single Bitcoin transaction with several outputs where two of those outputs are to the same address?

Can I have both these outputs in the same transaction?


amount1: 1.2 address: 1Ant11EeZU7V49puUeLsDvbUUi9HS5xSg2
amount2: .2 address: 1Ant11EeZU7V49puUeLsDvbUUi9HS5xSg2

Totally legal and there is nothing wrong with it.

There can be cases where this is desirable also, for instance if you need confirmed outputs to spend, it helps you to create more outputs you can spend - so you don't have to do just one transaction per hour.

That is very intersting and it contrasts with what I was saying above (that this wouldn't be desirable because of UTXO bloat and bigger transaction sizes).  I think I see your point, though, that if you had joined this into one output and you spent half of it you'd have to wait for that transaction to confirm before attempting to spend the other half from a change address.

Here's a whale playing with the concept:
https://blockchain.info/tx/29926a5316e59348ea7de95a5966b9e565de42c44f3bd79ba7142b7035b62e7e?show_adv=true (https://blockchain.info/tx/29926a5316e59348ea7de95a5966b9e565de42c44f3bd79ba7142b7035b62e7e?show_adv=true)

Oooh, lotsa (half-)bitcoins! Much wow! :D