Author

Topic: Exception: Error in RPC call: {'code': -5, 'message': 'No information available (Read 1546 times)

legendary
Activity: 1456
Merit: 1076
I may write code in exchange for bitcoins.
Is there an rpc call I can make to get the address that the coins in the genesis block went to?  I have been getting addresses by calling getrawtransaction with the reply from getblockhash.  If block 0 doesn't work with getrawtransaction, is there another call I can use to list the vout->addresses?

It isn't spendable, and it isn't available to getrawtransaction, so you can just ignore it and treat it like it doesn't exist (since it essentially doesn't).

If you don't want to do that, then you can hard code the address and amount into your program.



Good point, I can, of course, hard code that address since there's just one such example like this.  Anyway, I'm still curious about the detail of the "quirk" which makes this one unspendable.  Let me know if you know.  Cheers and thanks for the replies!
legendary
Activity: 3388
Merit: 4615
Is there an rpc call I can make to get the address that the coins in the genesis block went to?  I have been getting addresses by calling getrawtransaction with the reply from getblockhash.  If block 0 doesn't work with getrawtransaction, is there another call I can use to list the vout->addresses?

It isn't spendable, and it isn't available to getrawtransaction, so you can just ignore it and treat it like it doesn't exist (since it essentially doesn't).

If you don't want to do that, then you can hard code the address and amount into your program.

legendary
Activity: 1456
Merit: 1076
I may write code in exchange for bitcoins.
Answering my own question partly, I found this: https://en.bitcoin.it/wiki/Genesis_block which does say:

Quote
The first 50BTC block reward went to address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa, though this reward can't be spent due to a quirk in the way that the genesis block is expressed in the code (this may have been intentional).

But I haven't yet found a further explanation about this quirk, still reading though.

I do have a follow up question for the board:

Is there an rpc call I can make to get the address that the coins in the genesis block went to?  I have been getting addresses by calling getrawtransaction with the reply from getblockhash.  If block 0 doesn't work with getrawtransaction, is there another call I can use to list the vout->addresses?
legendary
Activity: 1456
Merit: 1076
I may write code in exchange for bitcoins.
I don't think the generation transaction in the genesis block is indexed. Therefore it can't be spent and getrawtransaction won't work with it.


Thanks for the reply!  Can you point me to where you saw that?

If I understand you, you're saying the 50btc in the block reward (coinbase) for the 0th block isn't spendable by whatever miner solved it?  What's up with those 50btc?
legendary
Activity: 3388
Merit: 4615
I don't think the generation transaction in the genesis block is indexed. Therefore it can't be spent and getrawtransaction won't work with it.
legendary
Activity: 1456
Merit: 1076
I may write code in exchange for bitcoins.
Edited to make the question stand out:

The single transaction on the genesis block of testnet3 gives me an error upon getrawtransaction, all (?) the other blocks seem fine.  What's up with this?

More detail below:

Hi there,

I can use bitcoind RPC to get the hash of the only transaction on the genesis block of testnet3:

Code:
tsp@cedrus:~/$ bitcoind getblock `bitcoind getblockhash 0`
    "hash" : "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943",
    "confirmations" : 279220,
    "size" : 285,
    "height" : 0,
    "version" : 1,
    "merkleroot" : "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
    "tx" : [
        "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"
    ],
    "time" : 1296688602,
    "nonce" : 414098458,
    "bits" : "1d00ffff",
    "difficulty" : 1.00000000,
    "chainwork" : "0000000000000000000000000000000000000000000000000000000100010001",
    "nextblockhash" : "00000000b873e79784647a6c82962c70d228557d24a747ea4d1b8bbe878e1206"
}

However, whenever I try to get transaction info from bitcoind about that transaction hash I get this error:

Code:
tsp@cedrus:~/$ bitcoind getrawtransaction 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
error: {"code":-5,"message":"No information available about transaction"}

And asking for verbose, same error:

Code:
tsp@cedrus:~/$ bitcoind getrawtransaction 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b 1
error: {"code":-5,"message":"No information available about transaction"}

However, if I ask about the block at height=1, no problems:

Code:
tsp@cedrus:~/$ bitcoind getblock `bitcoind getblockhash 1`{
    "hash" : "00000000b873e79784647a6c82962c70d228557d24a747ea4d1b8bbe878e1206",
    "confirmations" : 279219,
    "size" : 190,
    "height" : 1,
    "version" : 1,
    "merkleroot" : "f0315ffc38709d70ad5647e22048358dd3745f3ce3874223c80a7c92fab0c8ba",
    "tx" : [
        "f0315ffc38709d70ad5647e22048358dd3745f3ce3874223c80a7c92fab0c8ba"
    ],
    "time" : 1296688928,
    "nonce" : 1924588547,
    "bits" : "1d00ffff",
    "difficulty" : 1.00000000,
    "chainwork" : "0000000000000000000000000000000000000000000000000000000200020002",
    "previousblockhash" : "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943",
    "nextblockhash" : "000000006c02c8ea6e4ff69651f7fcde348fb9d557a06e6957b65552002a7820"
}

No problem:

Code:
tsp@cedrus:~/src/$ bitcoind getrawtransaction f0315ffc38709d70ad5647e22048358dd3745f3ce3874223c80a7c92fab0c8ba
01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0e0420e7494d017f062f503253482fffffffff0100f2052a010000002321021aeaf2f8638a129a3156fbe7e5ef635226b0bafd495ff03afe2c843d7e3a4b51ac00000000

And using verbose I get the json style reply:

Code:
tsp@cedrus:~/$ bitcoind getrawtransaction f0315ffc38709d70ad5647e22048358dd3745f3ce3874223c80a7c92fab0c8ba 1
{
    "hex" : "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0e0420e7494d017f062f503253482fffffffff0100f2052a010000002321021aeaf2f8638a129a3156fbe7e5ef635226b0bafd495ff03afe2c843d7e3a4b51ac00000000",
    "txid" : "f0315ffc38709d70ad5647e22048358dd3745f3ce3874223c80a7c92fab0c8ba",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "coinbase" : "0420e7494d017f062f503253482f",
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 50.00000000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "021aeaf2f8638a129a3156fbe7e5ef635226b0bafd495ff03afe2c843d7e3a4b51 OP_CHECKSIG",
                "hex" : "21021aeaf2f8638a129a3156fbe7e5ef635226b0bafd495ff03afe2c843d7e3a4b51ac",
                "reqSigs" : 1,
                "type" : "pubkey",
                "addresses" : [
                    "n3GNqMveyvaPvUbH469vDRadqpJMPc84JA"
                ]
            }
        }
    ],
    "blockhash" : "00000000b873e79784647a6c82962c70d228557d24a747ea4d1b8bbe878e1206",
    "confirmations" : 279219,
    "time" : 1296688928,
    "blocktime" : 1296688928
}


Is this expected?  I'm running bitcoind with -txindex=1.  Thanks for any tips!
Jump to: