0

I am trying to scan all the bitcoin data on my workstation with java to get some high level statistic data.

I parsed all the transactions with bitcoinJ, but I encountered a problem, the Transaction input only has transaction hash and index, which means I need to maintain all the unspent uxtos.

This task seems challenge to me, I have tested the SQLite and memory, Both solution can not work properly, SQLite is too slow, memory can not hold the huge data set at all.

Is there any one has some experience on this topic.

2
  • For what it's worth, Bitcoin Core uses leveldb for this job. I think there is a Java port of it, but don't know if it's the best option. Commented Jan 5, 2022 at 19:57
  • You'll likely need to have txindex=1 set in your bitcoin.conf first. Only they it will store all the transactions of all the block, else it'll just store the headers. After that, you can write a Java program that loops all the blocks from 0, use JSON-RPC API of Bitcoin-cli getblock, from that get all the txHashes, then use them and loop again with gettransaction JSON-RPC to get details. For DB, try Mongo. Commented Nov 18, 2022 at 13:03

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.