Earnings calculator (Update 2024-04-14: v13.4.0 - Additional info on uncollected garbage and unpaid data - Detailed earnings info and health status of your node, including vetting progress)

Can you add a third line showing the amount of data stored/audited/downloaded per satellite?
Something like this:

┌────────────────────────────────┬─────────────┬──────────────────────────┬─────────────────────────────────────────────────────────────┐
│ SATELLITE                      │ HELD AMOUNT │        REPUTATION        │                       PAYOUT THIS MONTH                     │
│              Joined     Month  │      Total  │    Disq    Susp    Down  │    Storage      Egress  Repair/Aud        Held      Payout  │
├────────────────────────────────┼─────────────┼──────────────────────────┼─────────────────────────────────────────────────────────────┤
│ ap1.storj.io:7777 (OK)         │             │                          │  $  1.50/TBm $ 20.00/TB  $ 10.00/TB        0%        100%   │
│                                │             │                          │     1.44 TBm   0.016 TB    0.039 TB                         │        
│              2019-06-10    47  │   $   0.27  │   0.00%   0.00%   0.03%  │  $  2.1677   $  0.3134   $  0.3930  -$  0.0000   $  2.8740  │
├────────────────────────────────┼─────────────┼──────────────────────────┼─────────────────────────────────────────────────────────────┤

or something like this:

┌────────────────────────────────┬─────────────┬──────────────────────────┬──────────────────────────────────────────────────────┐
│ SATELLITE                      │ HELD AMOUNT │        REPUTATION        │                       PAYOUT THIS MONTH              │
│              Joined     Month  │      Total  │    Disq    Susp    Down  │                Rate         Used         Earned      │
├────────────────────────────────┴─────────────┴──────────────────────────┼────────────┬─────────────┬────────────┬──────────────┤
│ ap1.storj.io:7777 (OK)                                                  │ Storage    │$  1.5/TBm   │  1.44 TB   │  $ 2.1677    │
│                                                                         │ Egress     │$  20.00TB/m │  0.016 TB  │  $ 0.3134    │
│              2019-06-10    47      $   0.27      0.00%   0.00%   0.03%  │ Repaid/Aud │$  10.00/TB  │  0.039 TB  │  $ 0.3930    │
│                                                                         │ Held       │     0%      │            │ -$ 0.0000    │
│                                                                         │ Payout     │   100%      │            │  $ 2.8740    │
├────────────────────────────────┬─────────────┬──────────────────────────┼────────────┴─────────────┴────────────┴──────────────┤


I know I can see those values elsewhere, but having them in one place would be nice.

1 Like

In the end this tool is primarily built for me. And for my use case I have a requirement to keep the output compact. Therefor this will not be added to the tool by default. However, if you want to have this, you can add the following line after line 546 of the script.

    print(tableLine("","{}   {}   {}                        ".format(formatSize(bh[i] / hours_month), formatSize(get[i]), formatSize(get_repair[i]+get_audit[i]) )))

Please copy as is and make sure that the indentation aligns exactly.
In future versions I will include this line commented out, so you can just remove the # at the start to include it.

4 Likes

Could you make an option for it to not print as a table?

Small fix today for an issue introduced with the last version that broke correct display of vetting progress. Thanks @Th3Van for reporting the issue and testing the new version!

Changelog

v13.0.1 - Fix issue with vetting status

  • Fix wrong display of vetting status introduced in v13.0.0
5 Likes

Having this issue on last version, work’s fine if run with sudo, I’ve checked pricing.db permissions are the same as other db but I don’t see pricing.db-shm and pricing.db-wal

Traceback (most recent call last):
  File "earnings.py", line 307, in <module>
    con.execute('ATTACH DATABASE ? AS p;',tP)
sqlite3.OperationalError: attempt to write a readonly database

Small update to fix inconsistent methods in calculating end of month estimates. Also improves end of month estimate for storage as separated out at the bottom.

Thanks @Roberto for bringing it to my attention here: Update Proposal for Storage Node Operators - Open for Comments - #59 by Roberto

Changelog

v13.0.2 - Fix inconsistent end of month estimation

  • Fixes an inconsistency of how end of month payouts are calculated in the top and bottom overview
  • Improves accuracy of end of month estimated payout for storage
1 Like

Are all satellites still advertising $20 per TB egress? I thought this has been lowered on the testing sats :thinking: At least the script still says 20 :slight_smile:

Yes, the advertised payout rate from satellites hasn’t been updated yet. Pricing.db still lists old payout values. I’m still waiting for that to change to see the actual impact of my latest updates on production databases. They did mention it wouldn’t change before payouts for the previous month were finished, but those have been finished for a while now too.

Also, due to a bug mentioned here some storage values are now out of whack. I’m working on a workaround for that atm. Not that this is an issue with the calculator (rather it’s weird data in the node databases), but I’ve found a way to exclude that erroneous data from my calculations. Look for a new version for that soon.

2 Likes

As mentioned above, a small release to limit the impact of wrongly reported storage usage by satellites on displayed numbers for storage usage and end of month predictions.

Changelog

