P2Pool

P2Pool release 17.0 - commit hash: 62fa7b020b82a92138d7652c26be2953b26fd4e5

HARDFORK - Upgrade URGENTLY required in the next few days.

Windows binary: http://u.forre.st/u/iqvaqprd/p2pool_win32_17.0.zip
Windows binary signature: http://u.forre.st/u/ysrjpsls/p2pool_win32_17.0.zip.sig
Source zipball: https://github.com/forrestv/p2pool/zipball/17.0
Source tarball: https://github.com/forrestv/p2pool/tarball/17.0

Changes:

* SegWit compatibility
* Increased new transactions size limit per share to allow producing larger blocks
* Requires Bitcoin >= 0.13.1

SegWit (segregated witness) **has already activated** and for P2Pool to continue working without producing invalid blocks, everyone needs to upgrade. At 50% of our hashrate upgrading, P2Pool instances will start displaying a warning saying that an upgrade is required. Reaching that point as quickly as possible is very important. And then, at 95%, users that have not upgraded will be excluded. If non-upgraded users aren't excluded soon enough, P2Pool users will be subject to paying other users for invalid work - effectively a withholding attack.

Due to SegWit already activating upgraded users of P2Pool must not mine SegWit transactions as they are incompatible with older P2Pool versions. After v17 shares activate a new release will be made which removes this restriction.

So, please upgrade to 17.0 now and also tell everyone else to.

Events such as this are announced via the P2Pool-notifications mailing list.

What is P2Pool?

P2Pool is a decentralized Bitcoin mining pool that works by creating a peer-to-peer network of miner nodes.

As opposed to usual pools, P2Pool helps to secure Bitcoin against double-spending and 51% attacks. P2Pool's initial setup requires a little more effort but provides equivalent payouts with a higher variance and no need for trust in a pool operator.

Download P2Pool

Windows Windows

Download the newest version from the Windows binaries: p2pool_win32_15.0.zip .sig
You can also download the source as tar/zipballs on GitHub.

Linux Linux

Using git is preferable, but you can also download tar/zipballs on GitHub.

sudo apt-get install git # if git is not installed
git clone https://github.com/forrestv/p2pool.git
cd p2pool
make

The following packages are required, and will be automatically installed when you run 'make':

If for whatever reason you need to install them manually:

sudo apt-get install python-twisted python-argparse # should work on Ubuntu

Mac OS X Mac OS X

Using git is preferable, but you can also download tar/zipballs on GitHub.

You can download git for OS X from the official Git site, or install it with Homebrew:

brew install git

Then download and install p2pool:

git clone https://github.com/forrestv/p2pool.git
cd p2pool

The following packages are required, and will be automatically installed when you run 'make':

Getting started

Setting up a working P2Pool mostly consists of:

1. Setup Bitcoin-Qt or bitcoind

Download and install Bitcoin-Qt or bitcoind. Initial synchronization will likely take more than a day to complete. For this reason, it is generally a good idea to complete this step in advance.

Insert the following text into bitcoin.conf and restart Bitcoin-Qt or bitcoind:

server=1
rpcuser=bitcoinrpc
rpcpassword=(random data)

Example for Windows

bitcoin.conf can be found in the following folder: %AppData%\Bitcoin

thumbnail
screenshot
thumbnail
screenshot
thumbnail
screenshot
thumbnail
screenshot
thumbnail
screenshot
thumbnail
screenshot
thumbnail
screenshot

Example for Linux

bitcoin.conf can be found in the following folder: ~/.bitcoin

thumbnail
screenshot
thumbnail
screenshot
thumbnail
screenshot
thumbnail
screenshot

2. Run P2Pool

Download P2Pool and execute run_p2pool.exe (Windows) or 'python run_p2pool.py' (Linux/OS X/source).

P2Pool will start downloading the sharechain, displaying sections like this occasionally:

2014-01-09 17:15:45.075550 P2Pool: 0 shares in chain (0 verified/3133 total) Peers: 5 (0 incoming)
2014-01-09 17:15:45.075662  Local: 0H/s in last 0.0 seconds Local dead on arrival: ??? Expected time to share: ???

