Zilliqastats script

I have written a little script that goes through the Zilliqa mining log to display some stats on mining rewards and epoch details. Use if and as you like.

Note 28-01-2019: There are 2 script versions. One if you have Python version < 3. The other if you have Python 3.x. Use:

  • Python 2.7 -> zilliqastats.py
  • Python 3.x -> zilliqastats.py3

They can be found here: https://github.com/therealmko/zilliqastats

Example:
$ ./zilliqastats.py -h
usage: zilliqastats.py [-h] [-o OPTION] [-l LOGNAME]

optional arguments:
  -h, --help            show this help message and exit
  -o OPTION, --option OPTION
                        Amount of Zilliqa rewarded or show Epoch stats,
                        options: total, daytotal or epochstats
  -l LOGNAME, --logname LOGNAME
                        Zilliqa log to check rewards from

$ ./zilliqastats.py -o total -l zilliqa-00001-log.txt

Total amount of Zilliqa received as reward, captured by zilliqa-00001-log.txt: 21.7992181997

$ ./zilliqastats.py -o daytotal -l zilliqa-00001-log.txt

Amount of Zilliqa received per day as reward, capture by zilliqa-00001-log.txt:
Reward on 18-12-24: 1.17264887192
Reward on 18-12-25: 5.75617467098
Reward on 18-12-26: 1.14599774329
Reward on 18-12-27: 1.56483261709
Reward on 18-12-28: 5.73067738602
Reward on 19-01-03: 2.75029278104
Reward on 19-01-04: 0.901330700987
Reward on 19-01-05: 2.77726342834

$ ./zilliqastats.py -o epochstats -l zilliqa-00001-log.txt | tail -60
[INFO][ 6909][19-01-04T18:29:13.317][SetState                      ][Epoch 2500] Node State is now POW_SUBMISSION at epoch 2500
[INFO][ 6894][19-01-04T18:33:33.738][StartFirstTxEpoch             ][Epoch 2500] I am backup member of the sharded committee
[INFO][ 6798][19-01-05T00:26:24.456][ProcessFinalBlock             ][Epoch 2599] [REWARD]Got no reward this ds epoch

[INFO][ 6798][19-01-05T00:26:24.646][SetState                      ][Epoch 2600] Node State is now POW_SUBMISSION at epoch 2600
[INFO][ 6797][19-01-05T00:30:41.478][StartFirstTxEpoch             ][Epoch 2600] I am backup member of the sharded committee
[INFO][ 6631][19-01-05T06:16:39.105][ProcessFinalBlock             ][Epoch 2699] [REWARD] Got 2777263428336 as reward

[INFO][ 6756][19-01-06T11:50:31.332][SetState                      ][Epoch 3600] Node State is now POW_SUBMISSION at epoch 3600
[INFO][ 6773][19-01-06T11:54:58.818][StartFirstTxEpoch             ][Epoch 3600] I am backup member of the sharded committee
[INFO][ 6614][19-01-06T13:53:27.661][ProcessFinalBlock             ][Epoch 3699] [REWARD]Got no reward this ds epoch

$

2 Likes

Really handy, nice script!