2017-01-09 10:22:31 +05:00
# monero-stratum
2015-07-05 14:49:07 +05:00
2016-12-07 17:33:42 +05:00
High performance CryptoNote mining stratum with Web-interface written in Golang.
2015-07-05 14:49:07 +05:00
2017-10-08 19:28:35 +05:00
[![Go Report Card ](https://goreportcard.com/badge/github.com/sammy007/monero-stratum )](https://goreportcard.com/report/github.com/sammy007/monero-stratum)
2017-10-10 01:37:06 +05:00
[![CircleCI ](https://circleci.com/gh/sammy007/monero-stratum.svg?style=svg )](https://circleci.com/gh/sammy007/monero-stratum)
2017-10-08 19:28:35 +05:00
2015-07-05 14:49:07 +05:00
**Stratum feature list:**
2016-12-07 17:33:42 +05:00
* Be your own pool
* Rigs availability monitoring
* Keep track of accepts, rejects, blocks stats
* Easy detection of sick rigs
* Daemon failover list
2016-08-07 09:05:02 +05:00
* Concurrent shares processing
2016-12-07 17:33:42 +05:00
* Beautiful Web-interface
2015-07-05 14:49:07 +05:00
2017-01-09 10:22:31 +05:00
![](https://cdn.pbrd.co/images/jRU3qJj83.png)
2017-01-09 10:17:45 +05:00
2016-12-06 14:37:21 +05:00
## Installation
2015-07-05 14:49:07 +05:00
Dependencies:
2017-07-06 22:58:14 +05:00
* go >= 1.6
2016-12-07 17:33:42 +05:00
* Everything required to build Monero
2017-09-09 11:50:43 +05:00
* Monero >= **v0.11.0.0**
2015-07-05 14:49:07 +05:00
2016-12-06 14:37:21 +05:00
### Linux
2016-08-07 11:25:06 +05:00
2016-12-06 14:37:21 +05:00
Use Ubuntu 16.04 LTS.
2015-07-05 14:49:07 +05:00
2016-12-08 13:31:02 +05:00
Compile Monero source (with shared libraries option):
2015-07-05 14:49:07 +05:00
2017-07-06 22:58:14 +05:00
apt-get install git cmake build-essential libssl-dev pkg-config libboost-all-dev
2017-01-08 12:18:06 +05:00
git clone https://github.com/monero-project/monero.git
cd monero
2017-09-09 11:50:43 +05:00
git checkout tags/v0.11.0.0 -b v0.11.0.0
2016-12-06 14:54:33 +05:00
cmake -DBUILD_SHARED_LIBS=1 .
make
2015-07-05 14:49:07 +05:00
2017-06-23 08:56:24 +05:00
Install Golang and required packages:
2015-07-05 14:49:07 +05:00
2016-12-06 14:37:21 +05:00
sudo apt-get install golang
2015-07-05 14:49:07 +05:00
2017-06-23 08:56:24 +05:00
Clone stratum:
2015-07-05 14:49:07 +05:00
2017-06-23 08:56:24 +05:00
git clone https://github.com/sammy007/monero-stratum.git
cd monero-stratum
2015-07-05 14:49:07 +05:00
2016-08-07 11:25:06 +05:00
Build stratum:
2017-06-23 08:56:24 +05:00
MONERO_DIR=/path/to/monero cmake .
make
2016-08-07 11:25:06 +05:00
2017-06-23 08:56:24 +05:00
`MONERO_DIR=/path/to/monero` is optional, not needed if both `monero` and `monero-stratum` is in the same directory like `/opt/src/` . By default make will search for monero libraries in `../monero` . You can just run `cmake .` .
2015-07-05 14:49:07 +05:00
2017-06-23 08:56:24 +05:00
### Mac OS X
2016-08-07 11:25:06 +05:00
2016-12-06 14:37:21 +05:00
Compile Monero source:
2015-07-05 14:49:07 +05:00
2017-01-08 12:18:06 +05:00
git clone https://github.com/monero-project/monero.git
cd monero
2017-09-09 12:03:58 +05:00
git checkout tags/v0.11.0.0 -b v0.11.0.0
2016-12-06 00:21:58 +05:00
cmake .
2016-12-06 14:37:21 +05:00
make
2015-07-05 14:49:07 +05:00
2017-06-23 08:56:24 +05:00
Install Golang and required packages:
2015-07-05 14:49:07 +05:00
2017-06-23 08:56:24 +05:00
brew update & & brew install go
Clone stratum:
git clone https://github.com/sammy007/monero-stratum.git
cd monero-stratum
2015-07-05 14:49:07 +05:00
2016-08-07 07:30:11 +05:00
Build stratum:
2015-07-05 14:49:07 +05:00
2017-06-23 08:56:24 +05:00
MONERO_DIR=/path/to/monero cmake .
make
2015-07-05 14:49:07 +05:00
2016-12-06 14:37:21 +05:00
### Running Stratum
2016-08-07 09:05:02 +05:00
2017-09-09 22:24:42 +05:00
./build/bin/monero-stratum config.json
2016-08-07 09:05:02 +05:00
2016-12-07 16:56:15 +05:00
If you need to bind to privileged ports and don't want to run from `root` :
sudo apt-get install libcap2-bin
2017-09-09 22:24:42 +05:00
sudo setcap 'cap_net_bind_service=+ep' /path/to/monero-stratum
2016-12-07 16:56:15 +05:00
2016-12-06 14:37:21 +05:00
## Configuration
2015-07-05 14:49:07 +05:00
2016-12-06 00:21:58 +05:00
Configuration is self-describing, just copy *config.example.json* to *config.json* and run stratum with path to config file as 1st argument.
2016-08-07 09:05:02 +05:00
```javascript
{
2016-12-07 17:33:42 +05:00
// Address for block rewards
2017-09-09 12:03:58 +05:00
"address": "YOUR-ADDRESS-NOT-EXCHANGE",
2016-12-07 17:33:42 +05:00
// Don't validate address
"bypassAddressValidation": true,
// Don't validate shares
"bypassShareValidation": true,
"threads": 2,
"estimationWindow": "15m",
"luckWindow": "24h",
"largeLuckWindow": "72h",
// Interval to poll daemon for new jobs
"blockRefreshInterval": "1s",
"stratum": {
// Socket timeout
"timeout": "15m",
"listen": [
{
"host": "0.0.0.0",
"port": 1111,
"diff": 5000,
"maxConn": 32768
},
{
"host": "0.0.0.0",
"port": 3333,
"diff": 10000,
"maxConn": 32768
}
]
},
"frontend": {
"enabled": true,
"listen": "0.0.0.0:8082",
"login": "admin",
"password": "",
"hideIP": false
},
"upstreamCheckInterval": "5s",
"upstream": [
{
"name": "Main",
"host": "127.0.0.1",
"port": 18081,
"timeout": "10s"
2016-08-07 09:05:02 +05:00
}
2016-12-07 17:33:42 +05:00
]
2016-08-07 09:05:02 +05:00
}
```
2015-07-05 14:49:07 +05:00
2017-11-08 08:05:18 +05:00
You must use `anything.WorkerID` as username in your miner. Either disable address validation or use `<address>.WorkerID` as username. If there is no workerID specified your rig stats will be merged under `0` worker. If mining software contains dev fee rounds its stats will usually appear under `0` worker. This stratum acts like your own pool, the only exception is that you will get rewarded only after block found, shares only used for stats.
2015-07-05 14:49:07 +05:00
### Donations
2017-03-27 03:59:48 +05:00
**XMR**: `4Aag5kkRHmCFHM5aRUtfB2RF3c5NDmk5CVbGdg6fefszEhhFdXhnjiTCr81YxQ9bsi73CSHT3ZN3p82qyakHwZ2GHYqeaUr`
2015-07-05 14:49:07 +05:00
2017-10-16 00:44:13 +05:00
![](https://cdn.pbrd.co/images/GP5tI1D.png)
Highly appreciated.
2015-07-05 14:49:07 +05:00
### License
Released under the GNU General Public License v2.
http://www.gnu.org/licenses/gpl-2.0.html