go-p2pool/README.md

90 lines
No EOL
4.1 KiB
Markdown

# P2Pool Consensus
This repository contains a consensus-compatible reimplementation of a P2Pool server instance for [Monero P2Pool](https://github.com/SChernykh/p2pool) decentralized pool and experimental stratum support.
You may be looking for [P2Pool Consensus](https://git.gammaspectra.live/P2Pool/consensus) or [P2Pool Observer](https://git.gammaspectra.live/P2Pool/observer) instead.
## Donations
This project is provided for everyone to use, for free, as a hobby project. Any support is appreciated.
Donate to support this project, its development, and running the Observer Instances on [4AeEwC2Uik2Zv4uooAUWjQb2ZvcLDBmLXN4rzSn3wjBoY8EKfNkSUqeg5PxcnWTwB1b2V39PDwU9gaNE5SnxSQPYQyoQtr7](monero:4AeEwC2Uik2Zv4uooAUWjQb2ZvcLDBmLXN4rzSn3wjBoY8EKfNkSUqeg5PxcnWTwB1b2V39PDwU9gaNE5SnxSQPYQyoQtr7?tx_description=P2Pool.Observer)
You can also use the OpenAlias `p2pool.observer` directly on the GUI.
## Running
You can run or build go-p2pool via Golang to create native binaries for your system.
See the Dependencies section below if you want to use the [tevador/RandomX](https://github.com/tevador/RandomX) library. If you do so, remove all `CGO_ENABLED=0` from your commands and add `-tags enable_randomx_library` to go commands.
```bash
# Directly run go-p2pool
CGO_ENABLED=0 go run git.gammaspectra.live/P2Pool/go-p2pool/v4@v4.0.0 -help
# Install go-p2pool
CGO_ENABLED=0 go install git.gammaspectra.live/P2Pool/go-p2pool/v4@v4.0.0
go-p2pool -help
# Compile from this repository
git clone --depth 1 --branch v4.0.0 https://git.gammaspectra.live/P2Pool/go-p2pool.git
cd go-p2pool
CGO_ENABLED=0 go install .
go-p2pool -help
# Alternatively you can use go build to specify an output path
CGO_ENABLED=0 go build -trimpath -v -pgo=auto -o /usr/bin/go-p2pool .
go-p2pool -help
```
## Usage
Arguments are similar to [SChernykh/p2pool](https://github.com/SChernykh/p2pool), with some differences and additions.
You can use either `-[arg] or --[arg]`
```
-add-self-peer
Adds itself to the peer list regularly, based on found local interfaces for IPv4/IPv6
-addpeers string
Comma-separated list of IP:port of other p2pool nodes to connect to
-api-bind string
Bind to this address to serve blocks, and other utility methods. If -archive is specified, serve archived blocks.
-archive string
If specified, create an archive store of sidechain blocks on this path.
-block-cache string
Block cache for faster startups. Set to empty to disable (default "p2pool.cache")
-consensus-config string
Name of the p2pool consensus config file
-debug
Log more details. Default false
-debug-listen string
Provide a bind address and port to expose a pprof HTTP API on it.
-host string
IP address of your Monero node (default "127.0.0.1")
-in-peers uint
Maximum number of incoming connections for p2p server (any value between 10 and 450) (default 10)
-ipv6-only
Use only IPv6. Default false
-light-mode
Don't allocate RandomX dataset, saves 2GB of RAM
-memory-limit uint
Memory limit for go managed sections in GiB, set 0 to disable
-mini
Connect to p2pool-mini sidechain. Note that it will also change default p2p port.
-no-dns
Disable DNS queries, use only IP addresses to connect to peers (seed node DNS will be unavailable too)
-out-peers uint
Maximum number of outgoing connections for p2p server (any value between 10 and 450) (default 10)
-p2p string
IP:port for p2p server to listen on. (default "0.0.0.0:37889")
-p2p-external-port uint
Port number that your router uses for mapping to your local p2p port. Use it if you are behind a NAT and still want to accept incoming connections
-peer-list string
Either a path or an URL to obtain peer lists from. If it is a path, new peers will be saved to this path. Set to empty to disable (default "p2pool_peers.txt")
-rpc-port uint
monerod RPC API port number (default 18081)
-stratum string
IP:port for stratum server to listen on. Empty to disable.
-zmq-port uint
monerod ZMQ pub port number (default 18083)
```