Bitcoin Forum
May 27, 2024, 01:46:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Two separate outputs to the same address in one transaction?  (Read 1449 times)
audenx (OP)
Newbie
*
Offline Offline

Activity: 44
Merit: 0



View Profile
March 08, 2013, 04:36:21 AM
 #1

Is it possible (or considered good/bad form) to have two separate outputs in a Bitcoin transaction that go to the same Bitcoin address?

If it is possible, are there any negative ramifications for the user, the blockchain, etc.?

Thanks.
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1358
Merit: 1002



View Profile
March 08, 2013, 04:42:16 AM
 #2

Not possible. The Bitcoin client will not send it and give you an error.
All the outputs need to be different addresses.
audenx (OP)
Newbie
*
Offline Offline

Activity: 44
Merit: 0



View Profile
March 08, 2013, 05:01:44 AM
 #3

Not possible. The Bitcoin client will not send it and give you an error.
All the outputs need to be different addresses.

Thank you!
grau
Hero Member
*****
Offline Offline

Activity: 836
Merit: 1021


bits of proof


View Profile WWW
March 08, 2013, 03:04:57 PM
 #4

Not possible. The Bitcoin client will not send it and give you an error.
All the outputs need to be different addresses.
I do not see, that this would be a requirement on the protocol level.
blueadept
Full Member
***
Offline Offline

Activity: 225
Merit: 101


View Profile
March 08, 2013, 03:12:29 PM
 #5

You can do this with the Satoshi client using the raw transaction API. Just make sure you're careful not to spend too much in fees.

Like my posts?  Connect with me on LinkedIn and endorse my "Bitcoin" skill.
Decentralized, instant off-chain payments.
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1358
Merit: 1002



View Profile
March 08, 2013, 03:35:40 PM
Last edit: March 08, 2013, 03:52:59 PM by psy
 #6

Not possible. The Bitcoin client will not send it and give you an error.
All the outputs need to be different addresses.
I do not see, that this would be a requirement on the protocol level.

Well, may not be a requirement at the protocol level, but if you use sendmany, be it trough Bitcoin-qt or bitcoind, it will throw a error if you insert the same address more than 1 time.
Been there, done that, got the error "You can only send once to one address on the same transaction"(or something like that, can't remember the exact wording on it)
misterbigg
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001



View Profile
March 08, 2013, 03:40:13 PM
 #7

Two McFlys, with the SAME GUN!!
audenx (OP)
Newbie
*
Offline Offline

Activity: 44
Merit: 0



View Profile
March 08, 2013, 04:06:12 PM
 #8

Not possible. The Bitcoin client will not send it and give you an error.
All the outputs need to be different addresses.
I do not see, that this would be a requirement on the protocol level.

Well, may not be a requirement at the protocol level, but if you use sendmany, be it trough Bitcoin-qt or bitcoind, it will throw a error if you insert the same address more than 1 time.

Does this mean it would be possible, if you wrote your own client, to construct a 2-outputs-to-the-same-address transaction?

Two McFlys, with the SAME GUN!!

LOL
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1358
Merit: 1002



View Profile
March 08, 2013, 04:19:58 PM
 #9

Not possible. The Bitcoin client will not send it and give you an error.
All the outputs need to be different addresses.
I do not see, that this would be a requirement on the protocol level.

Well, may not be a requirement at the protocol level, but if you use sendmany, be it trough Bitcoin-qt or bitcoind, it will throw a error if you insert the same address more than 1 time.

Does this mean it would be possible, if you wrote your own client, to construct a 2-outputs-to-the-same-address transaction?

Two McFlys, with the SAME GUN!!

LOL

Like someone said you can maybe use the raw transactions API to create one of such transactions. But be careful... Already 2 times someone paid 100 BTC on fees using such raw transactions. Not telling you how to do it because I really don't know how.
Maybe someone here will want to teach you, or you may read up on it here: https://en.bitcoin.it/wiki/Raw_Transactions
audenx (OP)
Newbie
*
Offline Offline

Activity: 44
Merit: 0



View Profile
March 08, 2013, 04:31:39 PM
 #10

Like someone said you can maybe use the raw transactions API to create one of such transactions. But be careful... Already 2 times someone paid 100 BTC on fees using such raw transactions.

Warning duly noted! I'm not planning to create raw transactions, myself, as I've read at least two posts in the past two days about accidental fee payments. I'm more interested conceptually about whether it's possible with a new client, since it could help further streamline the idea I'm brainstorming for a web-based alternative to bitcoin-otc. (Two outputs to the same address in one transaction could eliminate the need for an "open" and a "close" signal to appear in separate transactions, thereby potentially reducing fees.)

Maybe someone here will want to teach you, or you may read up on it here: https://en.bitcoin.it/wiki/Raw_Transactions

Thanks for the link.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
March 08, 2013, 04:36:46 PM
 #11

You can't use createrawtransaction to do this.  You have to make the transaction by hand (or using some other tool that you'll probably have to write yourself, but it is pretty easy either way).

Once made, the stock client can sign and broadcast it as usual.  It causes absolutely no problems in the client, network or protocol.  TxOuts are identified by {txhash:sequence} so each output has a unique name and can be spent as usual.

The main problem is that JSON does not allow duplicate keys, and the only interfaces in the stock client to create multi-output transactions are through JSON.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
March 08, 2013, 04:53:32 PM
 #12

7a1539601e5928472eec972e4e12445f99c77f201de7bd641c1eb389e5ec464c


17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
audenx (OP)
Newbie
*
Offline Offline

Activity: 44
Merit: 0



View Profile
March 08, 2013, 05:00:01 PM
 #13


Ahah! Proof. Thanks.
mb300sd
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
March 08, 2013, 05:36:05 PM
 #14

You can use my library to do it if you know a little bit of C#

See the first commented out section of code here,
https://github.com/mb300sd/Bitcoin-Tool/blob/fb782fcc7d70f0a7c9c0acf79add281206658f95/Bitcoin%20Tool/Program.cs

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
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!