Skip to content

Commit e8c0f38

Browse files
Merge pull request 'Fix exception handling in daily data retrieval' (#71) from 20230313-dailydata into main
2 parents 4cfec1f + 5f7f7f3 commit e8c0f38

File tree

13 files changed

+98
-93
lines changed

13 files changed

+98
-93
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ title: NODEYEZ Change Log
3838
- Improved Mock data for testing renderings
3939
- Added watermarks to renders
4040
- Updated the markdown and jekyll themes for website, now available at https://nodeyez.com
41+
- Slushpool renamed to Braiins pool
4142

4243
**Bugfixes**
4344

4445
- Fixed Blockhash Dungeon seeder and perpetual growth bug
4546
- Fixed floortiles bug in Blockhash Dungeon
47+
- Daily Data Retrieval has url corrections for Braiins pool
4648

4749
## 1.0.0
4850

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Scripts can be run on their own, or run continuously in the background as a serv
1414

1515
A few sample images that you can produce on your node using Nodeyez are shown below
1616

17-
<img src="./images/arthashdungeon.png" width=196 /><img src="./images/channelbalance.png" width=196 /><img src="./images/difficultyepoch.png" width=196 /><img src="./images/fearandgreed.png" width=196 /><img src="./images/fiatprice.png" width=196 /><img src="./images/mempoolblocks.png" width=196 /><img src="./images/minerbraiins.png" width=196 /><img src="./images/satsperusd.png" width=196 /><img src="./images/slushpool.png" width=196 /><img src="./images/sysinfo.png" width=196 /><img src="./images/whirlpoolclimix.png" width=196 /><img src="./images/whirlpoolliquidity.png" width=196 />
17+
<img src="./images/arthashdungeon.png" width=196 /><img src="./images/channelbalance.png" width=196 /><img src="./images/difficultyepoch.png" width=196 /><img src="./images/fearandgreed.png" width=196 /><img src="./images/fiatprice.png" width=196 /><img src="./images/mempoolblocks.png" width=196 /><img src="./images/minerbraiins.png" width=196 /><img src="./images/satsperusd.png" width=196 /><img src="./images/braiinspool.png" width=196 /><img src="./images/sysinfo.png" width=196 /><img src="./images/whirlpoolclimix.png" width=196 /><img src="./images/whirlpoolliquidity.png" width=196 />
1818

1919
## Informational Panels
2020

@@ -52,7 +52,7 @@ These panels can be configured to report on local LND based nodes, as well as re
5252
* [Luxor Pool](./_docs/script-luxor-mining-hashrate.md)
5353
* [Miner - Braiins](./_docs/script-minerbraiins.md)
5454
* [Miner - MicroBT](./_docs/script-minermicrobt.md)
55-
* [Braiins Pool](./_docs/script-slushpool.md)
55+
* [Braiins Pool](./_docs/script-braiinspool.md)
5656

5757
## Other Fun Panels
5858

_docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
name: Documentation Index
3+
title: NODEYEZ Panels
34
layout: default
45
groups:
56
- Informational Panels
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Braiins Pool
44
title: Braiins Pool Script
55
layout: default
66
description: Creates a graph of earnings over the past 30 days of participation in Braiins pool
7-
imageurl: ../images/slushpool.png
7+
imageurl: ../images/braiinspool.png
88
---
99

1010
# Braiins Mining Pool
@@ -14,7 +14,7 @@ mining pool account. To use it, you'll want to add a profile for monitoring
1414
with read access. You can do that on the [Access Profiles page](https://pool.braiins.com/settings/access/).
1515
The Limited read-only permission is sufficient for the API calls made.
1616

17-
![sample image of slushpool](../images/slushpool.png)
17+
![sample image of braiins pool](../images/braiinspool.png)
1818

1919
The pricing and profitability estimates are based on a steady load with no
2020
variance in hashrate and does not take into account change in market price
@@ -24,27 +24,27 @@ from this panel in future updates.
2424
## Script Location
2525

2626
This script is installed at
27-
[/home/nodeyez/nodeyez/scripts/slushpool.py](../scripts/slushpool.py)
27+
[/home/nodeyez/nodeyez/scripts/braiinspool.py](../scripts/braiinspool.py)
2828

2929
## Configuration
3030

3131
To configure this script override the default configuration as follows
3232

3333
```shell
34-
nano /home/nodeyez/nodeyez/config/slushpool.json
34+
nano /home/nodeyez/nodeyez/config/braiinspool.json
3535
```
3636

3737
You must set the authtoken field with your API access token
3838

3939
| field name | description |
4040
| --- | --- |
41-
| outputFile | The path to save the generated image. Default `/home/nodeyez/nodeyez/imageoutput/slushpool.png` |
41+
| outputFile | The path to save the generated image. Default `/home/nodeyez/nodeyez/imageoutput/braiinspool.png` |
4242
| colorTextFG | The color of the text expressed as a Hexadecimal color specifier. Default `#ffffff` |
4343
| colorBackground | The background color of the image expressed as a hexadecimal color specifier. Default `#000000` |
4444
| width | The width, in pixels, to generate the image. Default `480` |
4545
| height | The height, in pixels, to generate the image. Default `320` |
4646
| sleepInterval | The amount of time, in seconds, the script should wait before data gathering and image creation again. Default `600` |
47-
| authtoken | Create your API access token at https://slushpool.com/settings/access/ with limited read-only access, and not web access |
47+
| authtoken | Create your API access token at https://pool.braiins.com/settings/access/ with limited read-only access, and not web access |
4848
| useTor | Indicates whether remote calls should use torify for privacy. Experimental. Default `true` |
4949
| priceurl | The url that provides the pricing information from bisq marketplace. Default `https://bisq.markets/bisq/api/markets/ticker` |
5050
| priceCheckInterval | The amount of time, in seconds, the script should wait before checking the price again to use for profitability. 10800 is 3 hours. Default `10800` |
@@ -69,7 +69,7 @@ After making changes, Save (CTRL+O) and Exit (CTRL+X) nano.
6969

7070
```shell
7171
cd /home/nodeyez/nodeyez/scripts
72-
/usr/bin/env python3 slushpool.py
72+
/usr/bin/env python3 braiinspool.py
7373
```
7474

7575
Press CTRL+C to stop the process
@@ -79,8 +79,8 @@ Press CTRL+C to stop the process
7979
To enable the script to run at startup, as the privileged user run the following
8080

8181
```shell
82-
sudo systemctl enable nodeyez-slushpool.service
83-
sudo systemctl start nodeyez-slushpool.service
82+
sudo systemctl enable nodeyez-braiinspool.service
83+
sudo systemctl start nodeyez-braiinspool.service
8484
```
8585

8686
---

_install_steps/5panels.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
name: Panel Index
3+
title: NODEYEZ Panels
34
layout: default
45
groups:
56
- Informational Panels

_install_steps/8runatstartup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ sudo systemctl enable nodeyez-arthash.service
2424
sudo systemctl enable nodeyez-arthashdungeon.service
2525
sudo systemctl enable nodeyez-blockheight.service
2626
sudo systemctl enable nodeyez-blockstats.service
27+
sudo systemctl enable nodeyez-braiinspool.service
2728
sudo systemctl enable nodeyez-channelbalance.service
2829
sudo systemctl enable nodeyez-channelfees.service
2930
sudo systemctl enable nodeyez-daily-data-retrieval.service
@@ -44,7 +45,6 @@ sudo systemctl enable nodeyez-ordinals.service
4445
sudo systemctl enable nodeyez-rofstatus.service
4546
sudo systemctl enable nodeyez-satsperusd.service
4647
sudo systemctl enable nodeyez-slideshow.service
47-
sudo systemctl enable nodeyez-slushpool.service
4848
sudo systemctl enable nodeyez-sysinfo.service
4949
sudo systemctl enable nodeyez-utcclock.service
5050
sudo systemctl enable nodeyez-whirlpoolclimix.service
@@ -60,6 +60,7 @@ sudo systemctl start nodeyez-arthash.service
6060
sudo systemctl start nodeyez-arthashdungeon.service
6161
sudo systemctl start nodeyez-blockheight.service
6262
sudo systemctl start nodeyez-blockstats.service
63+
sudo systemctl start nodeyez-braiinspool.service
6364
sudo systemctl start nodeyez-channelbalance.service
6465
sudo systemctl start nodeyez-channelfees.service
6566
sudo systemctl start nodeyez-daily-data-retrieval.service
@@ -80,7 +81,6 @@ sudo systemctl start nodeyez-ordinals.service
8081
sudo systemctl start nodeyez-rofstatus.service
8182
sudo systemctl start nodeyez-satsperusd.service
8283
sudo systemctl start nodeyez-slideshow.service
83-
sudo systemctl start nodeyez-slushpool.service
8484
sudo systemctl start nodeyez-sysinfo.service
8585
sudo systemctl start nodeyez-utcclock.service
8686
sudo systemctl start nodeyez-whirlpoolclimix.service
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"authtoken.comment": "Create your API access token at https://slushpool.com/settings/access/ with limited read-only access, and not web access",
2+
"authtoken.comment": "Create your API access token at https://pool.braiins.com/settings/access/ with limited read-only access, and not web access",
33
"authtoken.type": "string",
44
"authtoken": "--put-your-auth-token-here--",
55
"outputFile.comment": "The path to save the generated image",
66
"outputFile.type": "string",
7-
"outputFile": "/home/nodeyez/nodeyez/imageoutput/slushpool.png",
7+
"outputFile": "/home/nodeyez/nodeyez/imageoutput/braiinspool.png",
88
"useTor.comment": "Indicates whether remote calls should use torify for privacy. Experimental",
99
"useTor.type": "boolean",
1010
"useTor": true,
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def createimage(accountrewards, accountprofile, poolstats, price_last, width=480
5757
im = Image.new(mode="RGB", size=(width, height), color=colorBackground)
5858
draw = ImageDraw.Draw(im)
5959
# Header
60-
vicarioustext.drawcenteredtext(draw, "SlushPool Mining Summary", 24, int(width/2), int(headerheight/2), colorHeader, True)
60+
vicarioustext.drawcenteredtext(draw, "Braiins Pool Mining Summary", 24, int(width/2), int(headerheight/2), colorHeader, True)
6161
# Hashrate
6262
hashrate = getaccounthashrate(accountprofile)
6363
vicarioustext.drawcenteredtext(draw, "Hashrate", 16, (width/4*1), (headerheight + (hashheight/2) - 24), colorTextFG)
@@ -133,7 +133,7 @@ def createimage(accountrewards, accountprofile, poolstats, price_last, width=480
133133
maoldy = -1
134134
for reward in accountrewards["btc"]["daily_rewards"]:
135135
days = days + 1
136-
# skip the first day entry, something not right, and it doesnt show on slushpool.com
136+
# skip the first day entry, something not right, and it doesnt show on pool.braiins.com
137137
if days < (daystoskip + 1):
138138
continue
139139
if days > totaldays + 1:
@@ -199,9 +199,9 @@ def createimage(accountrewards, accountprofile, poolstats, price_last, width=480
199199

200200
if __name__ == '__main__':
201201
# Defaults
202-
configFile = "/home/nodeyez/nodeyez/config/slushpool.json"
203-
outputFile = "/home/nodeyez/nodeyez/imageoutput/slushpool.png"
204-
authtoken = "--put-your-auth-token-in-nodeyez/config/slushpool.json--"
202+
configFile = "/home/nodeyez/nodeyez/config/braiinspool.json"
203+
outputFile = "/home/nodeyez/nodeyez/imageoutput/braiinspool.png"
204+
authtoken = "--put-your-auth-token-in-nodeyez/config/braiinspool.json--"
205205
useTor=True
206206
priceUrl = "https://bisq.markets/bisq/api/markets/ticker"
207207
priceCheckInterval = 10800 # controls how often (in seconds), the market price is checked. 10800 is once every 3 hours
@@ -211,9 +211,9 @@ def createimage(accountrewards, accountprofile, poolstats, price_last, width=480
211211
height=320
212212
sleepInterval = 600 # controls how often this display panel is updated. 600 is once every 10 minutes
213213
colorHeader=ImageColor.getrgb("#ffffff") # The header text color. Need to pass to also specify bolding
214-
colorMiningReward=ImageColor.getrgb("#6b50ff") # Slushpool mining rewards color
215-
colorBOSReward=ImageColor.getrgb("#fb82a8") # Slushpool BOS rewards color
216-
colorReferralReward=ImageColor.getrgb("#00bac5") # Slushpool referral rewards color
214+
colorMiningReward=ImageColor.getrgb("#6b50ff") # Braiins pool mining rewards color
215+
colorBOSReward=ImageColor.getrgb("#fb82a8") # Braiins pool BOS rewards color
216+
colorReferralReward=ImageColor.getrgb("#00bac5") # Braiins pool referral rewards color
217217
colorGraphLineLight=ImageColor.getrgb("#a0a0a0") # Chart border left and bottom
218218
colorGraphLineDark=ImageColor.getrgb("#606060") # Chart border top and right
219219
colorMovingAverage=ImageColor.getrgb("#d69f06") # The moving average line
@@ -237,8 +237,8 @@ def createimage(accountrewards, accountprofile, poolstats, price_last, width=480
237237
if exists(configFile):
238238
with open(configFile) as f:
239239
config = json.load(f)
240-
if "slushpool" in config:
241-
config = config["slushpool"]
240+
if "braiinspool" in config:
241+
config = config["braiinspool"]
242242
if "authtoken" in config:
243243
authtoken = config["authtoken"]
244244
else:
@@ -291,7 +291,7 @@ def createimage(accountrewards, accountprofile, poolstats, price_last, width=480
291291
# Check for single run
292292
if len(sys.argv) > 1:
293293
if sys.argv[1] in ['-h','--help']:
294-
print(f"Creates a summary image of Slushpool account with the current hashrate, and the")
294+
print(f"Creates a summary image of Braiins pool account with the current hashrate, and the")
295295
print(f"account earnings depicted for yesterday and today, and a graph of past 30 days")
296296
print(f"Usage:")
297297
print(f"1) Call without arguments to run continuously using the configuration or defaults")
@@ -303,11 +303,11 @@ def createimage(accountrewards, accountprofile, poolstats, price_last, width=480
303303
# Loop
304304
while True:
305305
print("Getting account profile and rewards")
306-
accountprofile = vicariousnetwork.getslushpoolaccountprofile(True, authtoken)
306+
accountprofile = vicariousnetwork.getbraiinspoolaccountprofile(True, authtoken)
307307
time.sleep(6)
308-
accountrewards = vicariousnetwork.getslushpoolaccountrewards(True, authtoken)
308+
accountrewards = vicariousnetwork.getbraiinspoolaccountrewards(True, authtoken)
309309
time.sleep(6)
310-
poolstats = vicariousnetwork.getslushpoolstats(True, authtoken)
310+
poolstats = vicariousnetwork.getbraiinspoolstats(True, authtoken)
311311
if price_countdown <= 0:
312312
print("Getting updated prices")
313313
price_last, price_high, price_low = vicariousnetwork.getpriceinfo(True, priceUrl, price_last, price_high, price_low)

0 commit comments

Comments
 (0)