Within a few minutes, it should start showing sections like this (notice the pool hashrate - Pool: 115TH/s - is now shown), indicating that the sharechain has finished downloading. As you can see from the timestamps, here it took about one and a half minutes. It will vary depending on your CPU speed and Internet bandwidth.

2014-01-09 17:16:49.525335 P2Pool: 8698 shares in chain (57 verified/8698 total) Peers: 5 (0 incoming)
2014-01-09 17:16:49.525422  Local: 0H/s in last 0.0 seconds Local dead on arrival: ??? Expected time to share: ???
2014-01-09 17:16:49.525476  Shares: 0 (0 orphan, 0 dead) Stale rate: ??? Efficiency: ??? Current payout: 0.0000 BTC
2014-01-09 17:16:49.525510  Pool: 115TH/s Stale rate: 12.4% Expected time to block: 14.7 hours

3. Run miners

Just point miners to http://HOST:9332/ with HOST being the IP address of the computer running P2Pool. The username can be your payout Bitcoin address or anything that describes the miner if you prefer to mine into your Bitcoin-Qt/bitcoind wallet. Use any password; it is ignored by P2Pool. When mining on the same machine, you can use 127.0.0.1 as the P2Pool host.

ButterflyLabs EasyMiner

Easyminer can be downloaded here.

screenshot

bfgminer

Linux

Downloading and building bfgminer from the terminal:

sudo apt-get install git build-essential autoconf automake libtool pkg-config libcurl4-gnutls-dev libjansson-dev uthash-dev libncursesw5-dev libudev-dev libusb-1.0-0-dev libevent-dev libmicrohttpd-dev
git clone git://github.com/luke-jr/bfgminer.git
cd bfgminer
./autogen.sh
./configure
make

Running bfgminer from the terminal:

./bfgminer -o http://127.0.0.1:9332 -u user -p password

Windows

Binaries for Windows (32bit and 64bit) can be downloaded here.

You can run bfgminer from the command line:

bfgminer.exe -o http://127.0.0.1:9332 -u user -p password

Or you can create a preconfigured shortcut on the desktop:

thumbnail
screenshot
thumbnail
screenshot
thumbnail
screenshot

cgminer

cgminer --url http://127.0.0.1:9332/ --userpass cgminer:password

Bitfury / Megabigpower

See the last question of this FAQ.

4. Watch

Unless your miners have Bitcoin addresses as usernames, payouts will go to Bitcoin-Qt/bitcoind's wallet. You can look at P2Pool's web interface, which has statistics and graphs, by going to http://YOUR_P2POOL_HOST:9332/ in a browser - http://127.0.0.1:9332/ if you're looking at this tutorial on the same host that P2Pool is running.

Once your P2Pool setup is working, make sure to subscribe to the P2Pool notifications mailing list to receive urgent pool status updates.

FAQ

What are the requirements to run P2Pool?

What are P2Pool's fees?

By default, P2Pool receives 1% to fund P2Pool's development. This fee is optional, but very welcome and useful.

How good are P2Pool payouts?

Payouts should be the same as other pools with a higher variance (payouts are inconsistently smaller or larger days after days). Payouts can even be slightly higher because blocks propagation time is sometime faster on P2Pool. It also happens that people are sending bitcoins to P2Pool miners to encourage miners to support P2Pool.

What are the advantages of using P2Pool?

What are the disadvantages of using P2Pool?

Why does P2Pool have so many orphaned / dead / rejected shares?

Miners' payouts are not affected so long as they have a proportional number of rejected shares to other miners. A new share is found every 30 seconds on average with P2Pool's sharechain. This means reorganizations happen more often and miners must have a good network connection in order to receive last shares within a short time.

How to mine with Litecoin?

You should go through the same steps as if you were mining with Bitcoin, except that you should:

Useful links

Bitcoin wiki page

Bitcoin forum thread

GitHub page

Pool statistics

Sponsors

Thanks to the Bitcoin Foundation for its generous support of P2Pool.

Thanks to the Litecoin Project for its generous donations to P2Pool.