Witness Block Production Summary & Python Scripts

in #witness-category9 years ago (edited)

Hi everyone,
I recently wrote a couple of python scripts to count the number of blocks produced by witnesses and I figured I would post them in case it is helpful to anyone. The first is based off of xeroc's monitor-account.py script and uses xeroc's python-steemlib and is available to use on github. To run it you just need to change the watch_account to the account you want to monitor and the last_block to the block you want to start monitoring from.

Sample output:

first script output

The second script will count the blocks produced for a list of accounts. For any account with more than 50 blocks produced, it will output blocks produced, missed blocks the reliability. Currently, to run this script you will need a modified version of the python-steemlib which can be found here. The changes are already in a pull request so this step should only be temporary. This is my first script using python and everything is a work in progress so feel free to make any comments or suggestions.

Sample Output:
These numbers are based on a starting block of 1 and may include blocks produced while mining.
second script output

Sort:  

Currently, to run this script you will need a modified version of the python-steemlib which can be found here. The changes are already in a pull request so this step should only be temporary.

Why is that pull request necessary? It is easier to just replace the get_witness call here with get_witness_by_account.

Thanks for the help! I have updated the script and it no longer requires the modified python-steemlib or the pull request.