2018-08-12 13:46:08 +00:00
|
|
|
# monero-pool
|
|
|
|
|
|
|
|
A Monero mining pool server written in C.
|
|
|
|
|
2019-03-08 03:50:58 +00:00
|
|
|
Design decisions are focused on performance and efficiency, hence the use of
|
|
|
|
libevent and LMDB. Currently it uses only two threads (one for the stratum
|
|
|
|
clients and one for the web UI clients). It gets away with this thanks to the
|
|
|
|
efficiency of libevent (for the stratum clients) and some sensible
|
|
|
|
proxying/caching being placed in front of the [web UI](#web-ui).
|
2018-08-12 13:46:08 +00:00
|
|
|
|
|
|
|
The single payout mechanism is PPLNS, which favors loyal pool miners.
|
|
|
|
|
|
|
|
I have no plans to add any other payout mechanisms or other coins. Work should
|
2019-03-08 03:50:58 +00:00
|
|
|
stay focussed on performance, efficiency and stability.
|
2018-08-12 13:46:08 +00:00
|
|
|
|
|
|
|
## Project status
|
|
|
|
|
2019-03-08 03:50:58 +00:00
|
|
|
I have tested this quite a bit on the Monero testnet (if you plan
|
2018-08-12 13:46:08 +00:00
|
|
|
to do the same, ensure to use `--testnet` flag when starting your wallet and
|
2019-03-08 03:50:58 +00:00
|
|
|
daemon) and mainnet, but there is always room for improvement. Please see the
|
2018-08-12 13:46:08 +00:00
|
|
|
[TODO](./TODO) file for the current list of things that could do with looking
|
|
|
|
at.
|
|
|
|
|
2019-03-08 03:50:58 +00:00
|
|
|
There is also a reference mainnet pool setup and running at
|
|
|
|
[http://monerop.com](http://monerop.com).
|
2018-08-12 13:46:08 +00:00
|
|
|
|
|
|
|
If you want to help with testing or help setting up your own pool, give me a
|
|
|
|
shout on IRC: jtgrassie on Freenode.
|
|
|
|
|
|
|
|
## Compiling from source
|
|
|
|
|
|
|
|
### Dependencies
|
|
|
|
|
2019-04-01 22:10:48 +00:00
|
|
|
The build system now requires the Monero source tree to be cloned and compiled.
|
|
|
|
Follow the
|
|
|
|
[instructions](https://github.com/monero-project/monero#compiling-monero-from-source)
|
|
|
|
for compiling Monero, then export the following variables:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
export MONERO_ROOT=/path/to/cloned/monero
|
|
|
|
export MONERO_BUILD_ROOT=$MONERO_ROOT/build/<system>/<branch>/<release|debug>
|
|
|
|
```
|
|
|
|
|
|
|
|
Replacing the values appropriately.
|
|
|
|
|
|
|
|
Beyond the Monero dependencies, the following libraries are also required to
|
|
|
|
build the pool:
|
|
|
|
|
2018-08-12 13:46:08 +00:00
|
|
|
- liblmdb
|
|
|
|
- libevent
|
|
|
|
- json-c
|
|
|
|
- openssl
|
|
|
|
- libmicrohttpd
|
|
|
|
- uuid
|
|
|
|
|
2019-04-01 22:10:48 +00:00
|
|
|
As an example, on Ubuntu, these dependencies can be installed with the following
|
2018-08-12 13:46:08 +00:00
|
|
|
command:
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo apt-get install libjson-c-dev uuid-dev libevent-dev libmicrohttpd-dev \
|
2019-04-01 22:10:48 +00:00
|
|
|
liblmdb-dev openssl
|
2018-08-12 13:46:08 +00:00
|
|
|
```
|
|
|
|
### Compile
|
|
|
|
|
2019-04-01 22:10:48 +00:00
|
|
|
First install all the dependencies as described above.
|
2018-08-12 13:46:08 +00:00
|
|
|
|
|
|
|
Then to compile the pool as a release build, run:
|
|
|
|
|
|
|
|
```
|
2019-02-24 19:07:16 +00:00
|
|
|
make release
|
2018-08-12 13:46:08 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
The application will be built in `build/release/`.
|
|
|
|
|
|
|
|
Optionally you can compile a debug build by simply running:
|
|
|
|
|
|
|
|
```
|
|
|
|
make
|
|
|
|
```
|
|
|
|
|
|
|
|
Debug builds are output in `build/debug/`.
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
Copy and edit the `pool.conf` file to either the same directory as the compiled
|
|
|
|
binary `monero-pool`, or place it in your home directory or launch `monero-pool`
|
|
|
|
with the flag `--config-file path/to/pool.conf` to use a custom location. The
|
2019-03-08 03:50:58 +00:00
|
|
|
configuration options should be self explanatory.
|
2018-08-12 13:46:08 +00:00
|
|
|
|
|
|
|
## Running
|
|
|
|
|
2019-03-08 03:50:58 +00:00
|
|
|
Ensure you have your Monero daemon (`monerod`) and wallet RPC
|
|
|
|
(`monero-wallet-rpc`) up and running with the correct host and port settings as
|
|
|
|
defined in the pool config file.
|
2018-08-12 13:46:08 +00:00
|
|
|
|
2019-04-01 22:10:48 +00:00
|
|
|
It is highly recommended to run these on the same host as the pool server to
|
|
|
|
avoid network latency when their RPC methods are called.
|
|
|
|
|
2019-02-24 19:07:16 +00:00
|
|
|
Then simply `cd build/debug|release` and run `./monero-pool`.
|
2018-08-12 13:46:08 +00:00
|
|
|
|
2019-03-08 03:50:58 +00:00
|
|
|
## Web UI
|
|
|
|
|
|
|
|
There is a minimal web UI that gets served on the port specified in the config
|
|
|
|
file. It's advisable to use either Apache or Nginx as a proxy in front of this
|
|
|
|
with some appropriate caching.
|
|
|
|
|
2018-08-12 13:46:08 +00:00
|
|
|
## Supporting the project
|
|
|
|
|
|
|
|
This mining pool has **no built-in developer donation** (like *other* mining
|
|
|
|
pool software has), so if you use it and want to donate, XMR donations to:
|
|
|
|
|
|
|
|
```
|
|
|
|
451ytzQg1vUVkuAW73VsQ72G96FUjASi4WNQse3v8ALfjiR5vLzGQ2hMUdYhG38Fi15eJ5FJ1ZL4EV1SFVi228muGX4f3SV
|
|
|
|
```
|
|
|
|
|
|
|
|
would be very much appreciated.
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
Please see the [LICENSE](./LICENSE) file.
|
|
|
|
|
2019-02-09 19:23:51 +00:00
|
|
|
[//]: # ( vim: set tw=80: )
|