Thank you!
This is what I call a coincidence. Just right now I switched to this thread and wanted to reply that I've found a solution which is
bitcoin-iterate (by Rusty Russell)
But thanks for the suggested tool.
Do you happen to know which one is better in terms of functionality and performance ?
EDIT: just experienced that
bitcoin-iterate doesn't seem to work on pruned nodes because it starts reading all available blocks and looking explicitly for the genesis block (see
here where another user ran into this issue, too). Didn't find any switch in the tool yet that will allow me to bypass the genesis search. If anyone knows how to force bitcoin-iterate to run also on pruned nodes, please let me know.
Meanwhile I will try the tool rusty-blockparser which you suggested...
... Well, rusty-blockparser have a lot of requirements (like cargo and during compiling process it downloads and processes dozens of modules or libraries). It takes very long until everything is installed and finished. While typing this text I'm still waiting . .
At the same time I stumbled over this very simple and neat tool, called
blockchain-parser (from Denis Leonov) and was last updated 7 months ago. It's very simple: You input a blk*.dat file and it outputs the content as a text file. Very quick and straight-forward. One can grep and search for the particular info needed.
And as a good reference I want to point to this great article, which explains in detail how everyone could manually dump and read information from bitcoind's blk*.dat files just by using linux standard tools like
od or
hexdump. This article covers everything to know about bitcoind structure for such blk*.dat files. I found it very helpful.
EDIT: After long time waiting for the compilation process of rusty-blockparse unfortunately it doesn't seem to work on the pruned node I tested as expected. Although I even tried to use height start and end beyond the defaults (which usually are pretty fine settings according to the usage examples and manual) rusty-blockparse only detects one single block on my node:
$ ./rusty-blockparser simplestats
[20:30:14] INFO - main: Starting rusty-blockparser v0.8.1 ...
[20:30:14] INFO - index: Reading index from /home/bitcoin/.bitcoin/blocks/index ...
[20:30:27] INFO - index: Got longest chain with 757246 blocks ... <--- this is not correct, my node is on height=757251)
[20:30:27] INFO - blkfile: Reading files from /home/bitcoin/.bitcoin/blocks ...
[20:30:27] INFO - parser: Parsing Bitcoin blockchain (range=0..) ...
[20:30:27] INFO - callback: Executing SimpleStats ...
[20:30:27] INFO - parser: Done. Processed 1 blocks in 0.00 minutes. (avg: 1 blocks/sec)
[20:30:27] INFO - simplestats:
SimpleStats:
-> valid blocks: 1
-> total transactions: 1
-> total tx inputs: 1
-> total tx outputs: 1
-> total tx fees: 0.00000000 (0 units)
-> total volume: 50.00000000 (5000000000 units)
-> biggest value tx: 50.00000000 (5000000000 units)
seen in block #0, txid: 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
-> biggest size tx: 204 bytes
seen in block #0, txid: 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
Averages:
-> avg block size: 0.28 KiB
-> avg time between blocks: 0.00 (minutes)
-> avg txs per block: 1.00
-> avg inputs per tx: 1.00
-> avg outputs per tx: 1.00
-> avg value per output: 50.00
Transaction Types:
-> Pay2PublicKey: 1 (100.00%)
first seen in block #0, txid: 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
[20:30:27] INFO - main: Fin.
as you see, it processed only one single block. But there are hundreds of blocks on that host. I even tried to specify a start range which I know for sure is valid but it didn't help either. Any clues? Seems to me like this tool also comes not along with pruned nodes ? Anyone have some insight or more information on this?
But even
if the tool would work on my pruned node as expected --> how should I achieve the originally mentioned and intended goal with it? I don't see in the options and in the manual any possibility to filter for such things. This tool seems to be more suitable to output dumps of balances, addresses, etc. into a .csv file, there are only three subcommands for that tool.
So I'm still at the beginning. How should I achieve the goal mentioned in the beginning of my post?