Very impressive to roll-your-own indexer instead of just using electrum server. Is there a reason you wrote your own indexer for this tool?
While I haven't even considered using electrum (and I'm not very familiar with how it works internally), to have all the data that you can from the chain you really need to read each block and keep track of every state (addresses/outputs/blocks/transactions) at every single block. This can be very slow very easily, it might've been possible but it would've been slower by magnitude I think and even then I would've needed most of the code I have now
reply
It makes sense. Electrs is too general purpose. You're building an optimized tool.
Maybe I'll try to write an indexer too: https://learnmeabitcoin.com/technical/block/blkdat/
reply
Oh ! To read the .blk files and convert them to usable structs, I’m using a strip down version this library which is sadly archived and doesn’t work with latest version of bitcoin rust. I had so much on my plate already that I just took what I needed and updated it to make it work
What’s nice is that I uses a parr sync iterator to read in advance the block files that you’ll read later while still being synchronous which makes the parsing of the files 60% faster I believe.
You can find the code with credits in parser/bitcoin/db
reply