<blockquote>
<p>I can download the copy of blockchain via bitcoind, but how do I interact with it? How to carry out analysis? Are there any ready-made utilities for this?</p>
</blockquote>
<p>You can either use an existing <a href="https://www.google.com/search?q=blockchain+parser" rel="noreferrer">blockchain parser</a> or write your own software to read the blkXXXXX.dat files (in %APPDATA%\Bitcoin\blocks if using Windows)</p>
<p>I used the <a href="https://en.bitcoin.it/wiki/Protocol_documentation" rel="noreferrer">protocol documentation</a> to write my own parser in <a href="https://go.dev/" rel="noreferrer">Go</a>.</p>
<pre><code>C&gt; blockchain -file %APPDATA%\Bitcoin\blocks\blk02360.dat -longstats -block 115 -tx 2467

Transaction Details in Hex (Decimal/Symbolic):
  Version:................01000000 (1)
  Inputs:.................01 (1)
  Input:1
    Previous Transaction:.35A0AF1A2A97890EEE5FC3D614036ACF10C304D8C2E9B852626E8EA0E7063EA3
    Previous Output Index:0001 (1)
    Script Length:........6A (106)
    Script:...............47304402206EED6418DDDCEB242F5A9E33F74CBC71EC92916B55E95409D7DD2F
                          F05857CA6F02204DB6B0B24EAF200C32B18B19F31ADDF07CFF7FFF5BDE356871
                          D845C110F31EDA0121023A8F1E4FD676A7BD7366E5D232358E92838609875FAC
                          802E604BCEBE1C077CED
    Sequence:.............FFFFFFFF
  Outputs:................02 (2)
  Output 1
    Value:................9714000000000000 (5271)
    Script Length:........19 (25)
    Script:...............76A91412FB816154B441CD9C31B9D2BEA8DB8E6B77D02288AC
  Output 2
    Value:................228A000000000000 (35362)
    Script Length:........17 (23)
    Script:...............A914715CD328A4FFBC4A9099D406BE49181A61FEF37E87
  LockTime:...............00000000 (0)


Statistics for blk02360.dat (2020-12-12 to 2020-12-14)

   115 blocks
215639 transactions (1875.1 per block)
100901 Segwit tx    (46.8%)
644756 inputs       (mean 3.0, max 1100 per transaction)
604246 outputs      (mean 2.8, max 3451 per transaction)

Processed file in 313.6292ms
</code></pre>
<blockquote>
<p>How much time and resources will it take?</p>
</blockquote>
<p>Downloading the blockchain data will take hours or weeks depending mostly on the speed of your storage device - in my experience. I suspect using an SSD instead of a HDD will make a huge difference.</p>
<p>Time to process one blockfile depends on the software used but my simple example shows a typical 128MB blkXXXXX.dat file can be parsed in a third of a second on very modest hardware.</p>
<p>You will have to process several thousand of these.</p>
<p>Time to write a parser will probably be days or weeks depending on your experience and on the complexity of the analysis you want to carry out.</p>

CC BY-SA 4.0
2022-08-09T11:55:09.080Z
2022-08-09T12:33:46.390Z
2022-08-09T12:33:46.390Z
RedGrittyBrick
<p>What I want to do:</p>
<ol>
<li>Download the copy of bitcoin blockchain</li>
<li>Select from it all those addresses that have bitcoins (&gt; 0.05 BTC) and they have not been active for &gt; 7 days</li>
<li>Display statistics on the site in the form of a graph and with the ability to view all addresses, repeating the search every 7 days and updating the statistics</li>
</ol>
<p>What? I do not understand:</p>
<ol>
<li>I can download the copy of blockchain via bitcoind, but how do I interact with it? How to carry out analysis? Are there any ready-made utilities for this?</li>
<li>How much time and resources will it take?</li>
</ol>

<blockchain><bitcoind>
How can I take a "snapshot" of the bitcoin blockchain and analyze it?
giveMeSomePotatoo
# How can I take a "snapshot" of the bitcoin blockchain and analyze it?

(Asked by: username_0 on 2022-08-09)

What I want to do:

1. Download the copy of bitcoin blockchain
2. Select from it all those addresses that have bitcoins (> 0.05 BTC) and they have not been active for > 7 days
3. Display statistics on the site in the form of a graph and with the ability to view all addresses, repeating the search every 7 days and updating the statistics

What? I do not understand:

1. I can download the copy of blockchain via bitcoind, but how do I interact with it? How to carry out analysis? Are there any ready-made utilities for this?
2. How much time and resources will it take?

**Tags:** blockchain, bitcoind


---

## 1 answers

### Answer by username_1 on 2022-08-09. Score: 5 | Accepted answer

> I can download the copy of blockchain via bitcoind, but how do I interact with it? How to carry out analysis? Are there any ready-made utilities for this?

You can either use an existing [blockchain parser](https://www.google.com/search?q=blockchain+parser) or write your own software to read the blkXXXXX.dat files (in %APPDATA%\Bitcoin\blocks if using Windows)

I used the [protocol documentation](https://en.bitcoin.it/wiki/Protocol_documentation) to write my own parser in [Go](https://go.dev/).

```
C> blockchain -file %APPDATA%\Bitcoin\blocks\blk02360.dat -longstats -block 115 -tx 2467

Transaction Details in Hex (Decimal/Symbolic):
  Version:................01000000 (1)
  Inputs:.................01 (1)
  Input:1
    Previous Transaction:.35A0AF1A2A97890EEE5FC3D614036ACF10C304D8C2E9B852626E8EA0E7063EA3
    Previous Output Index:0001 (1)
    Script Length:........6A (106)
    Script:...............47304402206EED6418DDDCEB242F5A9E33F74CBC71EC92916B55E95409D7DD2F
                          F05857CA6F02204DB6B0B24EAF200C32B18B19F31ADDF07CFF7FFF5BDE356871
                          D845C110F31EDA0121023A8F1E4FD676A7BD7366E5D232358E92838609875FAC
                          802E604BCEBE1C077CED
    Sequence:.............FFFFFFFF
  Outputs:................02 (2)
  Output 1
    Value:................9714000000000000 (5271)
    Script Length:........19 (25)
    Script:...............76A91412FB816154B441CD9C31B9D2BEA8DB8E6B77D02288AC
  Output 2
    Value:................228A000000000000 (35362)
    Script Length:........17 (23)
    Script:...............A914715CD328A4FFBC4A9099D406BE49181A61FEF37E87
  LockTime:...............00000000 (0)

Statistics for blk02360.dat (2020-12-12 to 2020-12-14)

   115 blocks
215639 transactions (1875.1 per block)
100901 Segwit tx    (46.8%)
644756 inputs       (mean 3.0, max 1100 per transaction)
604246 outputs      (mean 2.8, max 3451 per transaction)

Processed file in 313.6292ms

```

> How much time and resources will it take?

Downloading the blockchain data will take hours or weeks depending mostly on the speed of your storage device - in my experience. I suspect using an SSD instead of a HDD will make a huge difference.

Time to process one blockfile depends on the software used but my simple example shows a typical 128MB blkXXXXX.dat file can be parsed in a third of a second on very modest hardware.

You will have to process several thousand of these.

Time to write a parser will probably be days or weeks depending on your experience and on the complexity of the analysis you want to carry out.


---