v13.0.3 - Work around erroneous storage usage reports

  • Implements workaround for erroneous storage usage reports by satellites to limit impact on storage usage and end of month estimate numbers
4 Likes

It took a while for satellites to report back the new payout rates. But this has now happened and the calculator works as expected. The top overview calculates the weighted average payout rate per type across satellites. And each individual satellite shows its own payout rate.

No further updates required, but let me know if you run into issues with this or anything is unclear.

3 Likes

Just a suggestion, wouldn’t it look cleaner if the satellite didn’t have its tail (.storj.io:777) shown.

image

1 Like

Perhaps it would at the moment. But there is no reason community satellites couldn’t use similar region names in the future. So I’d rather stick with the full names as they are listed in the nodes databases to avoid confusion.

2 Likes

Hi

I’m wondering if the new price for storage per TB-m changed to $ 1.49 (instead of 1.50) ?
That is the value configured in the pricing database.

sqlite> select hex(satellite_id), disk_space_price from pricing;
004AE89E970E703DF42BA4AB1416A3B30B7E1D8E14AA0E558F7EE26800000000|150
04489F5245DED48D2A8AC8FB5F5CD1C6A638F7C6E75EFD800EF2D72000000000|149
7B2DE9D72C2E935F1918C058CAAF8ED00F0581639008707317FF1BD000000000|149
84A74C2CD43C5BA76535E1F42F5DF7C287ED68D33522782F4AFABFDB40000000|149
A28B4F04E10BAE85D67F4C6CB82BF8D4C0F0F47A8EA72627524DEB6EC0000000|149
AF2C42003EFC826AB4361F73F9D890942146FE0EBE806786F8E7190800000000|149
F474535A19DB00DB4F8071A1BE6C2551F4DED6A6E38F0818C68C68D000000000|149

And that table is where the earnings script gets the value from.

┌────────────────────────────────┬─────────────┬──────────────────────────┬─────────────────────────────────────────────────────────────┐
│ SATELLITE                      │ HELD AMOUNT │        REPUTATION        │                       PAYOUT THIS MONTH                     │
│              Joined     Month  │      Total  │    Disq    Susp    Down  │    Storage      Egress  Repair/Aud        Held      Payout  │
├────────────────────────────────┼─────────────┼──────────────────────────┼─────────────────────────────────────────────────────────────┤
│ ap1.storj.io:7777 (OK)         │             │                          │  $  1.49/TBm $ 20.00/TB  $ 10.00/TB        0%        100%   │
...

See:

3 Likes

I meant to link that, but forgot. Thanks @Pac !

2 Likes

Two small fixes today. As many node operators have used the forget-satellite feature to forget the decommissioned test satellites in order to clean up data, a fix was needed to make old months still visible. This data cleanup includes the cleanup of some of the satellite info in the node databases including reputation info and satellite names. This resulted in the script throwing an error when looking back at months in which these satellites were still active. The fix now shows the satellites correctly, however join date and age in months are no longer available. And the satellite name will be displayed using a hardcoded fallback in the script (shown with an asterisk at the end). The zkSync bonus has also been adjusted to reflect the recent change.

v13.1.0 - Change zkSync bonus & fix forgotten satellites

  • zkSync bonus has been adjusted to 3% to match recent change. (Note this will apply to older months as well)
  • Worked around missing data for satellites which have been forgotten using the forget-satellite function so you can still view data from old months, using fallback names for satellites
3 Likes

In looking for information on storage space used vs payout, i came across this thread. I was able to run everything successfully, and it appears this script is lining up with the payout report from the dashboard. So i guess my question is, is it usual for there to be a large discrepancy between Total Disk Space used value on the main dashboard page, and the Disk Average Month storage on the payout menu.

My month ending disk usage according to the main page going from Dec to March were
Dec 12.31 TB, January 14.38 TB, February 14.97 TB, March 15.93 TB. These amounts were documented at the end of the day for the las day of each of those months.

My disk usage payout for each of those months were Dec 10.25 TB, Jan 12.06 TB, Feb 11.85 TB, and March 12.95 TB.

Is this large of a difference expected or should i be looking for some kind of issue here?

There can certainly be discrepancies: but you may be comparing different numbers. Like if you started a month storing 100GB… and ended it storing 150GB… you wouldn’t expect a payout for that peak 150. Instead… assuming your space grew smoothly from 100->150 over the month your average would be closer to 125GB: it’s that monthly TBm number you get paid for.

3 Likes

@Roxor is right, additionally the Total disk space number is locally calculated by the node and includes trash and data not yet moved to trash by garbage collection as well, while the Disk average month is only the paid space as calculated by the satellite.

1 Like

That all makes sense and i have generally treated it as being a month behind, as long as i have positive growth each month. It just seems weird that i ended January at 14.38 TB stored, have grown each month since, and 2 months later im barely being paid more than my December close out, and well below my January close out. But if thats to be expected then that’s cool. It just seemed like historically i would get disk usage payouts that were extremely close to the previous months final usage. Ie. i closed November ‘23 with 10.27 TB used and my December ‘23 payout was for 10.25 TB. That trend has been consistent for as far back as i can recall once i got past having funds held during my first 9 months.