5

I am trying to load the blockchain into a MySQL database by using the data gathered from RPC calls to bitcoind. I am wondering why the "addresses" key within the "vout" array of a transaction is plural. Why can there be multiple addresses receiving bitcoins using only a single output? Below is the result of running

bitcoind getrawtransaction 40d9e9dc25f89b590a26c486c46df9d40a72200080200c8fdf1bdf0562b2fba7 1

for some arbitrary transaction with hash 40d9e9dc25f89b590a26c486c46df9d40a72200080200c8fdf1bdf0562b2fba7. If you look at the bottom you'll see the transaction's vout array with two outputs. The addresses values for each of those outputs are 127W9E5BVn6KxVCV2iiVbJmQrVoUd8xmu3 and 18AQDxusBQTJiNSG6EszPUfi85RhDpo7Qf respectively. Is there some future plan by the core developers to allow multiple addresses to receive bitcoins from a single output? As you can see I am confused by the use of the plural here.

{
    "hex": "0100000005f5cdbc9dc70fae996a991a08e8f9ca4000fc1cd07f98ef7af14b7b8337c1e010570000008a47304402206104041c8f9330103a1c3b77714b95e61ec90769b7f54cba426baaf8e676256402204134829de0e0ac24f340a680655b35747fbad26ab517d5324a22e20505130ba8014104ec3619fb20e737d551489c16b2df50bf91fb95b1d7b15a7835f752b9aeb5bcb4337c40aef04e39962c95e1a8630c793c158ee464d93a80b14cfb0ce9f8039d25ffffffff0238484550f656494ed81189447a256c3abddea3305c5a4fa21b275cefcd1c6e000000008b48304502210092bd8b04c5df3c23e9bf3516c1434ff4cdde8aff42d14ec18eea16393de900ad022008a005f46fdee01c17032fc3688af311c8413ca2c866e8bc95f6c4e955816697014104d1a7f146aa464889c80286b105739bdfe05c186d4d1bc0737898f28d4e1c17a99d5a3c71ada20873916d0d5d75a92db2aaab37b8a14a18338b7b223727f5d417ffffffff37d00652b664deb37d20f7764c4d1b85a19e608024c2343f5449d2beef8576a9020000008b4830450221009ba99d89a15ccd7cefb499c42c0d94ed5e41a18d11007ba6d9d3edd479ec20bb02206c002e270c17190ab5f8d7fef33a73509aea518fae2671e21cdb3aa8dedf53ce0141049a56e83820ad23350de1b1fa3b2686ef053c75c2a01dcae4e777e057e985aa94e8d2a5d7d158c970b10097249dcaa4ec34748f4402a5c4c8eb7a61a27cf3ba80ffffffffb6cf6633a550b4d262c7c37f0fb795f82e091f951cec152ff532deee0f87d9b4010000008c493046022100cb5b6ba715d77876adcd39f5ecc315cd8bd79c29bb56970b9650603decd3f243022100ac157b1ccd55dc53afac81424d8bcadc371e70660659e4b1d2ac38dfd54e008601410408ddf2624fcd9a76b6821768d901d136c72df5cfdeca960f698bbec2a24ce6fe65dc2795c4106db990f40674215c0badc15547749e1098ebf1acc23bfa164299ffffffff405d52e2368d0dbbda25b28c9eec5b48ca25141ec60a94b2dd982550289cfb19010000008b483045022070d50be3affd2201bd8c7cf800c2610b4b1dc8b0edd3292c88b1a9abca272d69022100b60eef3992902992032087c51e6487115dd54ec35ecd75b0e83804f7dcc61a5d01410403f8182f373e43770c0edcf5d793ec1e19d8600a4ef19d90860a5ed8ecd7fc445c4edb315e78db4a80f6aa2fe89e99a88e780bcf964af2b505abe7aefd2039c6ffffffff02104a0f00000000001976a9140c32f2aac46ffdcc2f02048c5f18e1b24b9be3b188ac8035bd00000000001976a9144e900299bc94a699aef0fbf2dbbeabd3a3cb03e888ac00000000",
    "txid": "40d9e9dc25f89b590a26c486c46df9d40a72200080200c8fdf1bdf0562b2fba7",
    "version": 1,
    "locktime": 0,
    "vin": [
        {
            "txid": "10e0c137837b4bf17aef987fd01cfc0040caf9e8081a996a99ae0fc79dbccdf5",
            "vout": 87,
            "scriptSig": {
                "asm": "304402206104041c8f9330103a1c3b77714b95e61ec90769b7f54cba426baaf8e676256402204134829de0e0ac24f340a680655b35747fbad26ab517d5324a22e20505130ba801 04ec3619fb20e737d551489c16b2df50bf91fb95b1d7b15a7835f752b9aeb5bcb4337c40aef04e39962c95e1a8630c793c158ee464d93a80b14cfb0ce9f8039d25",
                "hex": "47304402206104041c8f9330103a1c3b77714b95e61ec90769b7f54cba426baaf8e676256402204134829de0e0ac24f340a680655b35747fbad26ab517d5324a22e20505130ba8014104ec3619fb20e737d551489c16b2df50bf91fb95b1d7b15a7835f752b9aeb5bcb4337c40aef04e39962c95e1a8630c793c158ee464d93a80b14cfb0ce9f8039d25"
            },
            "sequence": 4294967295
        },
        {
            "txid": "6e1ccdef5c271ba24f5a5c30a3debd3a6c257a448911d84e4956f65045483802",
            "vout": 0,
            "scriptSig": {
                "asm": "304502210092bd8b04c5df3c23e9bf3516c1434ff4cdde8aff42d14ec18eea16393de900ad022008a005f46fdee01c17032fc3688af311c8413ca2c866e8bc95f6c4e95581669701 04d1a7f146aa464889c80286b105739bdfe05c186d4d1bc0737898f28d4e1c17a99d5a3c71ada20873916d0d5d75a92db2aaab37b8a14a18338b7b223727f5d417",
                "hex": "48304502210092bd8b04c5df3c23e9bf3516c1434ff4cdde8aff42d14ec18eea16393de900ad022008a005f46fdee01c17032fc3688af311c8413ca2c866e8bc95f6c4e955816697014104d1a7f146aa464889c80286b105739bdfe05c186d4d1bc0737898f28d4e1c17a99d5a3c71ada20873916d0d5d75a92db2aaab37b8a14a18338b7b223727f5d417"
            },
            "sequence": 4294967295
        },
        {
            "txid": "a97685efbed249543f34c22480609ea1851b4d4c76f7207db3de64b65206d037",
            "vout": 2,
            "scriptSig": {
                "asm": "30450221009ba99d89a15ccd7cefb499c42c0d94ed5e41a18d11007ba6d9d3edd479ec20bb02206c002e270c17190ab5f8d7fef33a73509aea518fae2671e21cdb3aa8dedf53ce01 049a56e83820ad23350de1b1fa3b2686ef053c75c2a01dcae4e777e057e985aa94e8d2a5d7d158c970b10097249dcaa4ec34748f4402a5c4c8eb7a61a27cf3ba80",
                "hex": "4830450221009ba99d89a15ccd7cefb499c42c0d94ed5e41a18d11007ba6d9d3edd479ec20bb02206c002e270c17190ab5f8d7fef33a73509aea518fae2671e21cdb3aa8dedf53ce0141049a56e83820ad23350de1b1fa3b2686ef053c75c2a01dcae4e777e057e985aa94e8d2a5d7d158c970b10097249dcaa4ec34748f4402a5c4c8eb7a61a27cf3ba80"
            },
            "sequence": 4294967295
        },
        {
            "txid": "b4d9870feede32f52f15ec1c951f092ef895b70f7fc3c762d2b450a53366cfb6",
            "vout": 1,
            "scriptSig": {
                "asm": "3046022100cb5b6ba715d77876adcd39f5ecc315cd8bd79c29bb56970b9650603decd3f243022100ac157b1ccd55dc53afac81424d8bcadc371e70660659e4b1d2ac38dfd54e008601 0408ddf2624fcd9a76b6821768d901d136c72df5cfdeca960f698bbec2a24ce6fe65dc2795c4106db990f40674215c0badc15547749e1098ebf1acc23bfa164299",
                "hex": "493046022100cb5b6ba715d77876adcd39f5ecc315cd8bd79c29bb56970b9650603decd3f243022100ac157b1ccd55dc53afac81424d8bcadc371e70660659e4b1d2ac38dfd54e008601410408ddf2624fcd9a76b6821768d901d136c72df5cfdeca960f698bbec2a24ce6fe65dc2795c4106db990f40674215c0badc15547749e1098ebf1acc23bfa164299"
            },
            "sequence": 4294967295
        },
        {
            "txid": "19fb9c28502598ddb2940ac61e1425ca485bec9e8cb225dabb0d8d36e2525d40",
            "vout": 1,
            "scriptSig": {
                "asm": "3045022070d50be3affd2201bd8c7cf800c2610b4b1dc8b0edd3292c88b1a9abca272d69022100b60eef3992902992032087c51e6487115dd54ec35ecd75b0e83804f7dcc61a5d01 0403f8182f373e43770c0edcf5d793ec1e19d8600a4ef19d90860a5ed8ecd7fc445c4edb315e78db4a80f6aa2fe89e99a88e780bcf964af2b505abe7aefd2039c6",
                "hex": "483045022070d50be3affd2201bd8c7cf800c2610b4b1dc8b0edd3292c88b1a9abca272d69022100b60eef3992902992032087c51e6487115dd54ec35ecd75b0e83804f7dcc61a5d01410403f8182f373e43770c0edcf5d793ec1e19d8600a4ef19d90860a5ed8ecd7fc445c4edb315e78db4a80f6aa2fe89e99a88e780bcf964af2b505abe7aefd2039c6"
            },
            "sequence": 4294967295
        }
    ],
    "vout": [
        {
            "value": 0.01002,
            "n": 0,
            "scriptPubKey": {
                "asm": "OP_DUP OP_HASH160 0c32f2aac46ffdcc2f02048c5f18e1b24b9be3b1 OP_EQUALVERIFY OP_CHECKSIG",
                "hex": "76a9140c32f2aac46ffdcc2f02048c5f18e1b24b9be3b188ac",
                "reqSigs": 1,
                "type": "pubkeyhash",
                "addresses": [
                    "127W9E5BVn6KxVCV2iiVbJmQrVoUd8xmu3"
                ]
            }
        },
        {
            "value": 0.124,
            "n": 1,
            "scriptPubKey": {
                "asm": "OP_DUP OP_HASH160 4e900299bc94a699aef0fbf2dbbeabd3a3cb03e8 OP_EQUALVERIFY OP_CHECKSIG",
                "hex": "76a9144e900299bc94a699aef0fbf2dbbeabd3a3cb03e888ac",
                "reqSigs": 1,
                "type": "pubkeyhash",
                "addresses": [
                    "18AQDxusBQTJiNSG6EszPUfi85RhDpo7Qf"
                ]
            }
        }
    ],
    "blockhash": "000000000000034a7dedef4a161fa058a2d67a173a90155f3a2fe6fc132e0ebf",
    "confirmations": 104243,
    "time": 1348310759,
    "blocktime": 1348310759
}
4

