Getting all the Delegation Data for Steem Account

in #witness-category6 years ago (edited)

I was asked by one of the @steemit members if possible to get all the delegation history for account @steem. Unfortunately,this Delegation tool only presents the latest delegatees - it does not preserve the entire account delegation history. For example, if a delegator undelegates then this record will be removed from the database.

To get the full delegation history for an account only should be easy - via the usage of getAccountHistory however this takes time to do a fulls scan backwards from the current blockchain height.

As a favor, I ran a script to do a full scan for the account @steem - but it was not as smooth as I thought.

First, if a query is too often, and I often get the following errors:

image.png
Also, the getAccountHistory may return RPC Timeout Error. Usually - this needs to be handled in a try-catch and usually the error disappears if you try it one more time.

image.png

image.png

I also use my Load Balancer Node https://steem.justyy.workers.dev to minimize the connection errors.

It really takes time, 30% for about an hour.

image.png

As I use the Load Balancer Node - the usage is increasing:

image.png

image.png

The data is collected as a text file where each line contains a delegation record from @steem - also the undelegation is recorded as well. The command line uses the tee to simply redirect the output to the text file.

Text file 700MB, zipped to 140MB via tar - and the total number of lines is: 7259827

@steemcurator01

Every little helps! I hope this helps!

Steem On!~

If you like my work, please consider voting for me or Buy Me a Coffee, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.087
BTC 60250.37
ETH 1580.64
USDT 1.00
SBD 0.42