-
Notifications
You must be signed in to change notification settings - Fork 36.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getrawtransaction does not work for genesis block coinbase transaction #3303
Comments
Works as designed: The genesis block coinbase transaction effectively doesn't exist, as it was never indexed in the original software. Making it spendable would be a hard-forking change, returning it with txindex=1 would suggest the coin supply was 50 BTC higher than it actually is since it hasn't been spent. |
Well, I am mainly going at it for the sake of completeness. I'm currently writing a block explorer application, I can access data about every transaction but this one. I could work around it if there was some "getrawblock" function I could call, but that is also missing, so I have to piece together blocks from raw transactions. |
getblock(, 0) But really, this "transaction" doesn't exist. |
IMO, the bug is really that "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" is listed in getblock at all. |
I think getblock accepts only 1 parameter. I tried calling getblock(null, 0) or getblock("000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943", 0) and I get {'message': 'getblock \nReturns details of a block with given block-hash.', 'code': -1} . |
The second parameter was added after 0.8. |
You mean in the latest version that is not yet a standard download? I'm running 0.8.5-beta. At any rate, thanks for the info, I will see what the newest update brings, it might make my problem obsolete. |
@luke-jr @ThePiachu i also want to get all detail about a block, such as all the transactions included. but |
I think we should have a special-case error message just for the genesis block coinbase transaction; maybe: {'message': 'Genesis block coinbase transaction is not indexed-- yes, that is weird. No, we are not going to change that.', 'code': -5} |
@gavinandresen If we're going to special-case the genesis block in that RPC, we can just as well return the (known) value :p |
.........do not try, 50 btc per block ,,,,,,to reach 21mill!,,,,which block? |
It’s not indexed and thus not included in the coin supply. Even satoshi
can’t spend it
…On Thu, Feb 21, 2019 at 7:00 PM ZKVCRYPTO0022 ***@***.***> wrote:
.........do not try, 50 btc per block ,,,,,,to reach 21mill!,,,,which
block?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3303 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABR_7uGyh3_GemEhiE-G2dMLPyUolQGqks5vPnw1gaJpZM4BPRKY>
.
|
Correct, and it will stay like that
Dana četvrtak, 21. veljače 2019. h4x3rotab <notifications@github.com> piše:
… It’s not indexed and thus not included in the coin supply. Even satoshi
can’t spend it
On Thu, Feb 21, 2019 at 7:00 PM ZKVCRYPTO0022 ***@***.***>
wrote:
> .........do not try, 50 btc per block ,,,,,,to reach 21mill!,,,,which
> block?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#3303 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABR_7uGyh3_GemEhiE-
G2dMLPyUolQGqks5vPnw1gaJpZM4BPRKY>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3303 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkJUqpoUHUZOOEnprqJjo7RqpOjLEXWDks5vPqmYgaJpZM4BPRKY>
.
|
While testing a few things on testnet, I called
getrawtransaction("4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b", 1)
(coinbase for block 0 on testnet3) and got a response of
{'message': 'No information available about transaction', 'code': -5}
Calling
getrawtransaction("f0315ffc38709d70ad5647e22048358dd3745f3ce3874223c80a7c92fab0c8ba", 1)
(coinbase for block 1 on testnet4) gives a response of
{'blockhash': '00000000b873e79784647a6c82962c70d228557d24a747ea4d1b8bbe878e1206', 'vout': [{'scriptPubKey': {'reqSigs': 1, 'hex': '21021aeaf2f8638a129a3156fbe7e5ef635226b0bafd495ff03afe2c843d7e3a4b51ac', 'addresses': ['n3GNqMveyvaPvUbH469vDRadqpJMPc84JA'], 'asm': '021aeaf2f8638a129a3156fbe7e5ef635226b0bafd495ff03afe2c843d7e3a4b51 OP_CHECKSIG', 'type': 'pubkey'}, 'value': 50.0, 'n': 0}], 'hex': '01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0e0420e7494d017f062f503253482fffffffff0100f2052a010000002321021aeaf2f8638a129a3156fbe7e5ef635226b0bafd495ff03afe2c843d7e3a4b51ac00000000', 'vin': [{'coinbase': '0420e7494d017f062f503253482f', 'sequence': 4294967295L}], 'txid': 'f0315ffc38709d70ad5647e22048358dd3745f3ce3874223c80a7c92fab0c8ba', 'blocktime': 1296688928, 'version': 1, 'confirmations': 147738, 'time': 1296688928, 'locktime': 0}
Which indicates that getrawtransaction has problems returning genesis block coinbase information. My bitcoind has been set up with -txindex=1 -reindex=1, so it should know all of the transactions.
The text was updated successfully, but these errors were encountered: