Bitcoin Forum
April 24, 2024, 02:36:19 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: More than one address within each vout?  (Read 1130 times)
jon_smark (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


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?
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
salfter
Hero Member
*****
Offline Offline

Activity: 651
Merit: 501


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.

Tipjars: BTC 1TipsGocnz2N5qgAm9f7JLrsMqkb3oXe2 LTC LTipsVC7XaFy9M6Zaf1aGGe8w8xVUeWFvR | My Bitcoin Note Generator | Pool Auto-Switchers: zpool MiningPoolHub NiceHash
Bitgem Resources: Pool Explorer Paper Wallet
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



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.

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

Activity: 90
Merit: 10


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: 1974
Merit: 1029



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
Merit: 1024



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.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
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!