Author

Topic: Is there a way to parse the blockchain to see which blocks have spent coinbases? (Read 634 times)

sr. member
Activity: 412
Merit: 287
Such scripts are incredibly slow. I'm running a script at the moment to scan every block for payments to p2sh addresses (just check all outputs for ones going to addresses with version byte \x05) and it's taken about two weeks to get to block 180000, before it got painfully slow. I'm still leaving it run anyway, but I think a flexible resource to query the blockchain would be invaluable to researchers, especially those who can't code their own tools.
legendary
Activity: 3528
Merit: 4945
There HAS to be a program for this or something. It's unbelievably stressful manually ciphering through one block at a time.
I mean blocks which have their coins spent after being mined.

As far as I know, the only way to know if the block reward has been spent is to search through the entire blockchain to see if ANY other transaction references the transactionID of the block reward in its list of inputs.

Any such program that is going to run efficiently would probably need to pre-process the entire blockchain loading all transactions into an indexed table that would allow you to query input hashes.

Blockchain.info has such as database, and using their API it would be exceedingly simply to create a short script that would find each block reward and determine if/when it was spent.

I'm not sure if blockchain.info would be very happy though with someone flooding their servers with almost 600,000 requests in a short period of time.

Barring that, you'll need to find (or write) a program that will parse the blockchain and load it into something like mySQL.
legendary
Activity: 1386
Merit: 1053
Please do not PM me loan requests!
There HAS to be a program for this or something. It's unbelievably stressful manually ciphering through one block at a time.
I mean blocks which have their coins spent after being mined.
Jump to: