forked from pk910/PoWFaucet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
faucet-config.example.yaml
288 lines (205 loc) · 9.92 KB
/
faucet-config.example.yaml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# PoWFaucet config (example)
### General Settings
# Path to faucet db file (defaults to faucet-store.json)
faucetStore: "faucet-store.json"
# logfile for faucet events (comment out for no logging)
faucetLogFile: "faucet-events.log"
# path to file to write the process pid to (comment out to disable)
#faucetPidFile: "faucet-pid.txt"
# faucet http/ws server port
serverPort: 8080
# title of the faucet
faucetTitle: "Goerli PoW Faucet"
# url to image displayed on the startpage
faucetImage: "/images/fauceth_420.jpg"
# symbol (short name) of the coin that can be mined
faucetCoinSymbol: "GöETH"
# some additional html to show on the startpage
faucetHomeHtml: |
<div class='pow-info'>
<h5>What is a PoW Faucet?</h5>
This is a Ethereum Faucet running on the Goerli Testnet.<br>
To prevent malicious actors from exhausting all available funds or
accumulating enough Ether to mount long running spam attacks,
this faucet requires some mining work to be done in exchange for
free testnet funds.
</div>
<div class='pow-info'>
<h5>How does this work?</h5>
Just enter your ETH Address and start mining.
When you've collected enough ETH, stop mining and claim your rewards.
</div>
<div class='pow-info'>
<h5>How to help the faucet?</h5>
Replenish the faucet by sending funds you don't need anymore to:<br>
0x6Cc9397c3B38739daCbfaA68EaD5F5D77Ba5F455
</div>
# random secret string that is used by the faucet to "sign" session data, so sessions can be restored automatically by clients when faucet is restarted / crashed
# use a random string and do not share / reuse it anywhere. Everyone knowing this secret is theoretically able to claim rewards from the faucet without mining.
faucetSecret: "RandomStringThatShouldBeVerySecret!"
# ETH execution layer RPC host
ethRpcHost: "http://127.0.0.1:8545/"
# faucet wallet private key (hex, without 0x prefix)
ethWalletKey: "feedbeef12340000feedbeef12340000feedbeef12340000feedbeef12340000"
# EVM chain id
ethChainId: 5
# transaction gas limit
# use 21000 to prevent transactions to contracts
ethTxGasLimit: 21000
# max transaction gas fee (in wei)
ethTxMaxFee: 10000000000 # 10 gwei
# max transaction priority fee (in wei)
ethTxPrioFee: 2000000000 # 2 gwei
# max number of unconfirmed transactions to create simultaneously
ethMaxPending: 12
# queue transactions and wait for funding when faucet is out of funds (show "No Funds" error when false)
ethQueueNoFunds: false
# link to eth transaction explorer with {txid} as placeholder for transaction id or null for no link
ethTxExplorerLink: "https://goerli.etherscan.io/tx/{txid}"
### Mining & Verification Options
# reward amount per egliable hash (in wei)
powShareReward: 12500000000000000 # 0.0125
# minimum balance to payout (in wei)
claimMinAmount: 100000000000000000 # 0.1 ETH
# maximum balance to payout (in wei)
claimMaxAmount: 17000000000000000000 # 17 ETH
# penalty for not responding to a verification request (in wei)
# shouldn't be lower than powShareReward, but not too high as this can happen regularily in case of connection loss or so
verifyMinerMissPenalty: 5000000000000000 # 0.005 ETH
# reward for responding to a verification request in time (in wei)
# some extra reward for slow miners - should be much lower than powShareReward
# comment out to disable rewards for verification requests
verifyMinerReward: 3125000000000000 # 0.003125 ETH (1/4th of powShareReward)
# maximum mining session time (in seconds)
powSessionTimeout: 10800 # 3h
# how long sessions can be payed out (in seconds)
# should be higher than powSessionTimeout
claimSessionTimeout: 18000 # 5h
# number of seconds to wait before allow to reuse the same address to start another mining session
claimAddrCooldown: 7200 # 2h
# check balance and deny mining if balance exceeds the limit (in wei)
claimAddrMaxBalance: 100000000000000000000 # 100 ETH
# check and prevent mining if target address is a contract
claimAddrDenyContract: true
# number of concurrent mining sessions allowed per IP (0 = unlimited)
concurrentSessions: 1
# websocket ping interval
#powPingInterval: 10
# kill websocket if no ping/pong for that number of seconds
#powPingTimeout: 30
# scrypt mining parameters
powScryptParams:
# N - iterations count: affects memory and CPU usage, must be a power of 2
cpuAndMemory: 4096
# r - block size: affects memory and CPU usage
blockSize: 8
# p - parallelism factor: threads to run in parallel, affects the memory & CPU usage, should be 1 as webworker is single threaded
paralellization: 1
# klen - how many bytes to generate as output, e.g. 16 bytes (128 bits)
keyLength: 16
# number of 0-bits the scrypt hash needs to start with to be egliable for a reward
difficulty: 11
# number of scrypt hashs to pack into a share (should be 1, higher value just increases verification load on server side)
#powNonceCount: 1
# Proof of Work shares need to be verified to prevent malicious users from just sending in random numbers.
# As that can lead to a huge verification work load on the server, this faucet can redistribute shares back to other miners for verification.
# These randomly selected miners need to check the share and return its validity to the server within 10 seconds or they're penalized.
# If theres a missmatch in validity-result the share is checked again locally and miners returning a bad verification result are slashed.
# Bad shares always result in a slashing (termination of session and loss of all collected mining balance)
# percentage of shares validated locally (0 - 100)
verifyLocalPercent: 10
# max number of shares in local validation queue
verifyLocalMaxQueue: 100
# min number of mining sessions for verification redistribution
# only local verification if not enough active sessions (should be higher than verifyMinerIndividuals)
verifyMinerPeerCount: 4
# percentage of shares validated locally if there are not enough sessions for verification redistribution (0 - 100)
verifyLocalLowPeerPercent: 80
# percentage of shares to redistribute to miners for verification (0 - 100)
verifyMinerPercent: 80
# number of other mining sessions to redistribute a share to for verification
verifyMinerIndividuals: 2
# max number of pending verifications per miner before not sending any more verification requests
verifyMinerMaxPending: 5
# max number of missed verifications before not sending any more verification requests
verifyMinerMaxMissed: 10
# timeout for verification requests
# client gets penalized if not responding within this timespan
verifyMinerTimeout: 30
### Captcha Options
# comment out to disable all hcaptchas
captchas:
# captcha provider:
# hcaptcha: HCaptcha (https://hcaptcha.com)
# recaptcha: ReCAPTCHA (https://developers.google.com/recaptcha)
provider: "hcaptcha"
# captcha site key
siteKey: "00000000-0000-0000-0000-000000000000"
# captcha secret key
secret: "0xCensoredHCaptchaSecretKey"
# require captcha to start a new mining session (default: false)
checkSessionStart: true
# require captcha to claim mining rewards (default: false)
checkBalanceClaim: true
### IP-based Restrictions
# ip info lookup api url (default: http://ip-api.com/json/{ip}?fields=21155839)
#ipInfoApi: "http://ip-api.com/json/{ip}?fields=21155839"
# ip info based restrictions
ipRestrictedRewardShare:
# percentage of reward per share if IP is in a hosting range (default: 100)
#hosting: 100
# percentage of reward per share if IP is in a proxy range (default: 100)
#proxy: 100
# percentage of reward per share if IP is from given country code (DE/US/...)
#US: 100
# ip info pattern based restrictions
#ipInfoMatchRestrictedReward:
#"^.*Tencent Cloud.*$": 1
### Fund Management
# minimum balance to keep in the faucet wallet (in wei)
spareFundsAmount: 10000000000000000 # 0.01 ETH
# minimum balance to show the low funds warning
lowFundsBalance: 50000000000000000000 # 50 ETH
# low faucet balance warning message / false to disable the warning
lowFundsWarning: "The faucet is running out of funds! Faucet Balance: {1}"
# empty faucet error message / false to disable the error
noFundsError: "Sorry, the faucet is out of funds :("
# reward restriction based on faucet wallet balance. lowest value applies
faucetBalanceRestrictedReward:
100: 50 # 50% if lower than 100 ETH
### Automatic wallet refill
# refill contract options
# advanced configuration to limit the amount of funds that can be mined on the faucet via a separate vault contract
# the faucet tries to refill its wallet balance from the vault contract when it gets empty
# see contract code in docs folder
ethRefillContract:
#contract: "0xA5058fbcD09425e922E3E9e78D569aB84EdB88Eb"
#abi: '[{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getAllowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]'
#allowanceFn: "getAllowance"
#withdrawFn: "withdraw"
#withdrawGasLimit: 200000
#checkContractBalance: true
#contractDustBalance: 1000000000000000000 # 1 ETH
#triggerBalance: 4500000000000000000000 # 4500 ETH
#cooldownTime: 3600
#requestAmount: 500000000000000000000 # 500 ETH
### ENS Resolver
# comment out to disable ENS names
ensResolver:
# RPC Host for ENS name resolver (mainnet)
rpcHost: "https://main-light.eth.linkpool.io/"
# Custom ENS Resolver contract address
#ensAddr: "0x"
### Other Settings
# print faucet stats to log interval (10min default)
#faucetLogStatsInterval: 600
# faucet stats config (comment out to disable stats)
faucetStats:
# faucet stats file
logfile: "faucet-stats.log"
# build SEO optimized index.seo.html and deliver as index page
# the blank loader page just looks bad when parsed by search engines
buildSeoIndex: true
# some additional meta tags to add to the SEO optimized page
buildSeoMeta:
keywords: "powfaucet,faucet,ethereum,ethereum faucet,evm,eth,pow"