You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Getrawtransaction does not work for genesis block coinbase transaction #3303
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.
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.
IMO, the bug is really that "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" is listed in getblock at all.
We should just consider "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" as a "no-transactions-at-all merkle root"
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} .
@luke-jr@ThePiachu i also want to get all detail about a block, such as all the transactions included. but getblock is different between 0.7 and 0.8, so i use getrawtransaction, unfortunately, it does't work.
Activity
gmaxwell commentedon Nov 24, 2013
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.
ThePiachu commentedon Nov 25, 2013
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.
luke-jr commentedon Nov 25, 2013
getblock(, 0)
But really, this "transaction" doesn't exist.
luke-jr commentedon Nov 25, 2013
IMO, the bug is really that "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" is listed in getblock at all.
We should just consider "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" as a "no-transactions-at-all merkle root"
ThePiachu commentedon Nov 25, 2013
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} .
luke-jr commentedon Nov 25, 2013
The second parameter was added after 0.8.
ThePiachu commentedon Nov 25, 2013
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.
sumory commentedon Nov 26, 2013
@luke-jr @ThePiachu i also want to get all detail about a block, such as all the transactions included. but
getblockis different between 0.7 and 0.8, so i usegetrawtransaction, unfortunately, it does't work.gavinandresen commentedon Nov 26, 2013
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}
laanwj commentedon May 9, 2014
@gavinandresen If we're going to special-case the genesis block in that RPC, we can just as well return the (known) value :p
ZKVCRYPTO0022 commentedon Feb 21, 2019
.........do not try, 50 btc per block ,,,,,,to reach 21mill!,,,,which block?
h4x3rotab commentedon Feb 21, 2019
ZKVCRYPTO0022 commentedon Feb 23, 2019
Drop unused `invSet` in `CDKGSession` (bitcoin#3303)
Drop unused `invSet` in `CDKGSession` (bitcoin#3303)