Bitcoin Forum
December 13, 2017, 10:34:26 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Best way to gather blockchain data  (Read 132 times)
tvle83
Newbie
*
Offline Offline

Activity: 13


View Profile
August 24, 2017, 03:10:57 AM
 #1

I am looking to create an open source blockchain explorer for altcoins. It is written in react and I am using a firebase backend to store the blockchain information.

I was wondering if anyone knows of a good way to gather the information for a given address so I can easily create a richlist and other statistics based on a given address. And to simply be able to search the blockchain and get information about a given address.

Currently the only way I know how is to start at block 0, really and gather each and every address and save the txids associated with that address. I can just do a simple

Address:
   Txid1
   Txid2 etc. etc.

or I could save more information like txid, value out or value in so I can then just use that value information to get a running balance of the given address.

I am writing the front end in reactjs and using cloud functions to query the firebase real time db. I would cache information for each block and txid and address for a period of time so that the data is quicker for each person after the first query for a set amount of time.

For simplicity of the db I think having an address and then a list of txids would be able to do the trick. I can do a query in the cloud functions of a given address and then iterate over the list of txids and parse all the info for the balance and such. After the first time doing that, I can save the running balance of the address to the address node on the same level as the txids too.

Is there a better way or am i on the right track ?
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!