Bitcoin Forum
April 21, 2019, 03:04:40 PM *
News: Latest Bitcoin Core release: 0.17.1 [Torrent]
   Home   Help Search Login Register More  
Pages: [1]
Author Topic: Best way to gather blockchain data  (Read 140 times)
Offline Offline

Activity: 16
Merit: 0

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

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

   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]
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!