go-p2pool

command module
v3.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 43 Imported by: 0

README

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.

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

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


# Compile from this repository
git clone --depth 1 --branch v3.7.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
go build -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)

Dependency notes

RandomX without external dependencies

Set CGO_ENABLED=0 to disable CGO and build everything via Golang, or alternatively via disable_randomx_library build tag.

Uses Golang git.gammaspectra.live/P2Pool/go-randomx RandomX backend for consensus PoW checking.

Only supports light mode, with almost no JIT support.

RandomX with external dependency and CGO

Requires a native RandomX implementation and CGO_ENABLED=1 environment variable while building.

Uses C/C++ tevador/RandomX library.

Supports full and light mode, with JIT support implemented across many platforms.

You can install the dependency via this command:

$ git clone --depth 1 --branch v1.2.1 https://github.com/tevador/RandomX.git /tmp/RandomX && cd /tmp/RandomX && \
    mkdir build && cd build && \
    cmake .. -DCMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH=/usr && \
    make -j$(nproc) && \
    sudo make install && \
    cd ../ && \
    rm -rf /tmp/RandomX

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL