gcarq / rusty-blockparser

Bitcoin Blockchain Parser written in Rust language
GNU General Public License v3.0
370 stars 145 forks source link

Add unspent balance output #12

Closed fsvm88 closed 7 years ago

fsvm88 commented 7 years ago

Hi! Would you be interested in merging these patches? They add unspent CSV output dump as a CSV file (balance for all addresses where balance != 0). Consider that it was my first attempt at writing code in rust and was mostly taken and modelled on the csvdump callback. It uses a hashmap and preallocates around 10mln entries, which sort of reflects the number of unique unspent addresses at the time I wrote it (August last year). The module can be useful to avoid having 150GB+ SQL databases just for tracking unspent output. There's no suspend/resume support (would need to serialize/unserialize the hashmap to disk I guess).

Napulsnik commented 7 years ago

Hello. Which command can get a list of unspent balances? In the help it is not written.

fsvm88 commented 7 years ago

Hi @Napulsnik, the command is "unspentcsvdump". You should use it just like csvdump, it doesn't currently support/make use of the resume option, so it will always run on the entire blockchain.

Napulsnik commented 7 years ago

Thank you!

Napulsnik commented 7 years ago

Need a lot of memory. If you send me fresh list of all bitcoin addresses with balance I pay you 10$ in bitcoin. Deal?

fsvm88 commented 7 years ago

@Napulsnik Yup, it does need a lot of memory. Thanks for the offer, but I'd need to download and sync the entire blockchain and then run the whole thing. Don't have that much spare time atm. :)

Napulsnik commented 7 years ago

Ok.

gcarq commented 7 years ago

I will update the README to reflect that change.

edenweb1 commented 7 years ago

@Napulsnik , I have a fresh csv list (all btc adress with positive balance - august 2017) if you are interested !

Napulsnik commented 7 years ago

No longer needed