Skip to content
pool2win edited this page May 18, 2026 · 32 revisions

Welcome to the P2Poolv2 wiki. See documentation below. Reach us on our chat at Matrix. Visit our github project: Reboot P2Pool.


Follow the links to read the docs:

  1. Developer Setup Notes
  2. P2Pool vs P2Poolv2
  3. System Design
  4. Shares For Small Miners
  5. Uncle Blocks
  6. Sharechain Design
    1. Validate Confirm and Connect Shares
  7. Share Broadcast and Storage
  8. Compact Blocks and Share Validation
  9. Delta Encoding of Shares, Erlay and Compact Blocks
  10. Multiple Development Nodes
  11. Presentations
  12. Comparison with DATUM and SV2
  13. Using Stratum v2
  14. Scale and P2P Network Size
  15. P2Poolv2 Mining TUI
  16. TLA+ Specifications
  17. Payouts PPLNS With Decay
  18. Load Testing
  19. Trading Shares For Bitcoin

Quick Start

To run a node

Install just and run a local node:

just run

The above will use the default config file config.toml. You need to be running a local bitcoin node that the p2pool node will talk to.

We also support a local signet for testing and development purposes. There is a docker setup for a signet that p2pool can easily talk to.

To run bitcoin signet for testing/development:

cd docker
docker compose build
./run-p2pool.sh signet bitcoind

docker compose build will also build other containers for cpuminer and ckpool, which

To run multiple local nodes for development and testing, see Multiple Development Nodes.

Motivation

Bitcoin mining pools are centralisation pressure in the bitcoin mining industry. We need an open source software stack that can be run by participants to fulfil the role of mining pool.

P2Poolv2 is rebooting the original P2Pool for bitcoin with latest facilities available in bitcoin and uses modern programming languages and libraries like rust-bitcoin.

At a very high level, P2Poolv2 does the following

Sharechain

Builds a blockchain of mining shares, where all the shares produced by all miners are replicated at all the nodes. The accounting of work done by miners to determine payouts is run by all participating nodes, so no centralised entity controls this accounting, and all participants can independently compute the rewards due to all miners.

The share chain support uncle blocks to reduce the number of orphan blocks.

Sharechain uncles

Sharechain Blocks

Each share chain block contains a bitcoin block or enough data to build the bitcoin block it mined. Apart from pointing to the bitcoin block, the share also has the coinbase for the miner who mined the share as and a set of transactions for the sharechain.

Sharechain block

The transaction support on sharechain enables miners to trade their shares with other miners or market makers in a non-custodial manner as described next.

Non Custodial Payouts

The payouts are made through the bitcoin block's coinbase, so miners are always in control of their rewards. Miners can sell their shares to other parties in exchange of bitcoin. The buyers of the shares then control the reward from the bitcoin coinbase.

The atomic swap workflow is described here

The scripts that enable the atomic swap over LN are described here.

Clone this wiki locally