From Bitcoin Wiki
Revision as of 05:44, 29 July 2011 by Sgornick (talk | contribs) (Add verbiage to describe how p2pool runs locally, and miners connect to it.)
Jump to: navigation, search

P2Pool is a decentralized pool that works by creating a P2P network of miner nodes.

A P2Pool node process is run locally and the miner daemon is then configured to connect to that local P2Pool node.

These nodes work on a chain of shares similar to Bitcoin's blockchain. Each node works on a block that includes payouts to the previous shares' owners and the node itself. There is no central point of failure, making it DoS resistant.

P2Pool shares form a "sharechain" with each share referencing the previous share's hash. Each share contains a standard Bitcoin block header, some P2Pool-specific data that is used to compute the generation transaction (total subsidy, payout script of this share, a nonce, the previous share's hash, and the current target for shares), and a merkle branch linking that generation transaction to the block header's merkle hash.

The chain continuously regulates its target to keep generation around one share every five seconds.

Unlike Bitcoin, nodes do not know the entire chain - instead they only hold the last 17280 shares (the last day's worth). In order to prevent an attacker from working on a chain in secret and then releasing it, overriding the existing chain, chains are judged by how much work they have since a point in the past. To ascertain that the work has been done since that point, nodes look at the Bitcoin blocks shares reference, establishing a provable timestamp. (If a share points to a block, it was definitely made after that block was made.)

Payout logic

Each share contains a generation transaction that pays out to the previous n shares, where n is the number of shares whose total work is equal to 3 times the average work required to solve a block, or 17280, whichever is smaller. Payouts are weighted based on the amount of work each share took to solve - proportional to the p2pool difficulty at that time.

A subsidy of 0.5% is sent to the node that solved the block in order to discourage not sharing solutions that qualify as a block. (An evil miner could withhold the block, thereby preventing anybody from getting paid. He can NOT redirect the payout to himself.) In addition, a subsidy of 0.5% is kept as a fee. The remaining 99% is distributed evenly to miners based on work done recently.

In the event that a share qualifies as a block, this generation transaction is exposed to the Bitcoin network and takes effect, transferring each node its payout.


See Joining the pool on the project's wiki page for more details.

Support and information about latest developments can be found on the #p2pool IRC channel on freenode.


This project was announced on June 17, 2011[1].

The began testing against mainnet in mid-July, 2011. The pool was reviewed on a Bitcoin Miner post on July 26, 2011[2].

External Links


Category:Pool Operators