-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsimplepool-payout.service
More file actions
47 lines (44 loc) · 1.71 KB
/
Copy pathsimplepool-payout.service
File metadata and controls
47 lines (44 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[Unit]
Description=simplepool Thunder payout worker
Documentation=https://github.com/rsantacroce/simplepool
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=@USER@
Group=@USER@
WorkingDirectory=@ROOT@/payout
# All required env vars must be set here — the worker exits if any is
# missing. THUNDER_FROM_ADDRESS must equal pool_thunder_reserve_address
# in proxy.conf so payouts drain from the same Thunder wallet the
# coinbase is depositing into.
Environment=PAYOUT_DB_PATH=@ROOT@/data/shares.db
Environment=THUNDER_RPC_URL=http://127.0.0.1:6009
# Environment=THUNDER_FROM_ADDRESS=<paste from proxy.conf>
Environment=PAYOUT_MIN_SATS=10000
# Payout runs are a daily batch: once every 24h everyone over
# PAYOUT_MIN_SATS goes out in a single Thunder transaction.
Environment=PAYOUT_INTERVAL_MS=86400000
# ...but a batch already broadcast is re-checked on its own, much shorter
# clock. Nobody in a batch is credited until a tick sees it confirmed in a
# Thunder block, so this must NOT follow the daily cadence.
Environment=PAYOUT_SETTLE_INTERVAL_MS=30000
# And a tick that tried and got nowhere (transfer failed, or the reserve
# could not cover what is owed) comes back on this one rather than tomorrow.
Environment=PAYOUT_RETRY_INTERVAL_MS=300000
# Admin HTTP surface — used by the dashboard's "Trigger payout now"
# button. Loopback-only. Set port=0 to disable.
Environment=PAYOUT_ADMIN_BIND=127.0.0.1
Environment=PAYOUT_ADMIN_PORT=9080
ExecStart=/usr/bin/node @ROOT@/payout/index.js
Restart=on-failure
RestartSec=5
StandardOutput=journal
StandardError=journal
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ProtectHome=read-only
ReadWritePaths=@ROOT@/data
[Install]
WantedBy=multi-user.target