<p>blk.dat files contain blocks data in raw format. Also a leveldb index is maintained that helps to quickly lookup blocks/utxo. You can find the details <a href="https://bitcoin.stackexchange.com/questions/853/what-do-the-different-dat-files-contain">here</a> and <a href="https://bitcoin.stackexchange.com/questions/28168/what-are-the-keys-used-in-the-blockchain-leveldb-ie-what-are-the-keyvalue-pair">here</a>.</p>

<p>Blockexplorers will not directly read these files. It is not safe for multiple process to access leveldb at the same time (blockexplorer and bitcoin node  process). Here is a brief summary of what a blockexplorer will do:</p>

<ol>
<li>Create tables having indexes to store blocks/transactions/addresses</li>
<li>Do <a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list" rel="noreferrer">RPC calls</a>/ listen to callbacks to bitcoind to get latest data </li>
<li>Store fetched data into tables </li>
<li>Goto 2. </li>
</ol>

<p>Most of the commonly used blockexplorers are forked from the below opensource  code:</p>

<ul>
<li><a href="https://github.com/bitpay/insight" rel="noreferrer">insight</a></li>
<li><a href="https://github.com/bitcoin-abe/bitcoin-abe" rel="noreferrer">bitcoin abe</a></li>
</ul>

CC BY-SA 3.0
2017-08-29T11:15:35.313Z
2017-08-29T11:15:35.313Z
dark knight
<p>If you click on random wallet at block explorer you get an instant info of all the transactions, balance etc etc. My question is, how their technology works exactly? Do they transform blk????.dat files in some kind of database and then read the stuff from database? If they are, what technology they use to put all transactions in database? Is there any protocol I try to do as well with programme? </p>

<p>When I open blk.dat files, I see only weird chars and from what I have read so far, the info there is not really transparent.</p>

<blockchain><blockchain.info><blockexplorer>
How block explorer technology works?
Miska
# How block explorer technology works?

(Asked by: username_0 on 2017-08-29)

If you click on random wallet at block explorer you get an instant info of all the transactions, balance etc etc. My question is, how their technology works exactly? Do they transform blk????.dat files in some kind of database and then read the stuff from database? If they are, what technology they use to put all transactions in database? Is there any protocol I try to do as well with programme?

When I open blk.dat files, I see only weird chars and from what I have read so far, the info there is not really transparent.

**Tags:** blockchain, blockchain.info, blockexplorer


---

## 1 answers

### Answer by username_1 on 2017-08-29. Score: 6

blk.dat files contain blocks data in raw format. Also a leveldb index is maintained that helps to quickly lookup blocks/utxo. You can find the details [here](https://bitcoin.stackexchange.com/questions/853/what-do-the-different-dat-files-contain) and [here](https://bitcoin.stackexchange.com/questions/28168/what-are-the-keys-used-in-the-blockchain-leveldb-ie-what-are-the-keyvalue-pair).

Blockexplorers will not directly read these files. It is not safe for multiple process to access leveldb at the same time (blockexplorer and bitcoin node process). Here is a brief summary of what a blockexplorer will do:

1. Create tables having indexes to store blocks/transactions/addresses
2. Do [RPC calls](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list)/ listen to callbacks to bitcoind to get latest data
3. Store fetched data into tables
4. Goto 2.

Most of the commonly used blockexplorers are forked from the below opensource code:

* [insight](https://github.com/bitpay/insight)
* [bitcoin abe](https://github.com/bitcoin-abe/bitcoin-abe)


---

