Skip to content
Permalink
Browse files

NiceHash configuration document

  • Loading branch information...
bmhjyu authored and SwimmingTiger committed Apr 3, 2019
1 parent cdbdc94 commit bff20f340b46be9075b5bef5e292d66130913d00
Showing with 37 additions and 0 deletions.
  1. +37 −0 docs/NiceHash-Configurations.md
@@ -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

0 comments on commit bff20f3

Please sign in to comment.
You can’t perform that action at this time.