Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cdbdc94
commit bff20f3
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
NiceHash Configurations | ||
======================= | ||
|
||
BTCPool supports automatic NiceHash configuration. It is implemented by populating the minimal difficulties in ZooKeeper from NiceHash API. Stratum server is able to read the value and update the minimal difficulties for NiceHash agents automatically. | ||
|
||
## Init NiceHash | ||
|
||
A utility to populate minimal difficulties in ZooKeeper is available at [initNiceHash](https://github.com/btccom/btcpool-go-modules/tree/master/initNiceHash). It can be run as a scheduled job or on demand when NiceHash changes the requirements. | ||
|
||
## Pool Configuration | ||
|
||
In sserver.cfg the following section can be inserted under sserver or chain specific configurations. | ||
|
||
``` | ||
nicehash = { | ||
# Set to true if you want to force minimal difficulty for whole sserver | ||
forced = false; | ||
# Fallback value when ZooKeeper is not available | ||
min_difficulty = "200"; | ||
# Read NiceHash minimal difficulty from this ZooKeeper node | ||
min_difficulty_zookeeper_path = "/nicehash/<algorithm>/min_difficulty" | ||
}; | ||
``` | ||
|
||
The configurations needs to be adjusted on per algorithm basis. | ||
|
||
* `forced` If this value is set to `false` (by default), sserver will try to detect NiceHash automatically by checking the user agent sent by client. If it is set to `true`, sserver considers all connections are from NiceHash. This is useful when the stratum protocol of a coin does not have user agent, e. g. BEAM. | ||
* `min_difficulty` This is the fallback minimal difficulty value in hex. It will be used when ZooKeeper is not available. | ||
* `min_difficulty_zookeeper_path` This is the ZooKeeper path sserver reads NiceHash minimal difficulty from. `<algorithm>` should be replaced by the proper values. If `initNiceHash` is used to populate ZooKeeper nodes, they shall be of the following values. | ||
* `sha256` for BTC/BCH/UBTC/SBTC | ||
* `daggerhashimoto` for ETH/ETC | ||
* `decred` for DCR | ||
* `beam` for BEAM | ||
* `grincuckaroo29` for Grin C29 | ||
* `grincuckatoo31` for Grin C31 |