-
Notifications
You must be signed in to change notification settings - Fork 39
Home
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:
- Developer Setup Notes
- P2Pool vs P2Poolv2
- System Design
- Shares For Small Miners
- Uncle Blocks
- Sharechain Design
- Share Broadcast and Storage
- Compact Blocks and Share Validation
- Delta Encoding of Shares, Erlay and Compact Blocks
- Multiple Development Nodes
- Presentations
- Comparison with DATUM and SV2
- Using Stratum v2
- Scale and P2P Network Size
- P2Poolv2 Mining TUI
- TLA+ Specifications
- Payouts PPLNS With Decay
- Load Testing
- Trading Shares For Bitcoin
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.
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
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.
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.
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.
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.