Bitcoin Forum
December 14, 2017, 11:58:41 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: More than one address within each vout?  (Read 1032 times)
jon_smark
Member
**
Offline Offline

Activity: 90


View Profile
October 15, 2012, 03:10:16 PM
 #1

If you run bitcoind getrawtransaction abcd1234... 1 you get a fairly complex JSON object with all the information about the given transaction.  My question concerns the "addresses" field deep inside each "vout": if I understand regular Bitcoin transactions correctly, this array should usually contain only one address; on what circumstances would it contain more than one address?  Also, could someone point me towards one transaction (either mainchain or testchain) where more than one address is used?
1513295921
Hero Member
*
Offline Offline

Posts: 1513295921

View Profile Personal Message (Offline)

Ignore
1513295921
Reply with quote  #2

1513295921
Report to moderator
1513295921
Hero Member
*
Offline Offline

Posts: 1513295921

View Profile Personal Message (Offline)

Ignore
1513295921
Reply with quote  #2

1513295921
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
salfter
Hero Member
*****
Offline Offline

Activity: 630


My PGP Key: 92C7689C


View Profile WWW
October 15, 2012, 03:46:28 PM
 #2

If you run bitcoind getrawtransaction abcd1234... 1 you get a fairly complex JSON object with all the information about the given transaction.  My question concerns the "addresses" field deep inside each "vout": if I understand regular Bitcoin transactions correctly, this array should usually contain only one address; on what circumstances would it contain more than one address?  Also, could someone point me towards one transaction (either mainchain or testchain) where more than one address is used?


Have a look at output #1 in the following testnet transaction:

http://blockexplorer.com/testnet/tx/829ce39233f7a073e4ffc4c7b594209a06f1987c86c51c17fcfcbdd2393bcdbf

This has two addresses.  Multi-signature transactions would use more than one address, but I'm not sure if this is an example of such.

My Bitgem Pool - PPLNS, Stratum | BTG Explorer
Tipjars: BTC 1TipsGocnz2N5qgAm9f7JLrsMqkb3oXe2 LTC LTipsVC7XaFy9M6Zaf1aGGe8w8xVUeWFvR BTG gTipsVB9qmyYHuqMMKTuCYMHpfkUFBXKrZ | My Bitcoin Note Generator
kjj
Legendary
*
Offline Offline

Activity: 1302



View Profile
October 15, 2012, 04:02:04 PM
 #3

I think never.

It may contain multiple vouts, but each should have only one address.  Even with multisig, I think the address shown would be the hash of the multisig script.

p2pcoin: a USB/CD/PXE p2pool miner - 1N8ZXx2cuMzqBYSK72X4DAy1UdDbZQNPLf - todo
I routinely ignore posters with paid advertising in their sigs.  You should too.
jon_smark
Member
**
Offline Offline

Activity: 90


View Profile
October 15, 2012, 05:26:37 PM
 #4

Thanks guys!

And if someone can find a counterexample, please let me know!
dserrano5
Legendary
*
Offline Offline

Activity: 1848



View Profile
October 18, 2012, 02:12:22 PM
 #5

I think never.

It may contain multiple vouts, but each should have only one address.  Even with multisig, I think the address shown would be the hash of the multisig script.

Then it's funny that the field is called "addresses" instead of "address" and that it's actually an array, instead of a plain scalar:

Code:
    "vout" : [
        {
            "value" : 0.01055000,
            "n" : 0,
            "scriptPubKey" : {
                [some stuff],
                "addresses" : [
                    "17BXw4qwrKv8bd8gLZtYj75V368K88GJW6"
                ]
            }
        },

vs (hypothetical):

Code:
    "vout" : [
        {
            "value" : 0.01055000,
            "n" : 0,
            "scriptPubKey" : {
                [some stuff],
                "address" : "17BXw4qwrKv8bd8gLZtYj75V368K88GJW6"
            }
        },

There must be some reason to this.

kjj
Legendary
*
Offline Offline

Activity: 1302



View Profile
October 18, 2012, 03:29:10 PM
 #6

In theory, you should be able to create scripts that could be satisfied with multiple keys.  In practice, you'd usually do this with P2SH, at least now, and the hash of the script becomes the address.

p2pcoin: a USB/CD/PXE p2pool miner - 1N8ZXx2cuMzqBYSK72X4DAy1UdDbZQNPLf - todo
I routinely ignore posters with paid advertising in their sigs.  You should too.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!