Bitcoin Forum
April 25, 2024, 03:57:54 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is there a way to parse the blockchain to see which blocks have spent coinbases?  (Read 608 times)
Taras (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1053


Please do not PM me loan requests!


View Profile WWW
March 09, 2014, 03:28:30 AM
 #1

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.
1714017474
Hero Member
*
Offline Offline

Posts: 1714017474

View Profile Personal Message (Offline)

Ignore
1714017474
Reply with quote  #2

1714017474
Report to moderator
1714017474
Hero Member
*
Offline Offline

Posts: 1714017474

View Profile Personal Message (Offline)

Ignore
1714017474
Reply with quote  #2

1714017474
Report to moderator
1714017474
Hero Member
*
Offline Offline

Posts: 1714017474

View Profile Personal Message (Offline)

Ignore
1714017474
Reply with quote  #2

1714017474
Report to moderator
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714017474
Hero Member
*
Offline Offline

Posts: 1714017474

View Profile Personal Message (Offline)

Ignore
1714017474
Reply with quote  #2

1714017474
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4606



View Profile
March 09, 2014, 11:02:41 PM
 #2

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.
fbueller
Sr. Member
****
Offline Offline

Activity: 412
Merit: 266


View Profile
March 10, 2014, 11:46:08 AM
 #3

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.

Bitwasp Developer.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!