Merge pull request #123 from bladedoyle/mini

Support mini pool.  Cleanup
This commit is contained in:
SChernykh 2022-02-20 16:16:10 +01:00 committed by GitHub
commit c9493ec7fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 13 deletions

View file

@ -5,14 +5,14 @@ WALLET_ADDRESS="44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F
##
# p2pool settings
#
# Use p2pool-mini (uncomment to enable)
#P2POOL_MINI="--mini"
#
# Which port to listen for miner connections
P2POOL_STRATUM_PORT=3333
#
# How much logging - (Less) 0 - 6 (More)
P2POOL_LOGLEVEL=2
#
# The name of docker volume to hold p2pool data (created automatically if it doesnt exist)
P2POOL_VOLUME=p2pool
##
@ -24,8 +24,8 @@ MONERO_GIT_TAG=latest
# Limit the size of the blockchain on disk (comment to disable)
PRUNE_NODE="--prune-blockchain"
#
# The name of docker volume to hold p2pool data (created automatically if it doesnt exist)
MONERO_VOLUME=monero
# Other monerod commandline options
MONERO_EXTRA_OPTIONS=""
##
@ -34,5 +34,9 @@ MONERO_VOLUME=monero
# Submit shares at a lower fixed difficulty to show mining progress (comment to disable, edit to customize)
FIXED_MINING_DIFFICULTY="-u x+500000"
#
# Limit the number of CPU cores to use for mining (uncomment to enable, edit to customize)
#NUM_MINING_CPU="-t 4"
# set process priority (0 idle, 2 normal to 5 highest)
MINING_CPU_PRIORITY="--cpu-priority=2"
#
# Other XMRIG commandline options
# See: https://xmrig.com/docs/miner/command-line-options
XMRIG_EXTRA_OPTIONS=""

View file

@ -31,15 +31,18 @@ docker-compose up
```
#### Optional
* Open ports 18080 (Monero p2p port) and 37889 (P2Pool p2p port) in your firewall to ensure better connectivity. If you're mining from a computer behind NAT (like a router) you could consider forwarding the ports to your local machine
* Open ports 18080 (Monero p2p port) and 37889 (P2Pool p2p port) or 37888 (P2Pool-mini p2p port) in your firewall to ensure better connectivity. If you're mining from a computer behind NAT (like a router) you could consider forwarding the ports to your local machine
* An XMRig CPU miner is included by default, but you can connect additional miners to this same p2pool node using port 3333
* Configure your kernel for maximum mining performance: [XMRig RandomX Optimization Guide](https://xmrig.com/docs/miner/randomx-optimization-guide)
* Small miners can mine on p2pool-mini by editing the .env file
#### Other usefull commands
* You can **run everythng in the background** by adding the "-d" argument to the "docker-compose up" command: ```docker-compose up -d```
* You can **stop everything** with CTRL-C or ```docker-compose down```
* You can see logs when running in the background for with the "docker logs" command: ```docker logs -f p2pool-xmrig``` or ```docker logs -f p2pool-p2pool``` or ```docker logs -f p2pool-monero```
* You can pause mining with: ```docker-compose pause xmrig``` and resume mining with: ```docker-compose unpause xmrig```
* You can disable mining with: ```docker-compose stop xmrig``` and re-enable mining with: ```docker-compose start xmrig```
#### Uninstall

View file

@ -7,9 +7,9 @@ networks:
volumes:
p2pool:
name: ${P2POOL_VOLUME}
name: p2pool
monero:
name: ${MONERO_VOLUME}
name: monero
services:
monero:
@ -17,7 +17,7 @@ services:
build:
context: monero
args:
- MONERO_GIT_TAG=$MONERO_GIT_TAG
- MONERO_GIT_TAG=${MONERO_GIT_TAG}
container_name: p2pool-monero
networks:
- p2pool
@ -39,6 +39,7 @@ services:
--rpc-bind-port=18081
--confirm-external-bind
${PRUNE_NODE}
${MONERO_EXTRA_OPTIONS}
p2pool:
image: p2pool:latest
@ -48,6 +49,7 @@ services:
- p2pool
ports:
- ${P2POOL_STRATUM_PORT}:3333/tcp
- 37888:37888/tcp
- 37889:37889/tcp
volumes:
- p2pool:/home/p2pool/.p2pool:rw
@ -60,6 +62,7 @@ services:
--host monero
--wallet ${WALLET_ADDRESS}
--loglevel ${P2POOL_LOGLEVEL}
${P2POOL_MINI}
xmrig:
image: xmrig:latest
@ -77,7 +80,7 @@ services:
restart: unless-stopped
command: >-
${FIXED_MINING_DIFFICULTY}
${NUM_MINING_CPU}
${MINING_CPU_PRIORITY}
${XMRIG_EXTRA_OPTIONS}
--randomx-1gb-pages
-o p2pool:3333