Earnings calculator (Update 2022-01-13: v11.0.0 - Detailed earnings info and health status of your node, including vetting progress)

I have no experience with QNAP, but on Synology Python 3 is just available on the package center. I figured it would be the same on QNAP.

I’ve dropped testing on python 2 as it’s bee deprecated and no longer updated. I don’t see any reason why it won’t keep working, but no promises.

It’s been over a year now since it has been sunsetted. It’s time to make the switch. https://www.python.org/doc/sunset-python-2/

Hi all, nice update today with a new fresh layout that takes care of some of the clutter that was introduced when more scores where added for DQ, Suspension and Uptime. These now get their own columns and logical grouping.
Thanks @SGC for pointing me to the clutter and helping brain storm some ideas to make it better!

Note: To align with the other scores, the uptime score has been switched for a downtime percentage. For all shown scores 0% is now perfect. You will see warnings on the status line if any of these scores get too high.

Changelog

v9.5.0 - Cleaned up layout

  • Moved more to a single line layout to improve readability
  • Created column groups with descriptive headers
  • Uptime changed to down time to align with 0% = perfect, like the other scores
8 Likes

Just sent you a tip through brave on your github page!

Great update!

1 Like

Hi,
the script works well, I just have a small cosmetic “issue”
I don’t get the solid lines like in the example, but I get the typical indications of a “bad ascii translation”

like:
O:>python earnings.py o:
e[4mFebruary 2021 (Version: 9.5.0) [snapshot: 2021-02-18 17:49:30Z]e[0m

e[4m
Payout and held amount by satellite:e[0m

I tried switching console fonts, but no change.

how can I fix that?

(setup = Windows 10, the administrative codepage is set to UTF-8)
and in the CMD window, checking the codepage:
O:>chcp
Active code page: 65001

so that should be ok, no?

Please, try in PowerShell instead.

1 Like

I’m really happy to be able to share this update with you all. It took quite a bit of work to get this all added, but here it is. The earnings calculator was always meant to be used as a way to verify that payout is done correctly as well as to provide insights that aren’t exposed by official tools. This milestone version v10.0.0 expands significantly on both!
With the current postponed payouts due to high transaction costs it has become really important to show which payouts have been postponed and how much you have collected over time. This information has now been added. While working on this I decided to add a lot more. The earnings calculator always showed expected earnings based on the nodes own book keeping. I’ve now added the payout information reported back from satellites, which made it possible to calculate and display the difference between expected payout and actual payout. The payout overview now includes detailed information about all payouts, both paid out and postponed. As well as totals. For reference there is now also a link to the transaction on etherscan if the payout has taken place.

Please note that because stefan-benten was shut down before satellites started reporting back paid out amounts, it looks like all payouts for that satellite were postponed. This only impacts reports from months prior to 2020-10 and a warning has been included when looking at the effected months.

This update required significant code changes and despite thorough testing it’s always possible that something slipped through the cracks. Please let me know if you encounter any issues!

Changelog

v10.0.0 - Detailed payout information

  • Requires storagenode version v1.22.2 or higher
  • Added amounts of actual payouts
  • Added difference between calculated payout and actual payout (helps to identify possible payout issues)
  • Added postponed payout information
  • Added transaction link
  • Several tweaks and additional information related to the above
10 Likes

Hey, what am I doing wrong?
image
With the old version it worked :confused:

//EDIT: Tried it with PowerShell also.

Whoops, I should have mentioned, this version is for v1.22.2 and up. Please update your node first!

3 Likes

that indeed is better, thanks

You can also use the new windows terminal which supports cmd, powershell, wsl and more!
Windows terminal will also make the transaction links clickable with ctrl+click!

ah yes, I didn’t think of that one, even better

Just a small update today to support zkSync transaction links for those who switched payouts to zkSync. It will now link to the appropriate zkscan.io url for the transaction. The warning about stefan-benten misreporting payouts as postponed has been removed as the storagenode update to v1.24.4 will correct the nodes database. Unlike the previous update this one doesn’t require you to have updated to v1.24.4, but if you haven’t yet payouts for stefan-benten are still misreported (now without warning). The node update will fix that.

Changelog

v10.1.0 - zkSync transaction link support

  • Added support for displaying zkSync transaction links
  • Removed warning about stefan-benten payouts being reported as “postponed” as storagenode update v1.24.4 will correct the misreporting
  • Added shebang so the script can be run without explicitly calling python3 on supported systems
5 Likes

I think I’m missing something.
When I run this I see the payout dollar amounts, but not the vetting or other satellite stats like in the screenshots you’ve shared. (Win10 GUI)

@YoloSwag

Are you are referring to the audit score (1000) numbers? It looks as though that has been removed, and only would show up in the earlier versions.

If you can post a screen / text capture of what you are seeing, it would help to explain what is there / not there.

Please run the script without the month parameter to see that information

2 Likes

Thanks, that worked!

The reason is that when you enter a month the script assumes you’re looking at historic information. Since the node doesn’t keep any history of reputation information, this isn’t displayed when looking at the history. I might tweak this slightly so it does still show when you specify the current month as it would still apply then. But for now running without the month specified should be just fine.

Small fix to take into account the amount paid out in the month you are looking at. This “bug” caused postponed payout to be included in both “PAID PREVIOUS MONTHS” and “POSTPONED PAYOUT PREVIOUS MONTHS”. It now correctly only displays as paid.

Changelog

v10.1.1 - Fix payout previous month

  • Payout previous month didn’t take into account what was paid out in the month you are looking at; this has been corrected
2 Likes

I had a bit of downtime recently and was again using the earnings.py, and found some minor issues, that forced me to change the code ever so slightly to get the information i needed.

this node isn’t vetted on one satellite, and since one of the recommended ways to check if a node is vetted and that it takes 30 days for downtime to drop, then when one has downtimes the % vetted information gets dropped from the print out.

oh wait works fine that way… thought this was both ways but apparently it’s only when the node is already vetted and downtime is above 2%

looks like this with current code, and latest version of earnings.py

and if i change the allowed downtime before the warning to 10% then i can see that the node is infact vetted to that particular satellite.

talking about us2 in case there was any doubt…

i know that one essentially could figure this out, because it will only show the warning without the % vetted information, if it has already finished vetting on the satellite in question.
this however requires previous knowledge about how earnings.py works.

thus i suggest changing , so that the vetting OK status be added …
i guess adding an OK status to a warning is kinda a bad idea…
maybe just keep vetted % after the warnings, even if at 100%

also seems to affect all the warnings from what i can see in the code… but don’t really know python… so, its a bit of an assumption.

i duno what the best solution is for the problem, but i figured you wanted me to point out the issue.

might be useful for other new people which won’t have prior knowledge and will be vetting nodes… so i figured a modification of earnings.py made sense.
and it takes an aweful long time for downtime to go away ofc… so its not like its a fleeting issue.