Consensus-compatible implementation of P2Pool server
Find a file
2024-08-09 21:27:48 +02:00
.gitignore Version v3.8.0 matching merge mining support 2024-04-23 19:05:26 +02:00
api.go Version v4.0.5 for new p2pool hardfork, add new API /sidechain/state/tip/light 2024-08-09 21:27:48 +02:00
default.pgo Initial commit 2024-04-03 20:17:23 +02:00
go.mod Version v4.0.5 for new p2pool hardfork, add new API /sidechain/state/tip/light 2024-08-09 21:27:48 +02:00
go.sum Version v4.0.5 for new p2pool hardfork, add new API /sidechain/state/tip/light 2024-08-09 21:27:48 +02:00
json.go Version v4.0.0 for new p2pool hardfork 2024-06-19 21:09:11 +02:00
LICENSE Initial commit 2024-04-03 20:17:23 +02:00
main.go Version v4.0.5 for new p2pool hardfork, add new API /sidechain/state/tip/light 2024-08-09 21:27:48 +02:00
p2pool.go Version v4.0.0 for new p2pool hardfork 2024-06-19 21:09:11 +02:00
README.md Version v4.0.5 for new p2pool hardfork, add new API /sidechain/state/tip/light 2024-08-09 21:27:48 +02:00
types.go Version v4.0.5 for new p2pool hardfork, add new API /sidechain/state/tip/light 2024-08-09 21:27:48 +02:00

P2Pool Consensus

This repository contains a consensus-compatible reimplementation of a P2Pool server instance for Monero P2Pool decentralized pool and experimental stratum support.

You may be looking for P2Pool Consensus or 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

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 library. If you do so, remove all CGO_ENABLED=0 from your commands and add -tags enable_randomx_library to go commands.

Use -tags packedaddress_base58 for outputting Base58 version of the PackedAddress whenever it's shown on JSON (and parsing it as well). Note this won't be compatible with programs which expect the hex format.

# Directly run go-p2pool
CGO_ENABLED=0 go run git.gammaspectra.live/P2Pool/go-p2pool/v4@v4.0.5 -help

# Install go-p2pool
CGO_ENABLED=0 go install git.gammaspectra.live/P2Pool/go-p2pool/v4@v4.0.5
go-p2pool -help


# Compile from this repository
git clone --depth 1 --branch v4.0.5 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 .
# If tags are desired 
# CGO_ENABLED=0 go build -tags packedaddress_base58 -trimpath -v -pgo=auto -o /usr/bin/go-p2pool .
go-p2pool -help

Usage

Arguments are similar to 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)