Post
Topic
Board Development & Technical Discussion
Re: Get list of all addresses with a balance over x?
by
btctousd81
on 14/01/2018, 03:16:35 UTC
thanks @btctousd81.

would you give the script that allows to create this csv?
did you do it in bash or python or anything else?


Nice so did you do it from windows or Linux without using a wrapper around someones
mega-big API or running a full-node and using RPC ?

I am trying to code this myself to read block.dat from several  types of forked BC  from Bitcoin
so I need to go back to raw files I think and then see what happens after a fork date to the data
so off the shelf API's won't help me out.

Will be interesting to see who has money in the forks and are not using it





i have full node running at home, on linux centos 7 dedicated to only bitcoind.

there is no single readymade script to get all addresses having balance.

what i did was i used rusty-blockparser to get all unspent outputs in csv.
then loaded it in myql
then some queries to get data in proper format and bitcoin-tool to get address to hash160.

then i have this php script which gets run every 4-6 hours and parses all new blocks using rpc. and updates my mysql db.

it was time consuming task took me 2-3 days to get everything in db.

it would be great if someone could create app which can directly read chainstate db.

parsing blockchain is pretty simple using rpc but its fuckin slow as hell.

every output is +1 and old amount + new amount
while
every input is -1 and old amount - new amount

this is my logic to get uptodate all addresses having balance ..

hope this helps.,

i could upload regular updated db daily but my home net has very slow upload speed so it takes around 7-8 hours to upload above dump.

-------------------------------

edit:

if you want only addresses having balance not care about the amount of btc its holding, then just run

rusty-blockparser with unspentcsv callback

you wiill get huge csv dump file then just use grep sed something like that to only get addresses.

the parser takes around 8 -12 hours., even on my amd fx 8350 , 32 gig dedicated machine.