Multisig transactions might have multiple addresses. For an example I found on webbtc's list of multisig transactions, see 055f9c6dc094cf21fa224e1eb4a54ee3cc44ae9daa8aa47f98df5c73c48997f9 (using insight-api, since it's handy).

{
    "txid": "055f9c6dc094cf21fa224e1eb4a54ee3cc44ae9daa8aa47f98df5c73c48997f9",
    "version": 1,
    "locktime": 0,
    "vin": [
        {
            "txid": "b187426f2fdd5a7ac2f49d822f68e07f48486ee53a8a45de2494f12acb37a0d8",
            "vout": 3,
            "scriptSig": {
                "asm": "3046022100d78c31a20fa11533475be893b229eb4d252e600dcc2a0735d360c541b6aec813022100e3eaa72c915ef47d94ccbd18c2ba6d9ae5b98be6e9fbf968d4bbbb003e06d68701 030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc"
            },
            "sequence": 4294967295,
            "n": 0,
            "addr": "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao",
            "valueSat": 1114144,
            "value": 0.01114144,
            "doubleSpentTxID": null
        }
    ],
    "vout": [
        {
            "value": "0.00010860",
            "n": 0,
            "scriptPubKey": {
                "asm": "1 030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc 20434e545250525459000000140001a9e0e85838b5000000174876e800010053b6 2 OP_CHECKMULTISIG",
                "reqSigs": 1,
                "type": "multisig",
                "addresses": [
                    "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao",
                    "1HT7xU2Ngenf7D4yocz2SAcnNLW7rK8d4E"
                ]
            }
        },
        {
            "value": "0.00010860",
            "n": 1,
            "scriptPubKey": {
                "asm": "1 030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc 20a3c3000000000000000000000000000000000000000000000000000000000000 2 OP_CHECKMULTISIG",
                "reqSigs": 1,
                "type": "multisig",
                "addresses": [
                    "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao",
                    "1HT7xU2Ngenf7D4yocz2SAcnNLW7rK8d4E"
                ]
            }
        },
        {
            "value": "0.00010860",
            "n": 2,
            "scriptPubKey": {
                "asm": "1 030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc 100000000000000000000000000000000000000000000000000000000000000000 2 OP_CHECKMULTISIG",
                "reqSigs": 1,
                "type": "multisig",
                "addresses": [
                    "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao",
                    "1HT7xU2Ngenf7D4yocz2SAcnNLW7rK8d4E"
                ]
            }
        },
        {
            "value": "0.01061564",
            "n": 3,
            "scriptPubKey": {
                "asm": "OP_DUP OP_HASH160 a2f2d251cc06ec1e789800127e3fa6ed9e515651 OP_EQUALVERIFY OP_CHECKSIG",
                "reqSigs": 1,
                "type": "pubkeyhash",
                "addresses": [
                    "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao"
                ]
            }
        }
    ],
    "blockhash": "0000000000000000491fdff68a1c99de7798278a791e461b8d5bebdd9df9de46",
    "confirmations": 1,
    "time": 1401911255,
    "blocktime": 1401911255,
    "valueOut": 0.01094144,
    "size": 433,
    "valueIn": 0.01114144,
    "fees": 0.0002
}
  • So when the script stored in the value of "asm" is run in the next transaction, it will verify the signatures of BOTH addresses? That's how I'm understanding it. – almel Jun 4 '14 at 22:14
  • This particular example appears to be a "1-of-2" multisig, which means that either of the addresses can spend the coins. Blockchain.info calls this output an escrow (which probably means that's the most likely reason you'd do a 1-of-2 multisig). – Tim S. Jun 4 '14 at 22:47
  • If you look at transaction blockchain.info/tx/…, this has a 2 of 3 raw multisig address. – morsecoder Oct 16 '14 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.