<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=CoinCadence</id>
	<title>Bitcoin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=CoinCadence"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/wiki/Special:Contributions/CoinCadence"/>
	<updated>2026-04-11T14:16:24Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=57150</id>
		<title>P2Pool</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=57150"/>
		<updated>2015-07-04T17:34:39Z</updated>

		<summary type="html">&lt;p&gt;CoinCadence: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox company&lt;br /&gt;
|name=P2Pool&lt;br /&gt;
|trading_name=P2Pool&lt;br /&gt;
|industry=[[Mining pool]]&lt;br /&gt;
|foundation=July 17, 2011&lt;br /&gt;
|hashrate=1.6 Phash/s&lt;br /&gt;
|website= http://p2pool.in&lt;br /&gt;
}}&lt;br /&gt;
[[Image:P2pool_chain.png‎|thumb|350px|right|Visualization of the P2Pool share chain]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;P2Pool&#039;&#039;&#039; is a decentralized [[Bitcoin]] [[Bitcoin Pool|mining pool]] that works by creating a peer-to-peer network of miner nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;P2Pool creates a new block chain in which the difficulty is adjusted so a new block is found every 30 seconds. The blocks that get into the P2Pool block chain (called the &amp;quot;share chain&amp;quot;) are the same blocks that would get into the Bitcoin block chain, only they have a lower difficulty target. Whenever a peer announces a new share found (new block in the P2Pool block chain), it is received by the other peers, and the other peers verify that this block contains payouts for all the previous miners who found a share (and announced it) that made it into the P2Pool share chain. This continues until some peer finds a block that has a difficulty that meets the Bitcoin network&#039;s difficulty target. This peer announces this block to the Bitcoin network and miners who have submitted shares for this block are paid in the generation transaction, proportionally to how many shares they have found in the last while. - Unknown author&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Decentralized payout pooling solves the problem of centralized mining pools degrading the decentralization of Bitcoin and avoids the risk of hard to detect theft by pool operators.&lt;br /&gt;
&lt;br /&gt;
Miners are configured to connect to a P2Pool node that can be run locally, alongside the miner. P2Pool users must run a full Bitcoin node which serves the purpose of independently validating transactions and the Bitcoin blockchain. P2Pool also supports merged mining and several alternative blockchains.&lt;br /&gt;
&lt;br /&gt;
P2Pool nodes work on a chain of shares similar to Bitcoin&#039;s blockchain. Each node works on a block that includes payouts to the previous shares&#039; owners and the node itself, which can also result in a share if it meets P2Pool&#039;s difficulty.&lt;br /&gt;
&lt;br /&gt;
Because of the importance of strengthening Bitcoin&#039;s decentralization, some Bitcoin supporters donate to P2Pool miners, resulting in average returns above 100% of the expected reward.&lt;br /&gt;
However, it should be noted that there are other pools (such as [[BitPenny]] and [[Eligius]]) which can provide this same level of decentralization.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
P2Pool shares form a &amp;quot;sharechain&amp;quot; with each share referencing the previous share&#039;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&#039;s hash, and the current target for shares), and a Merkle branch linking that generation transaction to the block header&#039;s Merkle hash.&lt;br /&gt;
&lt;br /&gt;
The chain continuously regulates its target to keep generation around one share every thirty seconds, just as Bitcoin regulates it to generate one block every ten minutes.&lt;br /&gt;
This means that finding shares becomes more difficult (resulting in higher variance) the more people mine on P2Pool, though large miners have the option to raise their difficulty, and so reduce the impact of their mining on P2Pool&#039;s minimum difficulty.&lt;br /&gt;
&lt;br /&gt;
Unlike Bitcoin, nodes do not know the entire chain - instead they only hold the last 8640 shares (the last 3 day&#039;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 that the shares reference, establishing a provable timestamp. (If a share points to a block, it was definitely made after that block was made.)&lt;br /&gt;
&lt;br /&gt;
=== Payout logic ===&lt;br /&gt;
&lt;br /&gt;
Each share contains a generation transaction that pays to the previous &#039;&#039;n&#039;&#039; shares, where &#039;&#039;n&#039;&#039; is the number of shares whose total work is equal to 3 times the average work required to solve a block, or 8640 (= 24 hours of shares), whichever is smaller. Payouts are weighted based on the amount of work each share took to solve, which is proportional to the p2pool difficulty at that time.&lt;br /&gt;
&lt;br /&gt;
The block reward (currently 25BTC) and the transaction fees are combined and apportioned according to these rules:&lt;br /&gt;
&lt;br /&gt;
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. (A miner with the aim to harm others could withhold the block, thereby preventing anybody from getting paid. He can NOT redirect the payout to himself.) The remaining 99.5% is distributed evenly to miners based on work done recently.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Stales ===&lt;br /&gt;
&lt;br /&gt;
On P2Pool stales refer to shares which can&#039;t make it into the sharechain.  Because the sharechain is 20 times faster than the Bitcoin chain many stales are common and expected. However, because the payout is [[Comparison_of_mining_pools|PPLNS]] only your stale rate relative to other nodes is relevant; the absolute rate is not.&lt;br /&gt;
&lt;br /&gt;
There are two reported kinds of stales in P2Pool: &amp;quot;DEAD ON ARRIVAL&amp;quot; shares and orphan shares. Dead shares were too old by the time they arrived at your local P2Pool. Very high dead rates can indicate miner misconfiguration. Orphan shares are shares which were not extended by the rest of the P2Pool network, because some other miner&#039;s share was accepted first. Very high orphan rates may indicate network connectivity problems. &lt;br /&gt;
&lt;br /&gt;
The P2Pool console output shows your relative stale rate compared to other P2Pool miners in the &#039;Own efficiency&#039; column:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2012-01-07 20:57:51.797420 Pool stales: 13% Own: 13±2% Own efficiency: 100±2%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you first start P2Pool claimed efficiency will be low and the error bounds on this estimate will be large, but as it runs the numbers will converge to their correct values.&lt;br /&gt;
&lt;br /&gt;
If your efficiency is unusually low, make sure your network connection isn&#039;t overloaded, that your miners support long polling and are not set to work for excessive amounts of time, and that your bitcoind has multiple connections.&lt;br /&gt;
&lt;br /&gt;
== Joining the pool ==&lt;br /&gt;
&lt;br /&gt;
Follow these steps to join the pool:&lt;br /&gt;
&lt;br /&gt;
* Run Bitcoin with the RPC interface enabled: edit bitcoin.conf to include:&lt;br /&gt;
 rpcuser=USER&lt;br /&gt;
 rpcpassword=LONG_RANDOM_SECRET_VALUE&lt;br /&gt;
 server=1&lt;br /&gt;
**&#039;&#039;&#039;Replace LONG_RANDOM_SECRET_VALUE with something long and random like the output of smashing your keyboard for a bit like fju4M78yAj3ds39pak92raK&#039;&#039;&#039;. You don&#039;t need to be able to remember it. If your RPC port becomes exposed to the internet a thief could steal your bitcoin if they could guess it, or use a brute force attack in order to find it.&lt;br /&gt;
** Bitcoin 0.8.5 or later is required&lt;br /&gt;
** It&#039;s important that your Bitcoin client be fully synchronized before starting. It&#039;s also better if you have the Bitcoin port forwarded&lt;br /&gt;
* Download p2pool:&lt;br /&gt;
** Windows binary: See http://forum.bitcoin.org/index.php?topic=18313.0&lt;br /&gt;
** Source download: https://github.com/forrestv/p2pool/tags&lt;br /&gt;
** git: git clone git://github.com/forrestv/p2pool.git&lt;br /&gt;
* Run p2pool: (See below for additional options.)&lt;br /&gt;
** Windows py2exe: run_p2pool.exe&lt;br /&gt;
** Source: python run_p2pool.py&lt;br /&gt;
* Run a miner daemon with long polling connecting to 127.0.0.1 (or the IP of the host running p2pool if it isn&#039;t on the same computer as the miner) on port 9332 with any username and password&lt;br /&gt;
** bfgminer -O u:p -o http://127.0.0.1:9332/ --submit-stale&lt;br /&gt;
* Subscribe to the [https://groups.google.com/forum/#!forum/p2pool-notifications P2Pool notifications] mailing list for urgent pool status updates&lt;br /&gt;
&lt;br /&gt;
Dependencies if running from source:&lt;br /&gt;
* Python 2.6 or higher (but not 3.x)&lt;br /&gt;
* python-argparse&lt;br /&gt;
* Twisted (Ubuntu package python-twisted)&lt;br /&gt;
&lt;br /&gt;
=== Frequently Asked Questions ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Why does my miner report so many longpoll events when mining on p2pool? - P4Man&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; &amp;quot;Once every ~30 seconds is normal. That is how often p2pool shares are generated (as opposed to ~10 min for bitcoin blocks) - cabin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Do the &#039;orphan&#039; and &#039;dead&#039; shares in P2Pool&#039;s status display hurt me?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; They shouldn&#039;t - It&#039;s normal for some fraction of everyone&#039;s shares to end up orphaned or dead. Because payouts are calculated by counting how many shares you have relative to others, everyone with normal configurations is equally &amp;quot;hurt&amp;quot; by this. However, if you have a large proportion of stales, your payout will be hurt. You can see how well you&#039;re doing by looking at P2Pool&#039;s &amp;quot;Efficiency&amp;quot; (ex: &#039;&#039;Efficiency: ~110.6% (40-111%)&#039;&#039;). If 100% doesn&#039;t lie within the [http://en.wikipedia.org/wiki/Confidence_interval confidence interval] at the end, something is probably wrong (with 95% confidence).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;What do I do if my efficiency is low?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Make sure the computers you&#039;re running P2Pool and the miner on have enough memory and CPU time. If you have a lot of dead shares or the &amp;quot;Local dead on arrival&amp;quot; number is higher than a few percent, that means that something is wrong with your miner. Check to make sure that it is one of the working versions in the &#039;&#039;Miners&#039;&#039; section on this page. Lower the intensity or raise the FPS of your miner. If you have a lot of orphan shares, something is wrong with P2Pool&#039;s P2P connection. Decrease the load on your internet connection or enable QoS (Quality of Service) on your router.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What is PPLNS?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Pay-Per-Last-N-Shares is a payout method that is completely resistant to pool hoppers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I not getting very many shares?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The P2Pool difficulty is hundreds of times higher than on other pools. It can take time to get a share. P2Pool displays an estimate of how long you have to wait in the console output.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does my miner say it has found a lot of shares but p2pool say I have only found a few?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The real P2Pool difficulty is hundreds of times higher than on normal pools, but p2pool essentially lies to your miner and tells it to work on relatively easy shares so that it submits shares every few seconds instead of every few hours.  P2Pool then ignores any submitted shares that don&#039;t match the real share difficulty.  By doing this, P2Pool can more accurately report your local hash rate and you can see if you are having problems with too many stale shares quickly&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I getting so many rejects?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; You&#039;re using an incompatible miner. See the miners section here, increase your FPS on the miner, decrease the intensity, upgrade your miner, or try a different miner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What stops the pool operator or the block finder from stealing a block?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; A block solution is only worth anything because its hash matches Bitcoin&#039;s target. Altering anything within the block will change its hash and make it worthless. If you are concerned about the pool operator stealing a block, you should try to inspect the source code of each new version.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does it say &amp;quot;Generated?&amp;quot; I want to spend my coins now!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; P2Pool includes payouts in generation transactions, which must mature (taking 120 blocks or 20 hours) before they can be spent. The reason for this is that a block could be orphaned, which would make its payout invalid and could reverse transactions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I get paid transaction fees?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. They are split among P2Pool miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What are these payments I&#039;m getting that aren&#039;t generated?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; These are subsidies that people who support the idea of P2Pool send to miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Cool Subsidies sound like an awesome idea! How do I send some BTC to these awesome miners?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; See end of this page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I really need the WHOLE blockchain?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. Your node needs to be able to independently make decisions about what transactions to mine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; How do merged mining payments work?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Merged mining is handled entirely by namecoind, so you&#039;re solo mining and payouts will go into namecoind&#039;s wallet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Miners ===&lt;br /&gt;
&lt;br /&gt;
This is all for the latest p2pool version, as it includes several new workarounds. &lt;br /&gt;
&lt;br /&gt;
With all miners, using a HIGH FPS target (100?) or a LOW intensity (8 for bfgminer?) helps a lot with reducing stales.&lt;br /&gt;
&lt;br /&gt;
* bfgminer, cgminer, and ufasoft work perfectly without any extra options.&lt;br /&gt;
* DiabloMiner works fine after commit 3b731b9.&lt;br /&gt;
* Phoenix works fine after commit a658ef2.&lt;br /&gt;
* Poclbm works fine after commit 5e994e7.&lt;br /&gt;
&lt;br /&gt;
P2Pool uses higher difficulty shares than most centralized pools, so you&#039;ll see fewer shares reported. This is normal and doesn&#039;t reduce your payments.  It&#039;s also normal to see longpoll messages once per every ten seconds on average.&lt;br /&gt;
&lt;br /&gt;
====Tips to configure bfgminer to reduce stale/doa:====&lt;br /&gt;
* &amp;quot;gpu-threads&amp;quot; : &amp;quot;1&amp;quot;, (2 by default)&lt;br /&gt;
* &amp;quot;queue&amp;quot; : &amp;quot;0&amp;quot;, (1 by default)&lt;br /&gt;
&lt;br /&gt;
Because of fast longpooling in p2pool it is better not NOT fetch work ahead.&lt;br /&gt;
&lt;br /&gt;
On non-dedicated machines intensity=3 allows normal usage of PC, set it to 7 or more to get full hashrate.&lt;br /&gt;
&lt;br /&gt;
On most cards best is diablo and phatk kernel, looks like poclbm kernel have unstable rate.&lt;br /&gt;
&lt;br /&gt;
=== Useful features ===&lt;br /&gt;
&lt;br /&gt;
* If upgrading P2Pool or changing its configuration, you can start another instance of P2Pool in parallel with the first. It will start normally, but realize that the worker and P2P listening ports are busy and keep trying to bind to them in the background. Thus, you can do almost-completely-seamless upgrades of P2Pool.&lt;br /&gt;
* If you run multiple P2Pool nodes or have trusted friends that run P2Pool, you can use &#039;&#039;-n&#039;&#039; to establish a constant extra P2P connection to them.&lt;br /&gt;
* You can make P2Pool use a configuration file by running run_p2pool.py @FILENAME, with FILENAME being the path to a file containing the command-line arguments (newlines are ignored) Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--net bitcoin&lt;br /&gt;
-n 1.2.3.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Setting the username of your miner connecting to P2Pool to a Bitcoin address will make it mine to that address instead of the one requested from bitcoind or set by -a&lt;br /&gt;
* Appending &amp;quot;/1000&amp;quot; to a miner&#039;s username will increase the difficulty of producing a P2Pool share to at most 1000. This is useful to large miners because doing this can make it easier for small miners while minimally impacting the large miners themselves. See [https://bitcointalk.org/index.php?topic=18313.msg816322#msg816322 recommended values].&lt;br /&gt;
** Appending &amp;quot;+1&amp;quot; (for example) after that will make P2Pool always give your miners work with a difficulty of 1&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
Lots of data and useful tools are available at http://127.0.0.1:9332/something:&lt;br /&gt;
* /static/ - Lots of information from shares to graphs to payouts.&lt;br /&gt;
* /rate&lt;br /&gt;
* /users&lt;br /&gt;
* /fee&lt;br /&gt;
* /current_payouts&lt;br /&gt;
* /patron_sendmany - Gives sendmany outputs for fair donations to P2Pool&lt;br /&gt;
* /global_stats&lt;br /&gt;
* /local_stats&lt;br /&gt;
* /peer_addresses&lt;br /&gt;
* /payout_addr&lt;br /&gt;
* /recent_blocks&lt;br /&gt;
* /uptime&lt;br /&gt;
* /web/log - Some different stats collected over the last day&lt;br /&gt;
&lt;br /&gt;
=== Included README ===&lt;br /&gt;
&amp;lt;pre&amp;gt;Requirements:&lt;br /&gt;
    Generic:&lt;br /&gt;
        Bitcoin &amp;gt;=0.6.0rc4 or Bitcoin &amp;gt;=0.5.4 (for BIP16 support) or Litecoin&lt;br /&gt;
        Python&lt;br /&gt;
        Twisted&lt;br /&gt;
        python-argparse (for Python &amp;lt;=2.6)&lt;br /&gt;
    &lt;br /&gt;
    Linux:&lt;br /&gt;
        sudo apt-get install python-zope.interface python-twisted python-twisted-web&lt;br /&gt;
        sudo apt-get install python-argparse # if on Python 2.6 or older&lt;br /&gt;
    &lt;br /&gt;
    Windows:&lt;br /&gt;
        Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
        Install Twisted: http://twistedmatrix.com/trac/wiki/Downloads&lt;br /&gt;
        Install Zope.Interface: http://pypi.python.org/pypi/zope.interface/3.8.0&lt;br /&gt;
            Unzip the files into C:\Python27\Lib\site-packages&lt;br /&gt;
&lt;br /&gt;
Running P2Pool:&lt;br /&gt;
    To use P2Pool, you must be running your own local bitcoind. For standard&lt;br /&gt;
    configurations, using P2Pool should be as simple as:&lt;br /&gt;
&lt;br /&gt;
        python run_p2pool.py&lt;br /&gt;
&lt;br /&gt;
    Then run your miner program, connecting to 127.0.0.1 on port 9332 with any&lt;br /&gt;
    username and password.&lt;br /&gt;
&lt;br /&gt;
    If you are behind a NAT, you should enable TCP port forwarding on your&lt;br /&gt;
    router. Forward port 9333 to the host running P2Pool.&lt;br /&gt;
&lt;br /&gt;
    Run &amp;quot;python run_p2pool.py --help&amp;quot; for additional options.&lt;br /&gt;
&lt;br /&gt;
Notes for Litecoin:&lt;br /&gt;
    Requirements:&lt;br /&gt;
        In order to run P2Pool with the Litecoin network, you would need to build and install the&lt;br /&gt;
        ltc_scrypt module that includes the scrypt proof of work code that Litecoin uses for hashes.&lt;br /&gt;
&lt;br /&gt;
        Linux:&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
        Windows:&lt;br /&gt;
            Install MinGW: http://www.mingw.org/wiki/Getting_Started&lt;br /&gt;
            Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            C:\Python27\python.exe setup.py build --compile=mingw32 install&lt;br /&gt;
&lt;br /&gt;
            If you run into an error with unrecognized command line option &#039;-mno-cygwin&#039;, see this:&lt;br /&gt;
                http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o&lt;br /&gt;
    &lt;br /&gt;
    Running P2Pool:&lt;br /&gt;
        Run P2Pool with the &amp;quot;--net litecoin&amp;quot; option.&lt;br /&gt;
        Run your miner program, connecting to 127.0.0.1 on port 9327.&lt;br /&gt;
        Forward port 9338 to the host running P2Pool.&lt;br /&gt;
        &lt;br /&gt;
        Litecoin&#039;s use of ports 9332 and 9332 conflicts with P2Pool running on&lt;br /&gt;
        the Bitcoin network. To avoid problems, add these lines to litecoin.conf&lt;br /&gt;
        and restart litecoind:&lt;br /&gt;
            rpcport=10332&lt;br /&gt;
            port=10333&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option Reference ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
usage: run_p2pool.py [-h] [--version] [--net {bitcoin,litecoin}] [--testnet]&lt;br /&gt;
                     [--debug] [-a ADDRESS] [--datadir DATADIR]&lt;br /&gt;
                     [--logfile LOGFILE] [--merged MERGED_URLS]&lt;br /&gt;
                     [--give-author DONATION_PERCENTAGE] [--iocp]&lt;br /&gt;
                     [--irc-announce] [--no-bugreport] [--p2pool-port PORT]&lt;br /&gt;
                     [-n ADDR[:PORT]] [--disable-upnp] [--max-conns CONNS]&lt;br /&gt;
                     [-w PORT or ADDR:PORT] [-f FEE_PERCENTAGE]&lt;br /&gt;
                     [--bitcoind-address BITCOIND_ADDRESS]&lt;br /&gt;
                     [--bitcoind-rpc-port BITCOIND_RPC_PORT]&lt;br /&gt;
                     [--bitcoind-p2p-port BITCOIND_P2P_PORT]&lt;br /&gt;
                     [BITCOIND_RPCUSERPASS [BITCOIND_RPCUSERPASS ...]]&lt;br /&gt;
&lt;br /&gt;
p2pool (version 0.11.1-8-ged9359d)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  --version             show program&#039;s version number and exit&lt;br /&gt;
  --net {bitcoin,litecoin}&lt;br /&gt;
                        use specified network (default: bitcoin)&lt;br /&gt;
  --testnet             use the network&#039;s testnet&lt;br /&gt;
  --debug               enable debugging mode&lt;br /&gt;
  -a ADDRESS, --address ADDRESS&lt;br /&gt;
                        generate payouts to this address (default: &amp;lt;address&lt;br /&gt;
                        requested from bitcoind&amp;gt;)&lt;br /&gt;
  --datadir DATADIR     store data in this directory (default: &amp;lt;directory&lt;br /&gt;
                        run_p2pool.py is in&amp;gt;/data)&lt;br /&gt;
  --logfile LOGFILE     log to this file (default: data/&amp;lt;NET&amp;gt;/log)&lt;br /&gt;
  --merged MERGED_URLS  call getauxblock on this url to get work for merged&lt;br /&gt;
                        mining (example:&lt;br /&gt;
                        http://ncuser:ncpass@127.0.0.1:10332/)&lt;br /&gt;
  --give-author DONATION_PERCENTAGE&lt;br /&gt;
                        donate this percentage of work towards the development&lt;br /&gt;
                        of p2pool (default: 0.5)&lt;br /&gt;
  --iocp                use Windows IOCP API in order to avoid errors due to&lt;br /&gt;
                        large number of sockets being open&lt;br /&gt;
  --irc-announce        announce any blocks found on&lt;br /&gt;
                        irc://irc.freenode.net/#p2pool&lt;br /&gt;
  --no-bugreport        disable submitting caught exceptions to the author&lt;br /&gt;
  --disable-upnp        don&#039;t attempt to use UPnP to forward p2pool&#039;s P2P port&lt;br /&gt;
                        from the Internet to this computer&lt;br /&gt;
&lt;br /&gt;
p2pool interface:&lt;br /&gt;
  --p2pool-port PORT    use port PORT to listen for connections (forward this&lt;br /&gt;
                        port from your router!) (default: bitcoin:9333,&lt;br /&gt;
                        litecoin:9338)&lt;br /&gt;
  -n ADDR[:PORT], --p2pool-node ADDR[:PORT]&lt;br /&gt;
                        connect to existing p2pool node at ADDR listening on&lt;br /&gt;
                        port PORT (defaults to default p2pool P2P port) in&lt;br /&gt;
                        addition to builtin addresses&lt;br /&gt;
  --max-conns CONNS     maximum incoming connections (default: 40)&lt;br /&gt;
&lt;br /&gt;
worker interface:&lt;br /&gt;
  -w PORT or ADDR:PORT, --worker-port PORT or ADDR:PORT&lt;br /&gt;
                        listen on PORT on interface with ADDR for RPC&lt;br /&gt;
                        connections from miners (default: all interfaces,&lt;br /&gt;
                        bitcoin:9332, litecoin:9327)&lt;br /&gt;
  -f FEE_PERCENTAGE, --fee FEE_PERCENTAGE&lt;br /&gt;
                        charge workers mining to their own bitcoin address (by&lt;br /&gt;
                        setting their miner&#039;s username to a bitcoin address)&lt;br /&gt;
                        this percentage fee to mine on your p2pool instance.&lt;br /&gt;
                        Amount displayed at http://127.0.0.1:WORKER_PORT/fee&lt;br /&gt;
                        (default: 0)&lt;br /&gt;
&lt;br /&gt;
bitcoind interface:&lt;br /&gt;
  --bitcoind-address BITCOIND_ADDRESS&lt;br /&gt;
                        connect to this address (default: 127.0.0.1)&lt;br /&gt;
  --bitcoind-rpc-port BITCOIND_RPC_PORT&lt;br /&gt;
                        connect to JSON-RPC interface at this port (default:&lt;br /&gt;
                        bitcoin:8332, litecoin:9332 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  --bitcoind-p2p-port BITCOIND_P2P_PORT&lt;br /&gt;
                        connect to P2P interface at this port (default:&lt;br /&gt;
                        bitcoin:8333, litecoin:9333 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  BITCOIND_RPCUSERPASS  bitcoind RPC interface username, then password, space-&lt;br /&gt;
                        separated (only one being provided will cause the&lt;br /&gt;
                        username to default to being empty, and none will&lt;br /&gt;
                        cause P2Pool to read them from bitcoin.conf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interoperability table ==&lt;br /&gt;
P2pool works fine with most hardware. This lists some of the hardware confirmed to work and any special configuration required.&lt;br /&gt;
&lt;br /&gt;
* ASICminer blade 10GH/s (Requires adding +1 to username or proxy)&lt;br /&gt;
* Avalon 110nm 60-110 GH/s (All batches)&lt;br /&gt;
* Avalon based 55nm 200 GH/s (specific makers?)&lt;br /&gt;
* Avalon prototype 55nm 120GH/s (~ 20 exist)&lt;br /&gt;
* Icarus FPGA&lt;br /&gt;
* Bitfury strikes back H-card and M-card ([https://bitcointalk.org/index.php?topic=18313.msg4424081#msg4424081 instructions])&lt;br /&gt;
* Bitmain Antminer S1 180GH/s ([https://github.com/AntMiner/AntGen1/tree/master/firmware Requires 20131226 firmware.])&lt;br /&gt;
* Bitmain Antminer S3 440GH/s&lt;br /&gt;
* BFL SC Jalapeno, SC Single 30, 50, &amp;amp; 60 GH/s&lt;br /&gt;
* Spondoolies Tech SP 10&lt;br /&gt;
* Spondoolies Tech SP 30&lt;br /&gt;
&lt;br /&gt;
(Various GPU and most FPGAs other than BFL single FPGAs work fine too)&lt;br /&gt;
&lt;br /&gt;
This is a list of hardware with known issues that should not be used on p2pool.&lt;br /&gt;
&lt;br /&gt;
* Cointerra Terraminer IV (10-20% hash rate loss when mining on p2pool)&lt;br /&gt;
* Btimain Antminer S2 (10-20% hash rate loss when mining on p2pool, the S1 &amp;amp; S3 both work well on p2pool)&lt;br /&gt;
&lt;br /&gt;
== Protocol description ==&lt;br /&gt;
&lt;br /&gt;
P2Pool&#039;s protocol mirrors Bitcoin&#039;s P2P protocol in many ways. It uses the same framing (prefix, command, length, checksum, payload) and similar commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;version&#039;&#039;&#039; - sent to establish a connection - contains (&#039;&#039;version&#039;&#039;, &#039;&#039;services&#039;&#039;, &#039;&#039;addr_to&#039;&#039;, &#039;&#039;addr_from&#039;&#039;, &#039;&#039;nonce&#039;&#039;, &#039;&#039;sub_version&#039;&#039;, &#039;&#039;mode&#039;&#039;, &#039;&#039;best_share_hash&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;setmode&#039;&#039;&#039; - sent to update the &#039;&#039;mode&#039;&#039; sent in the &#039;&#039;&#039;version&#039;&#039;&#039; message - contains (&#039;&#039;mode&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;ping&#039;&#039;&#039; - sent to keep connection alive - contains ()&lt;br /&gt;
* &#039;&#039;&#039;addrme&#039;&#039;&#039; - request that the receiving node send out an addr for the sending node - contains (&#039;&#039;port&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;addrs&#039;&#039;&#039; - broadcast list of nodes&#039; addresses - contains (&#039;&#039;addrs&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getaddrs&#039;&#039;&#039; - request that the receiving node send &#039;&#039;count&#039;&#039; addrs - contains (&#039;&#039;count&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getshares&#039;&#039;&#039; - request that the receiving node send the shares referenced by &#039;&#039;hashes&#039;&#039; and &#039;&#039;parents&#039;&#039; of their parents, stopping at any share referenced by &#039;&#039;stops&#039;&#039; - contains (&#039;&#039;hashes&#039;&#039;, &#039;&#039;parents&#039;&#039;, &#039;&#039;stops&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;shares&#039;&#039;&#039; - broadcast message of the contents of shares - contains (&#039;&#039;shares&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
This project was announced on June 17, 2011 by Forrest Voight&amp;lt;ref&amp;gt;[https://forum.bitcoin.org/index.php?topic=18313.0 p2pool: Decentralized, DoS-resistant, Hop-Proof - Now active on mainnet!]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The pool began testing against mainnet in mid-July, 2011.  The pool was reviewed on a [[Bitcoin Miner]] post on July 26, 2011&amp;lt;ref&amp;gt;[http://www.bitcoinminer.com/post/8101660461 P2Pool Decentralized Pool Nearly Ready For Prime-Time]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The software author&#039;s address for donations can be found in the signature section of his [http://forum.bitcoin.org/index.php?action=profile;u=6447 forum profile].&lt;br /&gt;
&lt;br /&gt;
==Donating to P2Pool miners==&lt;br /&gt;
In order to encourage people to mine to P2Pool you can donate to the recent miners in proportion using a sendmany:&lt;br /&gt;
&lt;br /&gt;
For example, a bash script to donate 10 btc is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can replace &amp;quot;&amp;quot; with &amp;quot;accountname&amp;quot; if you want to pay from some specific bitcoind account, and you need to replace 127.0.0.1 with the address of your P2Pool node if you&#039;re not running one locally.&lt;br /&gt;
&lt;br /&gt;
Note that the amount you donate will be allocated to recent miners in proportion to the amount of work they&#039;ve done in the last 24 hours or so, but all the miner whose shares of the donated amount are less than 0.01 BTC will have their shares combined into a single amount which is awarded to one of them at random, with the chance of winning this &#039;lottery&#039; weighted by the miner&#039;s recent amount of work done.  You can change this 0.01 BTC threshold like this, for example, which says to pay 10 BTC, but to share it amongst more miners that the default, cutting off at 0.001 BTC instead of at 0.01 BTC.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10/0.001)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you decide to donate you should announce it on the forums so that your donations provide the most incentive possible.&lt;br /&gt;
&lt;br /&gt;
==Sponsors==&lt;br /&gt;
&lt;br /&gt;
Thanks to:&lt;br /&gt;
&lt;br /&gt;
* The [https://bitcoinfoundation.org/ Bitcoin Foundation] for its generous support of P2Pool&lt;br /&gt;
* The [https://litecoin.org/ Litecoin Project] for its generous donations to P2Pool&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Comparison of mining pools]]&lt;br /&gt;
* [[Pooled Mining]]&lt;br /&gt;
* [[P2Pool code documentation]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [http://forum.bitcoin.org/index.php?topic=18313.0 P2Pool forum]&lt;br /&gt;
* [https://github.com/forrestv/p2pool p2pool] project on GitHub&lt;br /&gt;
* {{Freenode IRC|p2pool}} discussion and support&lt;br /&gt;
* [http://minefast.coincadence.com/p2pool-stats.php P2Pool Global Stats] stats page&lt;br /&gt;
* Up-to-date P2Pool mining stats: [http://minefast.coincadence.com/p2pool-stats.php Minefast.CoinCadence.com P2Pool stats]&lt;br /&gt;
* [http://p2pool.hostv.pl p2pool.hostv.pl] Public list of P2Pool BTC/LTC nodes.&lt;br /&gt;
* [http://p2pool-nodes.info/ p2pool-nodes.info] Another public list of P2Pool (BTC) nodes.&lt;br /&gt;
* [https://www.bitcoinmining.com/bitcoin-mining-pools/ Bitcoin Mining Pools]&lt;br /&gt;
* [http://whatisp2pool.com whatisp2pool.com] An easy introduction to mining and P2Pool.&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=18313 Bitcointalk thread]&lt;br /&gt;
* [http://organofcorti.blogspot.com/2012/11/52-p2pool-achieving-expectations.html?m=1 Statistical analysis of P2Pool from Neighborhood Pool Watch]&lt;br /&gt;
* [http://chimera.labs.oreilly.com/books/1234000001802/ch08.html#mining_pools P2Pool section] of &amp;lt;i&amp;gt;[[Mastering Bitcoin]]&amp;lt;/i&amp;gt; by [[Wikipedia:Andreas Antonopoulos|Andreas M. Antonopoulos]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Pool Operators]]&lt;br /&gt;
{{Pools}}&lt;/div&gt;</summary>
		<author><name>CoinCadence</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Comparison_of_mining_pools&amp;diff=57149</id>
		<title>Comparison of mining pools</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Comparison_of_mining_pools&amp;diff=57149"/>
		<updated>2015-07-04T17:32:12Z</updated>

		<summary type="html">&lt;p&gt;CoinCadence: Fixed P2Pool typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Reward types &amp;amp; explanation:&lt;br /&gt;
* &#039;&#039;&#039;CPPSRB&#039;&#039;&#039; - Capped Pay Per Share with Recent Backpay. [http://eligius.st/wiki/index.php/Capped_PPS_with_Recent_Backpay]&lt;br /&gt;
* &#039;&#039;&#039;DGM&#039;&#039;&#039; - Double Geometric Method.  A hybrid between PPLNS and Geometric reward types that enables to operator to absorb some of the variance risk.  Operator receives portion of payout on short rounds and returns it on longer rounds to normalize payments. [https://bitcointalk.org/index.php?topic=39497.0]&lt;br /&gt;
* &#039;&#039;&#039;ESMPPS&#039;&#039;&#039; - Equalized Shared Maximum Pay Per Share. Like SMPPS, but equalizes payments fairly among all those who are owed. [http://forum.bitcoin.org/index.php?topic=12181.msg378851#msg378851]&lt;br /&gt;
* &#039;&#039;&#039;POT&#039;&#039;&#039; - Pay On Target. A high variance PPS variant that pays on the difficulty of work returned to pool rather than the difficulty of work served by pool [https://bitcointalk.org/index.php?topic=131376.0]&lt;br /&gt;
* &#039;&#039;&#039;PPLNS&#039;&#039;&#039; - Pay Per Last N Shares. Similar to proportional, but instead of looking at the number of shares in the round, instead looks at the last N shares, regardless of round boundaries.&lt;br /&gt;
* &#039;&#039;&#039;PPLNSG&#039;&#039;&#039; - Pay Per Last N Groups (or shifts). Similar to PPLNS, but shares are grouped into &amp;quot;shifts&amp;quot; which are paid as a whole.&lt;br /&gt;
* &#039;&#039;&#039;PPS&#039;&#039;&#039; - Pay Per Share. Each submitted share is worth certain amoutripnt of BC. Since finding a block requires &amp;lt;current difficulty&amp;gt; shares &#039;&#039;on average&#039;&#039;, a PPS method with 0% fee would be 25 BTC divided by &amp;lt;current difficulty&amp;gt;. It is risky for pool operators, hence the fee is highest.&lt;br /&gt;
* &#039;&#039;&#039;Prop.&#039;&#039;&#039; - Proportional. When block is found, the reward is distributed among all workers proportionally to how much shares each of them has found.&lt;br /&gt;
* &#039;&#039;&#039;RSMPPS&#039;&#039;&#039; - Recent Shared Maximum Pay Per Share. Like SMPPS, but system aims to prioritize the most recent miners first. [http://eligius.st/wiki/index.php/Shared_Maximum_PPS]&lt;br /&gt;
* &#039;&#039;&#039;Score&#039;&#039;&#039; - Score based system: a proportional reward, but weighed by time submitted. Each submitted share is worth more in the function of time &#039;&#039;t&#039;&#039; since start of current round. For each share score is updated by: score += exp(t/C). This makes later shares worth much more than earlier shares, thus the miner&#039;s score quickly diminishes when they stop mining on the pool. Rewards are calculated proportionally to scores (and not to shares). (at slush&#039;s pool C=300 seconds, and every hour scores are normalized)&lt;br /&gt;
* &#039;&#039;&#039;SMPPS&#039;&#039;&#039; - Shared Maximum Pay Per Share. Like Pay Per Share, but never pays more than the pool earns. [http://eligius.st/wiki/index.php/Shared_Maximum_PPS]&lt;br /&gt;
[http://eligius.st/~luke-jr/samples/800MH-3/ Visual examples of the various payout methods]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name                !! Location             !! TH/s&amp;lt;ref name=&amp;quot;hashrate2&amp;quot;/&amp;gt;&lt;br /&gt;
!                                                         Merged Mining&amp;lt;ref name=&amp;quot;merged&amp;quot;/&amp;gt;&lt;br /&gt;
!                                                                    Reward Type             !! Transaction fees!!PPS Fee!!Other Fee!! [[File:Gwk.png|link=Getwork]] !! [[File:Stm.png|link=Stratum_mining_protocol]] !! [[getblocktemplate|GBT]]&lt;br /&gt;
! Launched   !! Variance                     !! Forum                                       !! Website&lt;br /&gt;
|-&lt;br /&gt;
| [[BitcoinAffiliateNetwork]]     || {{flag|us|}}{{flag|eu}}{{flag|cn|}}{{flag|nl|}}{{flag|au|}}      ||   2000   || [[NMC]], [[DOGE]] || PPS                    || {{PoolFees}}     ||   0% ||    0%    || {{No}} ||    {{Yes}}     ||&lt;br /&gt;
| 2014-07-15 || User/Dynamic           || [https://bitcointalk.org/index.php?topic=722202.0  link] || [http://mining.bitcoinaffiliatenetwork.com/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Bitcoin Pooled Mining|Slush&#039;s pool (mining.bitcoin.cz)]]&lt;br /&gt;
|                        Global               || 12000 || No || Score                   || {{SharedFees}}   ||      ||      2% ||         || {{Yes}} ||&lt;br /&gt;
| 2010-11-27 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt; || [http://bitcointalk.org/?topic=1976   link] || [http://mining.bitcoin.cz/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[BitMinter]]       || {{flag|us}}{{flag|de}}          || 2700 || [[NMC]] || PPLNSG                  || {{SharedFees}}   ||      ||      1% || {{Yes}} || {{Yes}} || {{Yes}}&lt;br /&gt;
| 2011-06-26 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt;/Dynamic || [http://bitcointalk.org/?topic=27062  link] || [https://bitminter.com link]&lt;br /&gt;
|-&lt;br /&gt;
| [[BTC Guild]]       || {{flag|us}}{{flag|eu}}    || 10500 || [[NMC]] &lt;br /&gt;
|                                                                    PPLNSG              || {{SharedFees}} ||    ||      2% || {{Yes}} || {{Yes}} || {{No}}&lt;br /&gt;
| 2011-05-09 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt;/Dynamic&lt;br /&gt;
|                                               [http://bitcointalk.org/?topic=49417  link] || [https://www.btcguild.com/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[BTCMine]]         || {{flag|us|label=1}}                   ||    0.1 || No      || Score                   || {{PoolFees}}     ||      ||      0% || {{Yes}} ||         ||&lt;br /&gt;
| 2011-03-11 || Diff 1                       || [http://bitcointalk.org/?topic=4251   link] || [http://btcmine.com/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[BTCDig]]         || {{flag|us|label=1}}||    7 || No      || DGM                   || {{PoolFees}}     ||      ||      0% ||  ||  {{Yes}}     ||&lt;br /&gt;
| 2013-07-04 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt;/Dynamic 20SPM                      || [https://bitcointalk.org/index.php?topic=249627   link] || [http://btcdig.com/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[btcmp.com]]       || {{flag|de|label=1}}||    1.4 || No      || PPS                     || {{PoolFees}}     ||   4% ||         || {{Yes}} ||         ||&lt;br /&gt;
| 2011-06-28 || Diff 1                       ||                                             || [http://www.btcmp.com/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[CKPool]]         || {{flag|us|label=1}} || 3500 || No      || PPLNS                 || {{SharedFees}}     ||      ||      0.9% || {{No}} || {{Yes}} || {{No}}&lt;br /&gt;
| 2014-09-20 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt;/Dynamic 18SPM || [https://bitcointalk.org/index.php?topic=789369.0 link]   || [http://www.kano.is link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Eclipse Mining Consortium]]&lt;br /&gt;
|                   Global ||  246 || No      || DGM/PPS                 || {{PoolFees}}     ||   5% ||      0% || {{Yes}} || {{Yes}} || {{Yes}}&lt;br /&gt;
| 2011-06-14 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt;/Dynamic&lt;br /&gt;
|                                               [http://bitcointalk.org/?topic=16385  link] || [https://eclipsemc.com link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Eligius]]         || {{flag|us|label=1}}|| 4000 || [[NMC]] 105% PPS&amp;lt;ref name=&amp;quot;eligiusnmc&amp;quot;/&amp;gt;      || CPPSRB                  || {{SharedFees}}   ||   0% ||         || {{Yes}} || {{Yes}} || {{Yes}}&lt;br /&gt;
| 2011-04-27 || Dynamic: 32 shares/m         || [http://bitcointalk.org/?topic=23768  link] || [http://eligius.st link]&lt;br /&gt;
|-&lt;br /&gt;
| [[GHash.IO]]        || {{flag|nl|label=1}}|| 60000 || [[NMC]], IXC, [[Devcoin]]      || PPLNS                  || {{SharedFees}}   || 0%      ||      0% || {{No}} || {{Yes}} || {{No}}&lt;br /&gt;
| 2013-07-01 ||           User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt; ||   [https://support.cex.io  link]                                || [https://ghash.io/  link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Give Me COINS]]   || {{flag|us}}{{flag|eu}}          || 1000 || [[NMC]]   || PPLNS                  || {{SharedFees}}     ||    ||  0%|| {{No}} || {{Yes}} || {{Yes}}&lt;br /&gt;
| 2013-08-12 || Dynamic         || [https://bitcointalk.org/index.php?topic=272017.0  link] || [http://give-me-coins.com link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Merge Mining Pool]]      || {{flag|us|label=1}}|| 50 || [[NMC]], IXC, [[Devcoin]]&lt;br /&gt;
|                                                                    DGM                     || {{SharedFees}}     ||      || 1.5%    || {{No}} || {{Yes}}    || {{No}}&lt;br /&gt;
| 2012-01-08 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt; || [http://bitcointalk.org/?topic=57148  link] || [http://mmpool.org link]&lt;br /&gt;
|-&lt;br /&gt;
| [[MinerGate]]      || {{flag|eu|label=1}}||     || Yes      || PPS, PPLNS         || {{PoolFees}}     ||   2.5% || 2%        || {{Yes}} || {{Yes}} || {{No}}&lt;br /&gt;
| 2014-03-24 || Dynamic                    || [https://bitcointalk.org/index.php?topic=528848.0 link] || [http://minergate.com/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Multipool]]          || {{flag|us}}{{flag|eu}}      ||   400 || [[NMC]], IXC, [[Devcoin]] || Prop.                     || {{SharedFees}}     ||      ||      0% || {{Yes}} ||     {{Yes}}     || {{No}}&lt;br /&gt;
| 2012-03-15 || User                       || [https://bitcointalk.org/index.php?topic=311067.0  link] || [https://www.multipool.us/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Ozco.in]]         || {{flag|us}}{{flag|eu}}{{flag|au}}{{flag|cn}} ||  4 || No || DGM      || {{SharedFees}} ||    ||   1% || {{No}}  || {{Yes}} || {{No}}&lt;br /&gt;
| 2011-06-07 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt;/Dynamic&lt;br /&gt;
|   [http://bitcointalk.org/?topic=14085  link] || [https://ozco.in link]                                   &lt;br /&gt;
|-&lt;br /&gt;
| [[P2Pool]]          || Global (p2p)          ||   800 || Solo&amp;lt;ref name=&amp;quot;solomm&amp;quot;/&amp;gt; || PPLNS  || {{SharedFees}}   ||      ||      0% || {{No}}&amp;lt;ref name=&amp;quot;local&amp;quot;/&amp;gt; || {{Yes}} || {{No}}&lt;br /&gt;
| 2011-06-17 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt; || [http://bitcointalk.org/?topic=18313  link] ||&lt;br /&gt;
|-&lt;br /&gt;
| [[PolMine]]        || {{flag|pl|label=1}}||  700 || [[NMC]]      || SMPPS                  || {{SharedFees}}  ||  1% ||   0%     || {{Yes}} || {{Yes}}        || {{Yes}}	 	&lt;br /&gt;
| 2011-06-13 || Dynamic/User                      || [http://forum.polmine.pl/ link]            || [https://polmine.pl/?setlang=en link]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SPV Mining / Old Bitcoin Core ==&lt;br /&gt;
&lt;br /&gt;
The following pools are known or strongly suspected to be mining on top of blocks before fully validating them with Bitcoin Core 0.9.5 or later.  Miners doing this have already lost over $50,000 USD during the 4 July 2015 fork and have created a situation where small numbers of confirmations are much less useful than they normally are.&lt;br /&gt;
&lt;br /&gt;
* BTC Nuggets&lt;br /&gt;
&lt;br /&gt;
The following pools are believed to be currently fully validating blocks with Bitcoin Core 0.9.5 or later (0.10.2 or later recommended due to DoS vulnerabilities):&lt;br /&gt;
&lt;br /&gt;
* [[BitMinter]]&lt;br /&gt;
* [[Eligius]]&lt;br /&gt;
* [[CKPool]]&lt;br /&gt;
* [[P2Pool]]&lt;br /&gt;
* [https://www.f2pool.com/ F2Pool]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hashrate2&amp;quot;&amp;gt;Note that pool hashrate is largely irrelevant but can be seen as a popularity measurement. Note however that it is a theoretical security issue if one pool gains above 50% of the total computational power of the network, thus consider joining a pool based on other metrics.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;merged&amp;quot;&amp;gt;Merged mining allows miners to mine on multiple [[block chains]] at the same time with the same hashing.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;local&amp;quot;&amp;gt;Miner-operated proxy available.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;changeable&amp;quot;&amp;gt;The difficulty of the shares can be changed by the user.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;solomm&amp;quot;&amp;gt;Merged mining can be done on a &amp;quot;solo mining&amp;quot; basis (payouts in the merged chain are not pooled).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;eligiusnmc&amp;quot;&amp;gt;As of March 8, 2014, payouts have been labelled as broken by the pool operator.  There is no current ETA to a fix.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Pooled mining]]&lt;br /&gt;
* [http://blockorigin.pfoe.be/chart.php Hashrate distribution pie chart]&lt;br /&gt;
* [https://www.bitcoinmining.com/ Bitcoin Mining]&lt;br /&gt;
* [https://www.youtube.com/watch?v=GmOzih6I1zs Video: What is Bitcoin Mining]&lt;br /&gt;
* [http://www.bitcoinmining.com/bitcoin-mining-pools/ Bitcoin Mining Pools]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mining]]&lt;br /&gt;
{{Pools}}&lt;/div&gt;</summary>
		<author><name>CoinCadence</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=50371</id>
		<title>P2Pool</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=50371"/>
		<updated>2014-08-20T12:56:46Z</updated>

		<summary type="html">&lt;p&gt;CoinCadence: /* Interoperability table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{infobox company|name=P2Pool&lt;br /&gt;
|trading_name=P2Pool&lt;br /&gt;
|industry=[[Mining pool]]&lt;br /&gt;
|foundation=July 17, 2011&lt;br /&gt;
|hashrate=1.6 Phash/s&lt;br /&gt;
}}&lt;br /&gt;
Links: http://p2pool.in/ - https://github.com/forrestv/p2pool - https://en.bitcoin.it/wiki/P2Pool - https://bitcointalk.org/index.php?topic=18313&lt;br /&gt;
&lt;br /&gt;
[[Image:P2pool_chain.png‎|thumb|350px|right|Visualization of the P2Pool share chain]]&lt;br /&gt;
P2Pool is a decentralized [[Bitcoin]] [[Bitcoin Pool|mining pool]] that works by creating a peer-to-peer network of miner nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;P2Pool creates a new block chain in which the difficulty is adjusted so a new block is found every 30 seconds. The blocks that get into the P2Pool block chain (called the &amp;quot;share chain&amp;quot;) are the same blocks that would get into the Bitcoin block chain, only they have a lower difficulty target. Whenever a peer announces a new share found (new block in the P2Pool block chain), it is received by the other peers, and the other peers verify that this block contains payouts for all the previous miners who found a share (and announced it) that made it into the P2Pool share chain. This continues until some peer finds a block that has a difficulty that meets the Bitcoin network&#039;s difficulty target. This peer announces this block to the Bitcoin network and miners who have submitted shares for this block are paid in the generation transaction, proportionally to how many shares they have found in the last while. - Unknown author&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Decentralized payout pooling solves the problem of centralized mining pools degrading the decentralization of Bitcoin and avoids the risk of hard to detect theft by pool operators.&lt;br /&gt;
&lt;br /&gt;
Miners are configured to connect to a P2Pool node that can be run locally, alongside the miner. P2Pool users must run a full Bitcoin node which serves the purpose of independently validating transactions and the Bitcoin blockchain. P2Pool also supports merged mining and several alternative blockchains.&lt;br /&gt;
&lt;br /&gt;
P2Pool nodes work on a chain of shares similar to Bitcoin&#039;s blockchain. Each node works on a block that includes payouts to the previous shares&#039; owners and the node itself, which can also result in a share if it meets P2Pool&#039;s difficulty.&lt;br /&gt;
&lt;br /&gt;
Because of the importance of strengthening Bitcoin&#039;s decentralization, some Bitcoin supporters donate to P2Pool miners, resulting in average returns above 100% of the expected reward.&lt;br /&gt;
However, it should be noted that there are other pools (such as [[BitPenny]] and [[Eligius]]) which can provide this same level of decentralization.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
P2Pool shares form a &amp;quot;sharechain&amp;quot; with each share referencing the previous share&#039;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&#039;s hash, and the current target for shares), and a Merkle branch linking that generation transaction to the block header&#039;s Merkle hash.&lt;br /&gt;
&lt;br /&gt;
The chain continuously regulates its target to keep generation around one share every thirty seconds, just as Bitcoin regulates it to generate one block every ten minutes.&lt;br /&gt;
This means that finding shares becomes more difficult (resulting in higher variance) the more people mine on P2Pool, though large miners have the option to raise their difficulty, and so reduce the impact of their mining on P2Pool&#039;s minimum difficulty.&lt;br /&gt;
&lt;br /&gt;
Unlike Bitcoin, nodes do not know the entire chain - instead they only hold the last 8640 shares (the last 3 day&#039;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 that the shares reference, establishing a provable timestamp. (If a share points to a block, it was definitely made after that block was made.)&lt;br /&gt;
&lt;br /&gt;
=== Payout logic ===&lt;br /&gt;
&lt;br /&gt;
Each share contains a generation transaction that pays to the previous &#039;&#039;n&#039;&#039; shares, where &#039;&#039;n&#039;&#039; is the number of shares whose total work is equal to 3 times the average work required to solve a block, or 8640 (= 24 hours of shares), whichever is smaller. Payouts are weighted based on the amount of work each share took to solve, which is proportional to the p2pool difficulty at that time.&lt;br /&gt;
&lt;br /&gt;
The block reward (currently 25BTC) and the transaction fees are combined and apportioned according to these rules:&lt;br /&gt;
&lt;br /&gt;
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. (A miner with the aim to harm others could withhold the block, thereby preventing anybody from getting paid. He can NOT redirect the payout to himself.) The remaining 99.5% is distributed evenly to miners based on work done recently.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Stales ===&lt;br /&gt;
&lt;br /&gt;
On P2Pool stales refer to shares which can&#039;t make it into the sharechain.  Because the sharechain is 20 times faster than the Bitcoin chain many stales are common and expected. However, because the payout is [[Comparison_of_mining_pools|PPLNS]] only your stale rate relative to other nodes is relevant; the absolute rate is not.&lt;br /&gt;
&lt;br /&gt;
There are two reported kinds of stales in P2Pool: &amp;quot;DEAD ON ARRIVAL&amp;quot; shares and orphan shares. Dead shares were too old by the time they arrived at your local P2Pool. Very high dead rates can indicate miner misconfiguration. Orphan shares are shares which were not extended by the rest of the P2Pool network, because some other miner&#039;s share was accepted first. Very high orphan rates may indicate network connectivity problems. &lt;br /&gt;
&lt;br /&gt;
The P2Pool console output shows your relative stale rate compared to other P2Pool miners in the &#039;Own efficiency&#039; column:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2012-01-07 20:57:51.797420 Pool stales: 13% Own: 13±2% Own efficiency: 100±2%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you first start P2Pool claimed efficiency will be low and the error bounds on this estimate will be large, but as it runs the numbers will converge to their correct values.&lt;br /&gt;
&lt;br /&gt;
If your efficiency is unusually low, make sure your network connection isn&#039;t overloaded, that your miners support long polling and are not set to work for excessive amounts of time, and that your bitcoind has multiple connections.&lt;br /&gt;
&lt;br /&gt;
== Joining the pool ==&lt;br /&gt;
&lt;br /&gt;
Follow these steps to join the pool:&lt;br /&gt;
&lt;br /&gt;
* Run Bitcoin with the RPC interface enabled: edit bitcoin.conf to include:&lt;br /&gt;
 rpcuser=USER&lt;br /&gt;
 rpcpassword=LONG_RANDOM_SECRET_VALUE&lt;br /&gt;
 server=1&lt;br /&gt;
**&#039;&#039;&#039;Replace LONG_RANDOM_SECRET_VALUE with something long and random like the output of smashing your keyboard for a bit like fju4M78yAj3ds39pak92raK&#039;&#039;&#039;. You don&#039;t need to be able to remember it. If your RPC port becomes exposed to the internet a thief could steal your bitcoin if they could guess it, or use a brute force attack in order to find it.&lt;br /&gt;
** Bitcoin 0.8.5 or later is required&lt;br /&gt;
** It&#039;s important that your Bitcoin client be fully synchronized before starting. It&#039;s also better if you have the Bitcoin port forwarded&lt;br /&gt;
* Download p2pool:&lt;br /&gt;
** Windows binary: See http://forum.bitcoin.org/index.php?topic=18313.0&lt;br /&gt;
** Source download: https://github.com/forrestv/p2pool/tags&lt;br /&gt;
** git: git clone git://github.com/forrestv/p2pool.git&lt;br /&gt;
* Run p2pool: (See below for additional options.)&lt;br /&gt;
** Windows py2exe: run_p2pool.exe&lt;br /&gt;
** Source: python run_p2pool.py&lt;br /&gt;
* Run a miner daemon with long polling connecting to 127.0.0.1 (or the IP of the host running p2pool if it isn&#039;t on the same computer as the miner) on port 9332 with any username and password&lt;br /&gt;
** bfgminer -O u:p -o http://127.0.0.1:9332/ --submit-stales&lt;br /&gt;
&lt;br /&gt;
Dependencies if running from source:&lt;br /&gt;
* Python 2.6 or higher (but not 3.x)&lt;br /&gt;
* python-argparse&lt;br /&gt;
* Twisted (Ubuntu package python-twisted)&lt;br /&gt;
&lt;br /&gt;
=== Frequently Asked Questions ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Why does my miner report so many longpoll events when mining on p2pool? - P4Man&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; &amp;quot;Once every ~30 seconds is normal. That is how often p2pool shares are generated (as opposed to ~10 min for bitcoin blocks) - cabin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Do the &#039;orphan&#039; and &#039;dead&#039; shares in P2Pool&#039;s status display hurt me?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; They shouldn&#039;t - It&#039;s normal for some fraction of everyone&#039;s shares to end up orphaned or dead. Because payouts are calculated by counting how many shares you have relative to others, everyone with normal configurations is equally &amp;quot;hurt&amp;quot; by this. However, if you have a large proportion of stales, your payout will be hurt. You can see how well you&#039;re doing by looking at P2Pool&#039;s &amp;quot;Efficiency&amp;quot; (ex: &#039;&#039;Efficiency: ~110.6% (40-111%)&#039;&#039;). If 100% doesn&#039;t lie within the [http://en.wikipedia.org/wiki/Confidence_interval confidence interval] at the end, something is probably wrong (with 95% confidence).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;What do I do if my efficiency is low?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Make sure the computers you&#039;re running P2Pool and the miner on have enough memory and CPU time. If you have a lot of dead shares or the &amp;quot;Local dead on arrival&amp;quot; number is higher than a few percent, that means that something is wrong with your miner. Check to make sure that it is one of the working versions in the &#039;&#039;Miners&#039;&#039; section on this page. Lower the intensity or raise the FPS of your miner. If you have a lot of orphan shares, something is wrong with P2Pool&#039;s P2P connection. Decrease the load on your internet connection or enable QoS (Quality of Service) on your router.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What is PPLNS?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Pay-Per-Last-N-Shares is a payout method that is completely resistant to pool hoppers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I not getting very many shares?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The P2Pool difficulty is hundreds of times higher than on other pools. It can take time to get a share. P2Pool displays an estimate of how long you have to wait in the console output.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does my miner say it has found a lot of shares but p2pool say I have only found a few?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The real P2Pool difficulty is hundreds of times higher than on normal pools, but p2pool essentially lies to your miner and tells it to work on relatively easy shares so that it submits shares every few seconds instead of every few hours.  P2Pool then ignores any submitted shares that don&#039;t match the real share difficulty.  By doing this, P2Pool can more accurately report your local hash rate and you can see if you are having problems with too many stale shares quickly&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I getting so many rejects?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; You&#039;re using an incompatible miner. See the miners section here, increase your FPS on the miner, decrease the intensity, upgrade your miner, or try a different miner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What stops the pool operator or the block finder from stealing a block?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; A block solution is only worth anything because its hash matches Bitcoin&#039;s target. Altering anything within the block will change its hash and make it worthless. If you are concerned about the pool operator stealing a block, you should try to inspect the source code of each new version.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does it say &amp;quot;Generated?&amp;quot; I want to spend my coins now!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; P2Pool includes payouts in generation transactions, which must mature (taking 120 blocks or 20 hours) before they can be spent. The reason for this is that a block could be orphaned, which would make its payout invalid and could reverse transactions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I get paid transaction fees?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. They are split among P2Pool miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What are these payments I&#039;m getting that aren&#039;t generated?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; These are subsidies that people who support the idea of P2Pool send to miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Cool Subsidies sound like an awesome idea! How do I send some BTC to these awesome miners?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; See end of this page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I really need the WHOLE blockchain?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. Your node needs to be able to independently make decisions about what transactions to mine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; How do merged mining payments work?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Merged mining is handled entirely by namecoind, so you&#039;re solo mining and payouts will go into namecoind&#039;s wallet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Miners ===&lt;br /&gt;
&lt;br /&gt;
This is all for the latest p2pool version, as it includes several new workarounds. &lt;br /&gt;
&lt;br /&gt;
With all miners, using a HIGH FPS target (100?) or a LOW intensity (8 for bfgminer?) helps a lot with reducing stales.&lt;br /&gt;
&lt;br /&gt;
* bfgminer, cgminer, and ufasoft work perfectly without any extra options.&lt;br /&gt;
* DiabloMiner works fine after commit 3b731b9.&lt;br /&gt;
* Phoenix works fine after commit a658ef2.&lt;br /&gt;
* Poclbm works fine after commit 5e994e7.&lt;br /&gt;
&lt;br /&gt;
P2Pool uses higher difficulty shares than most centralized pools, so you&#039;ll see fewer shares reported. This is normal and doesn&#039;t reduce your payments.  It&#039;s also normal to see longpoll messages once per every ten seconds on average.&lt;br /&gt;
&lt;br /&gt;
====Tips to configure bfgminer to reduce stale/doa:====&lt;br /&gt;
* &amp;quot;gpu-threads&amp;quot; : &amp;quot;1&amp;quot;, (2 by default)&lt;br /&gt;
* &amp;quot;queue&amp;quot; : &amp;quot;0&amp;quot;, (1 by default)&lt;br /&gt;
&lt;br /&gt;
Because of fast longpooling in p2pool it is better not NOT fetch work ahead.&lt;br /&gt;
&lt;br /&gt;
On non-dedicated machines intensity=3 allows normal usage of PC, set it to 7 or more to get full hashrate.&lt;br /&gt;
&lt;br /&gt;
On most cards best is diablo and phatk kernel, looks like poclbm kernel have unstable rate.&lt;br /&gt;
&lt;br /&gt;
=== Useful features ===&lt;br /&gt;
&lt;br /&gt;
* If upgrading P2Pool or changing its configuration, you can start another instance of P2Pool in parallel with the first. It will start normally, but realize that the worker and P2P listening ports are busy and keep trying to bind to them in the background. Thus, you can do almost-completely-seamless upgrades of P2Pool.&lt;br /&gt;
* If you run multiple P2Pool nodes or have trusted friends that run P2Pool, you can use &#039;&#039;-n&#039;&#039; to establish a constant extra P2P connection to them.&lt;br /&gt;
* You can make P2Pool use a configuration file by running run_p2pool.py @FILENAME, with FILENAME being the path to a file containing the command-line arguments (newlines are ignored) Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--net bitcoin&lt;br /&gt;
-n 1.2.3.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Setting the username of your miner connecting to P2Pool to a Bitcoin address will make it mine to that address instead of the one requested from bitcoind or set by -a&lt;br /&gt;
* Appending &amp;quot;/1000&amp;quot; to a miner&#039;s username will increase the difficulty of producing a P2Pool share to at most 1000. This is useful to large miners because doing this can make it easier for small miners while minimally impacting the large miners themselves. See [https://bitcointalk.org/index.php?topic=18313.msg816322#msg816322 recommended values].&lt;br /&gt;
** Appending &amp;quot;+1&amp;quot; (for example) after that will make P2Pool always give your miners work with a difficulty of 1&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
Lots of data and useful tools are available at http://127.0.0.1:9332/something:&lt;br /&gt;
* /static/ - Lots of information from shares to graphs to payouts.&lt;br /&gt;
* /rate&lt;br /&gt;
* /users&lt;br /&gt;
* /fee&lt;br /&gt;
* /current_payouts&lt;br /&gt;
* /patron_sendmany - Gives sendmany outputs for fair donations to P2Pool&lt;br /&gt;
* /global_stats&lt;br /&gt;
* /local_stats&lt;br /&gt;
* /peer_addresses&lt;br /&gt;
* /payout_addr&lt;br /&gt;
* /recent_blocks&lt;br /&gt;
* /uptime&lt;br /&gt;
* /web/log - Some different stats collected over the last day&lt;br /&gt;
&lt;br /&gt;
=== Included README ===&lt;br /&gt;
&amp;lt;pre&amp;gt;Requirements:&lt;br /&gt;
    Generic:&lt;br /&gt;
        Bitcoin &amp;gt;=0.6.0rc4 or Bitcoin &amp;gt;=0.5.4 (for BIP16 support) or Litecoin&lt;br /&gt;
        Python&lt;br /&gt;
        Twisted&lt;br /&gt;
        python-argparse (for Python &amp;lt;=2.6)&lt;br /&gt;
    &lt;br /&gt;
    Linux:&lt;br /&gt;
        sudo apt-get install python-zope.interface python-twisted python-twisted-web&lt;br /&gt;
        sudo apt-get install python-argparse # if on Python 2.6 or older&lt;br /&gt;
    &lt;br /&gt;
    Windows:&lt;br /&gt;
        Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
        Install Twisted: http://twistedmatrix.com/trac/wiki/Downloads&lt;br /&gt;
        Install Zope.Interface: http://pypi.python.org/pypi/zope.interface/3.8.0&lt;br /&gt;
            Unzip the files into C:\Python27\Lib\site-packages&lt;br /&gt;
&lt;br /&gt;
Running P2Pool:&lt;br /&gt;
    To use P2Pool, you must be running your own local bitcoind. For standard&lt;br /&gt;
    configurations, using P2Pool should be as simple as:&lt;br /&gt;
&lt;br /&gt;
        python run_p2pool.py&lt;br /&gt;
&lt;br /&gt;
    Then run your miner program, connecting to 127.0.0.1 on port 9332 with any&lt;br /&gt;
    username and password.&lt;br /&gt;
&lt;br /&gt;
    If you are behind a NAT, you should enable TCP port forwarding on your&lt;br /&gt;
    router. Forward port 9333 to the host running P2Pool.&lt;br /&gt;
&lt;br /&gt;
    Run &amp;quot;python run_p2pool.py --help&amp;quot; for additional options.&lt;br /&gt;
&lt;br /&gt;
Notes for Litecoin:&lt;br /&gt;
    Requirements:&lt;br /&gt;
        In order to run P2Pool with the Litecoin network, you would need to build and install the&lt;br /&gt;
        ltc_scrypt module that includes the scrypt proof of work code that Litecoin uses for hashes.&lt;br /&gt;
&lt;br /&gt;
        Linux:&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
        Windows:&lt;br /&gt;
            Install MinGW: http://www.mingw.org/wiki/Getting_Started&lt;br /&gt;
            Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            C:\Python27\python.exe setup.py build --compile=mingw32 install&lt;br /&gt;
&lt;br /&gt;
            If you run into an error with unrecognized command line option &#039;-mno-cygwin&#039;, see this:&lt;br /&gt;
                http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o&lt;br /&gt;
    &lt;br /&gt;
    Running P2Pool:&lt;br /&gt;
        Run P2Pool with the &amp;quot;--net litecoin&amp;quot; option.&lt;br /&gt;
        Run your miner program, connecting to 127.0.0.1 on port 9327.&lt;br /&gt;
        Forward port 9338 to the host running P2Pool.&lt;br /&gt;
        &lt;br /&gt;
        Litecoin&#039;s use of ports 9332 and 9332 conflicts with P2Pool running on&lt;br /&gt;
        the Bitcoin network. To avoid problems, add these lines to litecoin.conf&lt;br /&gt;
        and restart litecoind:&lt;br /&gt;
            rpcport=10332&lt;br /&gt;
            port=10333&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option Reference ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
usage: run_p2pool.py [-h] [--version] [--net {bitcoin,litecoin}] [--testnet]&lt;br /&gt;
                     [--debug] [-a ADDRESS] [--datadir DATADIR]&lt;br /&gt;
                     [--logfile LOGFILE] [--merged MERGED_URLS]&lt;br /&gt;
                     [--give-author DONATION_PERCENTAGE] [--iocp]&lt;br /&gt;
                     [--irc-announce] [--no-bugreport] [--p2pool-port PORT]&lt;br /&gt;
                     [-n ADDR[:PORT]] [--disable-upnp] [--max-conns CONNS]&lt;br /&gt;
                     [-w PORT or ADDR:PORT] [-f FEE_PERCENTAGE]&lt;br /&gt;
                     [--bitcoind-address BITCOIND_ADDRESS]&lt;br /&gt;
                     [--bitcoind-rpc-port BITCOIND_RPC_PORT]&lt;br /&gt;
                     [--bitcoind-p2p-port BITCOIND_P2P_PORT]&lt;br /&gt;
                     [BITCOIND_RPCUSERPASS [BITCOIND_RPCUSERPASS ...]]&lt;br /&gt;
&lt;br /&gt;
p2pool (version 0.11.1-8-ged9359d)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  --version             show program&#039;s version number and exit&lt;br /&gt;
  --net {bitcoin,litecoin}&lt;br /&gt;
                        use specified network (default: bitcoin)&lt;br /&gt;
  --testnet             use the network&#039;s testnet&lt;br /&gt;
  --debug               enable debugging mode&lt;br /&gt;
  -a ADDRESS, --address ADDRESS&lt;br /&gt;
                        generate payouts to this address (default: &amp;lt;address&lt;br /&gt;
                        requested from bitcoind&amp;gt;)&lt;br /&gt;
  --datadir DATADIR     store data in this directory (default: &amp;lt;directory&lt;br /&gt;
                        run_p2pool.py is in&amp;gt;/data)&lt;br /&gt;
  --logfile LOGFILE     log to this file (default: data/&amp;lt;NET&amp;gt;/log)&lt;br /&gt;
  --merged MERGED_URLS  call getauxblock on this url to get work for merged&lt;br /&gt;
                        mining (example:&lt;br /&gt;
                        http://ncuser:ncpass@127.0.0.1:10332/)&lt;br /&gt;
  --give-author DONATION_PERCENTAGE&lt;br /&gt;
                        donate this percentage of work towards the development&lt;br /&gt;
                        of p2pool (default: 0.5)&lt;br /&gt;
  --iocp                use Windows IOCP API in order to avoid errors due to&lt;br /&gt;
                        large number of sockets being open&lt;br /&gt;
  --irc-announce        announce any blocks found on&lt;br /&gt;
                        irc://irc.freenode.net/#p2pool&lt;br /&gt;
  --no-bugreport        disable submitting caught exceptions to the author&lt;br /&gt;
  --disable-upnp        don&#039;t attempt to use UPnP to forward p2pool&#039;s P2P port&lt;br /&gt;
                        from the Internet to this computer&lt;br /&gt;
&lt;br /&gt;
p2pool interface:&lt;br /&gt;
  --p2pool-port PORT    use port PORT to listen for connections (forward this&lt;br /&gt;
                        port from your router!) (default: bitcoin:9333,&lt;br /&gt;
                        litecoin:9338)&lt;br /&gt;
  -n ADDR[:PORT], --p2pool-node ADDR[:PORT]&lt;br /&gt;
                        connect to existing p2pool node at ADDR listening on&lt;br /&gt;
                        port PORT (defaults to default p2pool P2P port) in&lt;br /&gt;
                        addition to builtin addresses&lt;br /&gt;
  --max-conns CONNS     maximum incoming connections (default: 40)&lt;br /&gt;
&lt;br /&gt;
worker interface:&lt;br /&gt;
  -w PORT or ADDR:PORT, --worker-port PORT or ADDR:PORT&lt;br /&gt;
                        listen on PORT on interface with ADDR for RPC&lt;br /&gt;
                        connections from miners (default: all interfaces,&lt;br /&gt;
                        bitcoin:9332, litecoin:9327)&lt;br /&gt;
  -f FEE_PERCENTAGE, --fee FEE_PERCENTAGE&lt;br /&gt;
                        charge workers mining to their own bitcoin address (by&lt;br /&gt;
                        setting their miner&#039;s username to a bitcoin address)&lt;br /&gt;
                        this percentage fee to mine on your p2pool instance.&lt;br /&gt;
                        Amount displayed at http://127.0.0.1:WORKER_PORT/fee&lt;br /&gt;
                        (default: 0)&lt;br /&gt;
&lt;br /&gt;
bitcoind interface:&lt;br /&gt;
  --bitcoind-address BITCOIND_ADDRESS&lt;br /&gt;
                        connect to this address (default: 127.0.0.1)&lt;br /&gt;
  --bitcoind-rpc-port BITCOIND_RPC_PORT&lt;br /&gt;
                        connect to JSON-RPC interface at this port (default:&lt;br /&gt;
                        bitcoin:8332, litecoin:9332 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  --bitcoind-p2p-port BITCOIND_P2P_PORT&lt;br /&gt;
                        connect to P2P interface at this port (default:&lt;br /&gt;
                        bitcoin:8333, litecoin:9333 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  BITCOIND_RPCUSERPASS  bitcoind RPC interface username, then password, space-&lt;br /&gt;
                        separated (only one being provided will cause the&lt;br /&gt;
                        username to default to being empty, and none will&lt;br /&gt;
                        cause P2Pool to read them from bitcoin.conf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interoperability table ==&lt;br /&gt;
P2pool works fine with most hardware. This lists some of the hardware confirmed to work and any special configuration required.&lt;br /&gt;
&lt;br /&gt;
* ASICminer blade 10GH/s (Requires adding +1 to username or proxy)&lt;br /&gt;
* Avalon 110nm 60-110 GH/s (All batches)&lt;br /&gt;
* Avalon based 55nm 200 GH/s (specific makers?)&lt;br /&gt;
* Avalon prototype 55nm 120GH/s (~ 20 exist)&lt;br /&gt;
* Icarus FPGA&lt;br /&gt;
* Bitfury strikes back H-card and M-card ([https://bitcointalk.org/index.php?topic=18313.msg4424081#msg4424081 instructions])&lt;br /&gt;
* Bitmain Antminer S1 180GH/s ([https://github.com/AntMiner/AntGen1/tree/master/firmware Requires 20131226 firmware.])&lt;br /&gt;
* Bitmain Antminer S3 440GH/s&lt;br /&gt;
* BFL SC Jalapeno, SC Single 30, 50, &amp;amp; 60 GH/s&lt;br /&gt;
* Spondoolies Tech SP 10&lt;br /&gt;
* Spondoolies Tech SP 30&lt;br /&gt;
&lt;br /&gt;
(Various GPU and most FPGAs other than BFL single FPGAs work fine too)&lt;br /&gt;
&lt;br /&gt;
This is a list of hardware with known issues that should not be used on p2pool.&lt;br /&gt;
&lt;br /&gt;
* Cointerra Terraminer IV (10-20% hash rate loss when mining on p2pool)&lt;br /&gt;
* Btimain Antminer S2 (10-20% hash rate loss when mining on p2pool, the S1 &amp;amp; S3 both work well on p2pool)&lt;br /&gt;
&lt;br /&gt;
== Protocol description ==&lt;br /&gt;
&lt;br /&gt;
P2Pool&#039;s protocol mirrors Bitcoin&#039;s P2P protocol in many ways. It uses the same framing (prefix, command, length, checksum, payload) and similar commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;version&#039;&#039;&#039; - sent to establish a connection - contains (&#039;&#039;version&#039;&#039;, &#039;&#039;services&#039;&#039;, &#039;&#039;addr_to&#039;&#039;, &#039;&#039;addr_from&#039;&#039;, &#039;&#039;nonce&#039;&#039;, &#039;&#039;sub_version&#039;&#039;, &#039;&#039;mode&#039;&#039;, &#039;&#039;best_share_hash&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;setmode&#039;&#039;&#039; - sent to update the &#039;&#039;mode&#039;&#039; sent in the &#039;&#039;&#039;version&#039;&#039;&#039; message - contains (&#039;&#039;mode&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;ping&#039;&#039;&#039; - sent to keep connection alive - contains ()&lt;br /&gt;
* &#039;&#039;&#039;addrme&#039;&#039;&#039; - request that the receiving node send out an addr for the sending node - contains (&#039;&#039;port&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;addrs&#039;&#039;&#039; - broadcast list of nodes&#039; addresses - contains (&#039;&#039;addrs&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getaddrs&#039;&#039;&#039; - request that the receiving node send &#039;&#039;count&#039;&#039; addrs - contains (&#039;&#039;count&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getshares&#039;&#039;&#039; - request that the receiving node send the shares referenced by &#039;&#039;hashes&#039;&#039; and &#039;&#039;parents&#039;&#039; of their parents, stopping at any share referenced by &#039;&#039;stops&#039;&#039; - contains (&#039;&#039;hashes&#039;&#039;, &#039;&#039;parents&#039;&#039;, &#039;&#039;stops&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;shares&#039;&#039;&#039; - broadcast message of the contents of shares - contains (&#039;&#039;shares&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
This project was announced on June 17, 2011 by Forrest Voight&amp;lt;ref&amp;gt;[https://forum.bitcoin.org/index.php?topic=18313.0 p2pool: Decentralized, DoS-resistant, Hop-Proof - Now active on mainnet!]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The pool began testing against mainnet in mid-July, 2011.  The pool was reviewed on a [[Bitcoin Miner]] post on July 26, 2011&amp;lt;ref&amp;gt;[http://www.bitcoinminer.com/post/8101660461 P2Pool Decentralized Pool Nearly Ready For Prime-Time]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The software author&#039;s address for donations can be found in the signature section of his [http://forum.bitcoin.org/index.php?action=profile;u=6447 forum profile].&lt;br /&gt;
&lt;br /&gt;
==Donating to P2Pool miners==&lt;br /&gt;
In order to encourage people to mine to P2Pool you can donate to the recent miners in proportion using a sendmany:&lt;br /&gt;
&lt;br /&gt;
For example, a bash script to donate 10 btc is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can replace &amp;quot;&amp;quot; with &amp;quot;accountname&amp;quot; if you want to pay from some specific bitcoind account, and you need to replace 127.0.0.1 with the address of your P2Pool node if you&#039;re not running one locally.&lt;br /&gt;
&lt;br /&gt;
Note that the amount you donate will be allocated to recent miners in proportion to the amount of work they&#039;ve done in the last 24 hours or so, but all the miner whose shares of the donated amount are less than 0.01 BTC will have their shares combined into a single amount which is awarded to one of them at random, with the chance of winning this &#039;lottery&#039; weighted by the miner&#039;s recent amount of work done.  You can change this 0.01 BTC threshold like this, for example, which says to pay 10 BTC, but to share it amongst more miners that the default, cutting off at 0.001 BTC instead of at 0.01 BTC.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10/0.001)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you decide to donate you should announce it on the forums so that your donations provide the most incentive possible.&lt;br /&gt;
&lt;br /&gt;
==Sponsors==&lt;br /&gt;
&lt;br /&gt;
Thanks to:&lt;br /&gt;
&lt;br /&gt;
* The [https://bitcoinfoundation.org/ Bitcoin Foundation] for its generous support of P2Pool&lt;br /&gt;
* The [https://litecoin.org/ Litecoin Project] for its generous donations to P2Pool&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Comparison of mining pools]]&lt;br /&gt;
* [[Pooled Mining]]&lt;br /&gt;
* [[P2Pool code documentation]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [http://forum.bitcoin.org/index.php?topic=18313.0 P2Pool forum]&lt;br /&gt;
* [https://github.com/forrestv/p2pool p2pool] project on GitHub&lt;br /&gt;
* {{Freenode IRC|p2pool}} discussion and support&lt;br /&gt;
* [http://p2pool.info/ p2pool.info] stats page (appears broken since May 2014 and as of June 2014 - you can use http://ANY.NODE:9332/static/graphs.html )&lt;br /&gt;
* [http://p2pool.hostv.pl p2pool.hostv.pl] Public list of P2Pool BTC/LTC nodes.&lt;br /&gt;
* [http://p2pool-nodes.info/ p2pool-nodes.info] Another public list of P2Pool (BTC) nodes.&lt;br /&gt;
* [http://whatisp2pool.com whatisp2pool.com] An easy introduction to mining and P2Pool.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Pool Operators]]&lt;br /&gt;
{{Pools}}&lt;/div&gt;</summary>
		<author><name>CoinCadence</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=50331</id>
		<title>P2Pool</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=50331"/>
		<updated>2014-08-19T21:10:17Z</updated>

		<summary type="html">&lt;p&gt;CoinCadence: /* Interoperability table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{infobox company|name=P2Pool&lt;br /&gt;
|trading_name=P2Pool&lt;br /&gt;
|industry=[[Mining pool]]&lt;br /&gt;
|foundation=July 17, 2011&lt;br /&gt;
|hashrate=1.6 Phash/s&lt;br /&gt;
}}&lt;br /&gt;
Links: http://p2pool.in/ - https://github.com/forrestv/p2pool - https://en.bitcoin.it/wiki/P2Pool - https://bitcointalk.org/index.php?topic=18313&lt;br /&gt;
&lt;br /&gt;
[[Image:P2pool_chain.png‎|thumb|350px|right|Visualization of the P2Pool share chain]]&lt;br /&gt;
P2Pool is a decentralized [[Bitcoin]] [[Bitcoin Pool|mining pool]] that works by creating a peer-to-peer network of miner nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;P2Pool creates a new block chain in which the difficulty is adjusted so a new block is found every 30 seconds. The blocks that get into the P2Pool block chain (called the &amp;quot;share chain&amp;quot;) are the same blocks that would get into the Bitcoin block chain, only they have a lower difficulty target. Whenever a peer announces a new share found (new block in the P2Pool block chain), it is received by the other peers, and the other peers verify that this block contains payouts for all the previous miners who found a share (and announced it) that made it into the P2Pool share chain. This continues until some peer finds a block that has a difficulty that meets the Bitcoin network&#039;s difficulty target. This peer announces this block to the Bitcoin network and miners who have submitted shares for this block are paid in the generation transaction, proportionally to how many shares they have found in the last while. - Unknown author&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Decentralized payout pooling solves the problem of centralized mining pools degrading the decentralization of Bitcoin and avoids the risk of hard to detect theft by pool operators.&lt;br /&gt;
&lt;br /&gt;
Miners are configured to connect to a P2Pool node that can be run locally, alongside the miner. P2Pool users must run a full Bitcoin node which serves the purpose of independently validating transactions and the Bitcoin blockchain. P2Pool also supports merged mining and several alternative blockchains.&lt;br /&gt;
&lt;br /&gt;
P2Pool nodes work on a chain of shares similar to Bitcoin&#039;s blockchain. Each node works on a block that includes payouts to the previous shares&#039; owners and the node itself, which can also result in a share if it meets P2Pool&#039;s difficulty.&lt;br /&gt;
&lt;br /&gt;
Because of the importance of strengthening Bitcoin&#039;s decentralization, some Bitcoin supporters donate to P2Pool miners, resulting in average returns above 100% of the expected reward.&lt;br /&gt;
However, it should be noted that there are other pools (such as [[BitPenny]] and [[Eligius]]) which can provide this same level of decentralization.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
P2Pool shares form a &amp;quot;sharechain&amp;quot; with each share referencing the previous share&#039;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&#039;s hash, and the current target for shares), and a Merkle branch linking that generation transaction to the block header&#039;s Merkle hash.&lt;br /&gt;
&lt;br /&gt;
The chain continuously regulates its target to keep generation around one share every thirty seconds, just as Bitcoin regulates it to generate one block every ten minutes.&lt;br /&gt;
This means that finding shares becomes more difficult (resulting in higher variance) the more people mine on P2Pool, though large miners have the option to raise their difficulty, and so reduce the impact of their mining on P2Pool&#039;s minimum difficulty.&lt;br /&gt;
&lt;br /&gt;
Unlike Bitcoin, nodes do not know the entire chain - instead they only hold the last 8640 shares (the last 3 day&#039;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 that the shares reference, establishing a provable timestamp. (If a share points to a block, it was definitely made after that block was made.)&lt;br /&gt;
&lt;br /&gt;
=== Payout logic ===&lt;br /&gt;
&lt;br /&gt;
Each share contains a generation transaction that pays to the previous &#039;&#039;n&#039;&#039; shares, where &#039;&#039;n&#039;&#039; is the number of shares whose total work is equal to 3 times the average work required to solve a block, or 8640 (= 24 hours of shares), whichever is smaller. Payouts are weighted based on the amount of work each share took to solve, which is proportional to the p2pool difficulty at that time.&lt;br /&gt;
&lt;br /&gt;
The block reward (currently 25BTC) and the transaction fees are combined and apportioned according to these rules:&lt;br /&gt;
&lt;br /&gt;
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. (A miner with the aim to harm others could withhold the block, thereby preventing anybody from getting paid. He can NOT redirect the payout to himself.) The remaining 99.5% is distributed evenly to miners based on work done recently.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Stales ===&lt;br /&gt;
&lt;br /&gt;
On P2Pool stales refer to shares which can&#039;t make it into the sharechain.  Because the sharechain is 20 times faster than the Bitcoin chain many stales are common and expected. However, because the payout is [[Comparison_of_mining_pools|PPLNS]] only your stale rate relative to other nodes is relevant; the absolute rate is not.&lt;br /&gt;
&lt;br /&gt;
There are two reported kinds of stales in P2Pool: &amp;quot;DEAD ON ARRIVAL&amp;quot; shares and orphan shares. Dead shares were too old by the time they arrived at your local P2Pool. Very high dead rates can indicate miner misconfiguration. Orphan shares are shares which were not extended by the rest of the P2Pool network, because some other miner&#039;s share was accepted first. Very high orphan rates may indicate network connectivity problems. &lt;br /&gt;
&lt;br /&gt;
The P2Pool console output shows your relative stale rate compared to other P2Pool miners in the &#039;Own efficiency&#039; column:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2012-01-07 20:57:51.797420 Pool stales: 13% Own: 13±2% Own efficiency: 100±2%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you first start P2Pool claimed efficiency will be low and the error bounds on this estimate will be large, but as it runs the numbers will converge to their correct values.&lt;br /&gt;
&lt;br /&gt;
If your efficiency is unusually low, make sure your network connection isn&#039;t overloaded, that your miners support long polling and are not set to work for excessive amounts of time, and that your bitcoind has multiple connections.&lt;br /&gt;
&lt;br /&gt;
== Joining the pool ==&lt;br /&gt;
&lt;br /&gt;
Follow these steps to join the pool:&lt;br /&gt;
&lt;br /&gt;
* Run Bitcoin with the RPC interface enabled: edit bitcoin.conf to include:&lt;br /&gt;
 rpcuser=USER&lt;br /&gt;
 rpcpassword=LONG_RANDOM_SECRET_VALUE&lt;br /&gt;
 server=1&lt;br /&gt;
**&#039;&#039;&#039;Replace LONG_RANDOM_SECRET_VALUE with something long and random like the output of smashing your keyboard for a bit like fju4M78yAj3ds39pak92raK&#039;&#039;&#039;. You don&#039;t need to be able to remember it. If your RPC port becomes exposed to the internet a thief could steal your bitcoin if they could guess it, or use a brute force attack in order to find it.&lt;br /&gt;
** Bitcoin 0.8.5 or later is required&lt;br /&gt;
** It&#039;s important that your Bitcoin client be fully synchronized before starting. It&#039;s also better if you have the Bitcoin port forwarded&lt;br /&gt;
* Download p2pool:&lt;br /&gt;
** Windows binary: See http://forum.bitcoin.org/index.php?topic=18313.0&lt;br /&gt;
** Source download: https://github.com/forrestv/p2pool/tags&lt;br /&gt;
** git: git clone git://github.com/forrestv/p2pool.git&lt;br /&gt;
* Run p2pool: (See below for additional options.)&lt;br /&gt;
** Windows py2exe: run_p2pool.exe&lt;br /&gt;
** Source: python run_p2pool.py&lt;br /&gt;
* Run a miner daemon with long polling connecting to 127.0.0.1 (or the IP of the host running p2pool if it isn&#039;t on the same computer as the miner) on port 9332 with any username and password&lt;br /&gt;
** bfgminer -O u:p -o http://127.0.0.1:9332/ --submit-stales&lt;br /&gt;
&lt;br /&gt;
Dependencies if running from source:&lt;br /&gt;
* Python 2.6 or higher (but not 3.x)&lt;br /&gt;
* python-argparse&lt;br /&gt;
* Twisted (Ubuntu package python-twisted)&lt;br /&gt;
&lt;br /&gt;
=== Frequently Asked Questions ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Why does my miner report so many longpoll events when mining on p2pool? - P4Man&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; &amp;quot;Once every ~30 seconds is normal. That is how often p2pool shares are generated (as opposed to ~10 min for bitcoin blocks) - cabin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Do the &#039;orphan&#039; and &#039;dead&#039; shares in P2Pool&#039;s status display hurt me?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; They shouldn&#039;t - It&#039;s normal for some fraction of everyone&#039;s shares to end up orphaned or dead. Because payouts are calculated by counting how many shares you have relative to others, everyone with normal configurations is equally &amp;quot;hurt&amp;quot; by this. However, if you have a large proportion of stales, your payout will be hurt. You can see how well you&#039;re doing by looking at P2Pool&#039;s &amp;quot;Efficiency&amp;quot; (ex: &#039;&#039;Efficiency: ~110.6% (40-111%)&#039;&#039;). If 100% doesn&#039;t lie within the [http://en.wikipedia.org/wiki/Confidence_interval confidence interval] at the end, something is probably wrong (with 95% confidence).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;What do I do if my efficiency is low?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Make sure the computers you&#039;re running P2Pool and the miner on have enough memory and CPU time. If you have a lot of dead shares or the &amp;quot;Local dead on arrival&amp;quot; number is higher than a few percent, that means that something is wrong with your miner. Check to make sure that it is one of the working versions in the &#039;&#039;Miners&#039;&#039; section on this page. Lower the intensity or raise the FPS of your miner. If you have a lot of orphan shares, something is wrong with P2Pool&#039;s P2P connection. Decrease the load on your internet connection or enable QoS (Quality of Service) on your router.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What is PPLNS?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Pay-Per-Last-N-Shares is a payout method that is completely resistant to pool hoppers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I not getting very many shares?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The P2Pool difficulty is hundreds of times higher than on other pools. It can take time to get a share. P2Pool displays an estimate of how long you have to wait in the console output.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does my miner say it has found a lot of shares but p2pool say I have only found a few?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The real P2Pool difficulty is hundreds of times higher than on normal pools, but p2pool essentially lies to your miner and tells it to work on relatively easy shares so that it submits shares every few seconds instead of every few hours.  P2Pool then ignores any submitted shares that don&#039;t match the real share difficulty.  By doing this, P2Pool can more accurately report your local hash rate and you can see if you are having problems with too many stale shares quickly&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I getting so many rejects?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; You&#039;re using an incompatible miner. See the miners section here, increase your FPS on the miner, decrease the intensity, upgrade your miner, or try a different miner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What stops the pool operator or the block finder from stealing a block?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; A block solution is only worth anything because its hash matches Bitcoin&#039;s target. Altering anything within the block will change its hash and make it worthless. If you are concerned about the pool operator stealing a block, you should try to inspect the source code of each new version.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does it say &amp;quot;Generated?&amp;quot; I want to spend my coins now!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; P2Pool includes payouts in generation transactions, which must mature (taking 120 blocks or 20 hours) before they can be spent. The reason for this is that a block could be orphaned, which would make its payout invalid and could reverse transactions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I get paid transaction fees?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. They are split among P2Pool miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What are these payments I&#039;m getting that aren&#039;t generated?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; These are subsidies that people who support the idea of P2Pool send to miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Cool Subsidies sound like an awesome idea! How do I send some BTC to these awesome miners?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; See end of this page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I really need the WHOLE blockchain?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. Your node needs to be able to independently make decisions about what transactions to mine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; How do merged mining payments work?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Merged mining is handled entirely by namecoind, so you&#039;re solo mining and payouts will go into namecoind&#039;s wallet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Miners ===&lt;br /&gt;
&lt;br /&gt;
This is all for the latest p2pool version, as it includes several new workarounds. &lt;br /&gt;
&lt;br /&gt;
With all miners, using a HIGH FPS target (100?) or a LOW intensity (8 for bfgminer?) helps a lot with reducing stales.&lt;br /&gt;
&lt;br /&gt;
* bfgminer, cgminer, and ufasoft work perfectly without any extra options.&lt;br /&gt;
* DiabloMiner works fine after commit 3b731b9.&lt;br /&gt;
* Phoenix works fine after commit a658ef2.&lt;br /&gt;
* Poclbm works fine after commit 5e994e7.&lt;br /&gt;
&lt;br /&gt;
P2Pool uses higher difficulty shares than most centralized pools, so you&#039;ll see fewer shares reported. This is normal and doesn&#039;t reduce your payments.  It&#039;s also normal to see longpoll messages once per every ten seconds on average.&lt;br /&gt;
&lt;br /&gt;
====Tips to configure bfgminer to reduce stale/doa:====&lt;br /&gt;
* &amp;quot;gpu-threads&amp;quot; : &amp;quot;1&amp;quot;, (2 by default)&lt;br /&gt;
* &amp;quot;queue&amp;quot; : &amp;quot;0&amp;quot;, (1 by default)&lt;br /&gt;
&lt;br /&gt;
Because of fast longpooling in p2pool it is better not NOT fetch work ahead.&lt;br /&gt;
&lt;br /&gt;
On non-dedicated machines intensity=3 allows normal usage of PC, set it to 7 or more to get full hashrate.&lt;br /&gt;
&lt;br /&gt;
On most cards best is diablo and phatk kernel, looks like poclbm kernel have unstable rate.&lt;br /&gt;
&lt;br /&gt;
=== Useful features ===&lt;br /&gt;
&lt;br /&gt;
* If upgrading P2Pool or changing its configuration, you can start another instance of P2Pool in parallel with the first. It will start normally, but realize that the worker and P2P listening ports are busy and keep trying to bind to them in the background. Thus, you can do almost-completely-seamless upgrades of P2Pool.&lt;br /&gt;
* If you run multiple P2Pool nodes or have trusted friends that run P2Pool, you can use &#039;&#039;-n&#039;&#039; to establish a constant extra P2P connection to them.&lt;br /&gt;
* You can make P2Pool use a configuration file by running run_p2pool.py @FILENAME, with FILENAME being the path to a file containing the command-line arguments (newlines are ignored) Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--net bitcoin&lt;br /&gt;
-n 1.2.3.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Setting the username of your miner connecting to P2Pool to a Bitcoin address will make it mine to that address instead of the one requested from bitcoind or set by -a&lt;br /&gt;
* Appending &amp;quot;/1000&amp;quot; to a miner&#039;s username will increase the difficulty of producing a P2Pool share to at most 1000. This is useful to large miners because doing this can make it easier for small miners while minimally impacting the large miners themselves. See [https://bitcointalk.org/index.php?topic=18313.msg816322#msg816322 recommended values].&lt;br /&gt;
** Appending &amp;quot;+1&amp;quot; (for example) after that will make P2Pool always give your miners work with a difficulty of 1&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
Lots of data and useful tools are available at http://127.0.0.1:9332/something:&lt;br /&gt;
* /static/ - Lots of information from shares to graphs to payouts.&lt;br /&gt;
* /rate&lt;br /&gt;
* /users&lt;br /&gt;
* /fee&lt;br /&gt;
* /current_payouts&lt;br /&gt;
* /patron_sendmany - Gives sendmany outputs for fair donations to P2Pool&lt;br /&gt;
* /global_stats&lt;br /&gt;
* /local_stats&lt;br /&gt;
* /peer_addresses&lt;br /&gt;
* /payout_addr&lt;br /&gt;
* /recent_blocks&lt;br /&gt;
* /uptime&lt;br /&gt;
* /web/log - Some different stats collected over the last day&lt;br /&gt;
&lt;br /&gt;
=== Included README ===&lt;br /&gt;
&amp;lt;pre&amp;gt;Requirements:&lt;br /&gt;
    Generic:&lt;br /&gt;
        Bitcoin &amp;gt;=0.6.0rc4 or Bitcoin &amp;gt;=0.5.4 (for BIP16 support) or Litecoin&lt;br /&gt;
        Python&lt;br /&gt;
        Twisted&lt;br /&gt;
        python-argparse (for Python &amp;lt;=2.6)&lt;br /&gt;
    &lt;br /&gt;
    Linux:&lt;br /&gt;
        sudo apt-get install python-zope.interface python-twisted python-twisted-web&lt;br /&gt;
        sudo apt-get install python-argparse # if on Python 2.6 or older&lt;br /&gt;
    &lt;br /&gt;
    Windows:&lt;br /&gt;
        Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
        Install Twisted: http://twistedmatrix.com/trac/wiki/Downloads&lt;br /&gt;
        Install Zope.Interface: http://pypi.python.org/pypi/zope.interface/3.8.0&lt;br /&gt;
            Unzip the files into C:\Python27\Lib\site-packages&lt;br /&gt;
&lt;br /&gt;
Running P2Pool:&lt;br /&gt;
    To use P2Pool, you must be running your own local bitcoind. For standard&lt;br /&gt;
    configurations, using P2Pool should be as simple as:&lt;br /&gt;
&lt;br /&gt;
        python run_p2pool.py&lt;br /&gt;
&lt;br /&gt;
    Then run your miner program, connecting to 127.0.0.1 on port 9332 with any&lt;br /&gt;
    username and password.&lt;br /&gt;
&lt;br /&gt;
    If you are behind a NAT, you should enable TCP port forwarding on your&lt;br /&gt;
    router. Forward port 9333 to the host running P2Pool.&lt;br /&gt;
&lt;br /&gt;
    Run &amp;quot;python run_p2pool.py --help&amp;quot; for additional options.&lt;br /&gt;
&lt;br /&gt;
Notes for Litecoin:&lt;br /&gt;
    Requirements:&lt;br /&gt;
        In order to run P2Pool with the Litecoin network, you would need to build and install the&lt;br /&gt;
        ltc_scrypt module that includes the scrypt proof of work code that Litecoin uses for hashes.&lt;br /&gt;
&lt;br /&gt;
        Linux:&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
        Windows:&lt;br /&gt;
            Install MinGW: http://www.mingw.org/wiki/Getting_Started&lt;br /&gt;
            Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            C:\Python27\python.exe setup.py build --compile=mingw32 install&lt;br /&gt;
&lt;br /&gt;
            If you run into an error with unrecognized command line option &#039;-mno-cygwin&#039;, see this:&lt;br /&gt;
                http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o&lt;br /&gt;
    &lt;br /&gt;
    Running P2Pool:&lt;br /&gt;
        Run P2Pool with the &amp;quot;--net litecoin&amp;quot; option.&lt;br /&gt;
        Run your miner program, connecting to 127.0.0.1 on port 9327.&lt;br /&gt;
        Forward port 9338 to the host running P2Pool.&lt;br /&gt;
        &lt;br /&gt;
        Litecoin&#039;s use of ports 9332 and 9332 conflicts with P2Pool running on&lt;br /&gt;
        the Bitcoin network. To avoid problems, add these lines to litecoin.conf&lt;br /&gt;
        and restart litecoind:&lt;br /&gt;
            rpcport=10332&lt;br /&gt;
            port=10333&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option Reference ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
usage: run_p2pool.py [-h] [--version] [--net {bitcoin,litecoin}] [--testnet]&lt;br /&gt;
                     [--debug] [-a ADDRESS] [--datadir DATADIR]&lt;br /&gt;
                     [--logfile LOGFILE] [--merged MERGED_URLS]&lt;br /&gt;
                     [--give-author DONATION_PERCENTAGE] [--iocp]&lt;br /&gt;
                     [--irc-announce] [--no-bugreport] [--p2pool-port PORT]&lt;br /&gt;
                     [-n ADDR[:PORT]] [--disable-upnp] [--max-conns CONNS]&lt;br /&gt;
                     [-w PORT or ADDR:PORT] [-f FEE_PERCENTAGE]&lt;br /&gt;
                     [--bitcoind-address BITCOIND_ADDRESS]&lt;br /&gt;
                     [--bitcoind-rpc-port BITCOIND_RPC_PORT]&lt;br /&gt;
                     [--bitcoind-p2p-port BITCOIND_P2P_PORT]&lt;br /&gt;
                     [BITCOIND_RPCUSERPASS [BITCOIND_RPCUSERPASS ...]]&lt;br /&gt;
&lt;br /&gt;
p2pool (version 0.11.1-8-ged9359d)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  --version             show program&#039;s version number and exit&lt;br /&gt;
  --net {bitcoin,litecoin}&lt;br /&gt;
                        use specified network (default: bitcoin)&lt;br /&gt;
  --testnet             use the network&#039;s testnet&lt;br /&gt;
  --debug               enable debugging mode&lt;br /&gt;
  -a ADDRESS, --address ADDRESS&lt;br /&gt;
                        generate payouts to this address (default: &amp;lt;address&lt;br /&gt;
                        requested from bitcoind&amp;gt;)&lt;br /&gt;
  --datadir DATADIR     store data in this directory (default: &amp;lt;directory&lt;br /&gt;
                        run_p2pool.py is in&amp;gt;/data)&lt;br /&gt;
  --logfile LOGFILE     log to this file (default: data/&amp;lt;NET&amp;gt;/log)&lt;br /&gt;
  --merged MERGED_URLS  call getauxblock on this url to get work for merged&lt;br /&gt;
                        mining (example:&lt;br /&gt;
                        http://ncuser:ncpass@127.0.0.1:10332/)&lt;br /&gt;
  --give-author DONATION_PERCENTAGE&lt;br /&gt;
                        donate this percentage of work towards the development&lt;br /&gt;
                        of p2pool (default: 0.5)&lt;br /&gt;
  --iocp                use Windows IOCP API in order to avoid errors due to&lt;br /&gt;
                        large number of sockets being open&lt;br /&gt;
  --irc-announce        announce any blocks found on&lt;br /&gt;
                        irc://irc.freenode.net/#p2pool&lt;br /&gt;
  --no-bugreport        disable submitting caught exceptions to the author&lt;br /&gt;
  --disable-upnp        don&#039;t attempt to use UPnP to forward p2pool&#039;s P2P port&lt;br /&gt;
                        from the Internet to this computer&lt;br /&gt;
&lt;br /&gt;
p2pool interface:&lt;br /&gt;
  --p2pool-port PORT    use port PORT to listen for connections (forward this&lt;br /&gt;
                        port from your router!) (default: bitcoin:9333,&lt;br /&gt;
                        litecoin:9338)&lt;br /&gt;
  -n ADDR[:PORT], --p2pool-node ADDR[:PORT]&lt;br /&gt;
                        connect to existing p2pool node at ADDR listening on&lt;br /&gt;
                        port PORT (defaults to default p2pool P2P port) in&lt;br /&gt;
                        addition to builtin addresses&lt;br /&gt;
  --max-conns CONNS     maximum incoming connections (default: 40)&lt;br /&gt;
&lt;br /&gt;
worker interface:&lt;br /&gt;
  -w PORT or ADDR:PORT, --worker-port PORT or ADDR:PORT&lt;br /&gt;
                        listen on PORT on interface with ADDR for RPC&lt;br /&gt;
                        connections from miners (default: all interfaces,&lt;br /&gt;
                        bitcoin:9332, litecoin:9327)&lt;br /&gt;
  -f FEE_PERCENTAGE, --fee FEE_PERCENTAGE&lt;br /&gt;
                        charge workers mining to their own bitcoin address (by&lt;br /&gt;
                        setting their miner&#039;s username to a bitcoin address)&lt;br /&gt;
                        this percentage fee to mine on your p2pool instance.&lt;br /&gt;
                        Amount displayed at http://127.0.0.1:WORKER_PORT/fee&lt;br /&gt;
                        (default: 0)&lt;br /&gt;
&lt;br /&gt;
bitcoind interface:&lt;br /&gt;
  --bitcoind-address BITCOIND_ADDRESS&lt;br /&gt;
                        connect to this address (default: 127.0.0.1)&lt;br /&gt;
  --bitcoind-rpc-port BITCOIND_RPC_PORT&lt;br /&gt;
                        connect to JSON-RPC interface at this port (default:&lt;br /&gt;
                        bitcoin:8332, litecoin:9332 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  --bitcoind-p2p-port BITCOIND_P2P_PORT&lt;br /&gt;
                        connect to P2P interface at this port (default:&lt;br /&gt;
                        bitcoin:8333, litecoin:9333 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  BITCOIND_RPCUSERPASS  bitcoind RPC interface username, then password, space-&lt;br /&gt;
                        separated (only one being provided will cause the&lt;br /&gt;
                        username to default to being empty, and none will&lt;br /&gt;
                        cause P2Pool to read them from bitcoin.conf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interoperability table ==&lt;br /&gt;
P2pool works fine with most hardware. This lists some of the hardware confirmed to work and any special configuration required.&lt;br /&gt;
&lt;br /&gt;
* ASICminer blade 10GH/s (Requires adding +1 to username or proxy)&lt;br /&gt;
* Avalon 110nm 60-110 GH/s (All batches)&lt;br /&gt;
* Avalon based 55nm 200 GH/s (specific makers?)&lt;br /&gt;
* Avalon prototype 55nm 120GH/s (~ 20 exist)&lt;br /&gt;
* Icarus FPGA&lt;br /&gt;
* Bitfury strikes back H-card and M-card ([https://bitcointalk.org/index.php?topic=18313.msg4424081#msg4424081 instructions])&lt;br /&gt;
* Bitmain Antminer S1 180GH/s ([https://github.com/AntMiner/AntGen1/tree/master/firmware Requires 20131226 firmware.])&lt;br /&gt;
* Bitmain Antminer S3 440GH/s&lt;br /&gt;
* BFL SC Jalapeno, SC Single 30, 50, &amp;amp; 60 GH/s&lt;br /&gt;
* Spondoolies Tech SP 10&lt;br /&gt;
&lt;br /&gt;
(Various GPU and most FPGAs other than BFL single FPGAs work fine too)&lt;br /&gt;
&lt;br /&gt;
This is a list of hardware with known issues that should not be used on p2pool.&lt;br /&gt;
&lt;br /&gt;
* Cointerra Terraminer IV (10-20% hash rate loss when mining on p2pool)&lt;br /&gt;
* Btimain Antminer S2 (10-20% hash rate loss when mining on p2pool, the S1 &amp;amp; S3 both work well on p2pool)&lt;br /&gt;
&lt;br /&gt;
== Protocol description ==&lt;br /&gt;
&lt;br /&gt;
P2Pool&#039;s protocol mirrors Bitcoin&#039;s P2P protocol in many ways. It uses the same framing (prefix, command, length, checksum, payload) and similar commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;version&#039;&#039;&#039; - sent to establish a connection - contains (&#039;&#039;version&#039;&#039;, &#039;&#039;services&#039;&#039;, &#039;&#039;addr_to&#039;&#039;, &#039;&#039;addr_from&#039;&#039;, &#039;&#039;nonce&#039;&#039;, &#039;&#039;sub_version&#039;&#039;, &#039;&#039;mode&#039;&#039;, &#039;&#039;best_share_hash&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;setmode&#039;&#039;&#039; - sent to update the &#039;&#039;mode&#039;&#039; sent in the &#039;&#039;&#039;version&#039;&#039;&#039; message - contains (&#039;&#039;mode&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;ping&#039;&#039;&#039; - sent to keep connection alive - contains ()&lt;br /&gt;
* &#039;&#039;&#039;addrme&#039;&#039;&#039; - request that the receiving node send out an addr for the sending node - contains (&#039;&#039;port&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;addrs&#039;&#039;&#039; - broadcast list of nodes&#039; addresses - contains (&#039;&#039;addrs&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getaddrs&#039;&#039;&#039; - request that the receiving node send &#039;&#039;count&#039;&#039; addrs - contains (&#039;&#039;count&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getshares&#039;&#039;&#039; - request that the receiving node send the shares referenced by &#039;&#039;hashes&#039;&#039; and &#039;&#039;parents&#039;&#039; of their parents, stopping at any share referenced by &#039;&#039;stops&#039;&#039; - contains (&#039;&#039;hashes&#039;&#039;, &#039;&#039;parents&#039;&#039;, &#039;&#039;stops&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;shares&#039;&#039;&#039; - broadcast message of the contents of shares - contains (&#039;&#039;shares&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
This project was announced on June 17, 2011 by Forrest Voight&amp;lt;ref&amp;gt;[https://forum.bitcoin.org/index.php?topic=18313.0 p2pool: Decentralized, DoS-resistant, Hop-Proof - Now active on mainnet!]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The pool began testing against mainnet in mid-July, 2011.  The pool was reviewed on a [[Bitcoin Miner]] post on July 26, 2011&amp;lt;ref&amp;gt;[http://www.bitcoinminer.com/post/8101660461 P2Pool Decentralized Pool Nearly Ready For Prime-Time]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The software author&#039;s address for donations can be found in the signature section of his [http://forum.bitcoin.org/index.php?action=profile;u=6447 forum profile].&lt;br /&gt;
&lt;br /&gt;
==Donating to P2Pool miners==&lt;br /&gt;
In order to encourage people to mine to P2Pool you can donate to the recent miners in proportion using a sendmany:&lt;br /&gt;
&lt;br /&gt;
For example, a bash script to donate 10 btc is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can replace &amp;quot;&amp;quot; with &amp;quot;accountname&amp;quot; if you want to pay from some specific bitcoind account, and you need to replace 127.0.0.1 with the address of your P2Pool node if you&#039;re not running one locally.&lt;br /&gt;
&lt;br /&gt;
Note that the amount you donate will be allocated to recent miners in proportion to the amount of work they&#039;ve done in the last 24 hours or so, but all the miner whose shares of the donated amount are less than 0.01 BTC will have their shares combined into a single amount which is awarded to one of them at random, with the chance of winning this &#039;lottery&#039; weighted by the miner&#039;s recent amount of work done.  You can change this 0.01 BTC threshold like this, for example, which says to pay 10 BTC, but to share it amongst more miners that the default, cutting off at 0.001 BTC instead of at 0.01 BTC.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10/0.001)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you decide to donate you should announce it on the forums so that your donations provide the most incentive possible.&lt;br /&gt;
&lt;br /&gt;
==Sponsors==&lt;br /&gt;
&lt;br /&gt;
Thanks to:&lt;br /&gt;
&lt;br /&gt;
* The [https://bitcoinfoundation.org/ Bitcoin Foundation] for its generous support of P2Pool&lt;br /&gt;
* The [https://litecoin.org/ Litecoin Project] for its generous donations to P2Pool&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Comparison of mining pools]]&lt;br /&gt;
* [[Pooled Mining]]&lt;br /&gt;
* [[P2Pool code documentation]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [http://forum.bitcoin.org/index.php?topic=18313.0 P2Pool forum]&lt;br /&gt;
* [https://github.com/forrestv/p2pool p2pool] project on GitHub&lt;br /&gt;
* {{Freenode IRC|p2pool}} discussion and support&lt;br /&gt;
* [http://p2pool.info/ p2pool.info] stats page (appears broken since May 2014 and as of June 2014 - you can use http://ANY.NODE:9332/static/graphs.html )&lt;br /&gt;
* [http://p2pool.hostv.pl p2pool.hostv.pl] Public list of P2Pool BTC/LTC nodes.&lt;br /&gt;
* [http://p2pool-nodes.info/ p2pool-nodes.info] Another public list of P2Pool (BTC) nodes.&lt;br /&gt;
* [http://whatisp2pool.com whatisp2pool.com] An easy introduction to mining and P2Pool.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Pool Operators]]&lt;br /&gt;
{{Pools}}&lt;/div&gt;</summary>
		<author><name>CoinCadence</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=50318</id>
		<title>P2Pool</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=50318"/>
		<updated>2014-08-19T20:28:19Z</updated>

		<summary type="html">&lt;p&gt;CoinCadence: /* Interoperability table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{infobox company|name=P2Pool&lt;br /&gt;
|trading_name=P2Pool&lt;br /&gt;
|industry=[[Mining pool]]&lt;br /&gt;
|foundation=July 17, 2011&lt;br /&gt;
|hashrate=1.6 Phash/s&lt;br /&gt;
}}&lt;br /&gt;
Links: http://p2pool.in/ - https://github.com/forrestv/p2pool - https://en.bitcoin.it/wiki/P2Pool - https://bitcointalk.org/index.php?topic=18313&lt;br /&gt;
&lt;br /&gt;
[[Image:P2pool_chain.png‎|thumb|350px|right|Visualization of the P2Pool share chain]]&lt;br /&gt;
P2Pool is a decentralized [[Bitcoin]] [[Bitcoin Pool|mining pool]] that works by creating a peer-to-peer network of miner nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;P2Pool creates a new block chain in which the difficulty is adjusted so a new block is found every 30 seconds. The blocks that get into the P2Pool block chain (called the &amp;quot;share chain&amp;quot;) are the same blocks that would get into the Bitcoin block chain, only they have a lower difficulty target. Whenever a peer announces a new share found (new block in the P2Pool block chain), it is received by the other peers, and the other peers verify that this block contains payouts for all the previous miners who found a share (and announced it) that made it into the P2Pool share chain. This continues until some peer finds a block that has a difficulty that meets the Bitcoin network&#039;s difficulty target. This peer announces this block to the Bitcoin network and miners who have submitted shares for this block are paid in the generation transaction, proportionally to how many shares they have found in the last while. - Unknown author&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Decentralized payout pooling solves the problem of centralized mining pools degrading the decentralization of Bitcoin and avoids the risk of hard to detect theft by pool operators.&lt;br /&gt;
&lt;br /&gt;
Miners are configured to connect to a P2Pool node that can be run locally, alongside the miner. P2Pool users must run a full Bitcoin node which serves the purpose of independently validating transactions and the Bitcoin blockchain. P2Pool also supports merged mining and several alternative blockchains.&lt;br /&gt;
&lt;br /&gt;
P2Pool nodes work on a chain of shares similar to Bitcoin&#039;s blockchain. Each node works on a block that includes payouts to the previous shares&#039; owners and the node itself, which can also result in a share if it meets P2Pool&#039;s difficulty.&lt;br /&gt;
&lt;br /&gt;
Because of the importance of strengthening Bitcoin&#039;s decentralization, some Bitcoin supporters donate to P2Pool miners, resulting in average returns above 100% of the expected reward.&lt;br /&gt;
However, it should be noted that there are other pools (such as [[BitPenny]] and [[Eligius]]) which can provide this same level of decentralization.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
P2Pool shares form a &amp;quot;sharechain&amp;quot; with each share referencing the previous share&#039;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&#039;s hash, and the current target for shares), and a Merkle branch linking that generation transaction to the block header&#039;s Merkle hash.&lt;br /&gt;
&lt;br /&gt;
The chain continuously regulates its target to keep generation around one share every thirty seconds, just as Bitcoin regulates it to generate one block every ten minutes.&lt;br /&gt;
This means that finding shares becomes more difficult (resulting in higher variance) the more people mine on P2Pool, though large miners have the option to raise their difficulty, and so reduce the impact of their mining on P2Pool&#039;s minimum difficulty.&lt;br /&gt;
&lt;br /&gt;
Unlike Bitcoin, nodes do not know the entire chain - instead they only hold the last 8640 shares (the last 3 day&#039;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 that the shares reference, establishing a provable timestamp. (If a share points to a block, it was definitely made after that block was made.)&lt;br /&gt;
&lt;br /&gt;
=== Payout logic ===&lt;br /&gt;
&lt;br /&gt;
Each share contains a generation transaction that pays to the previous &#039;&#039;n&#039;&#039; shares, where &#039;&#039;n&#039;&#039; is the number of shares whose total work is equal to 3 times the average work required to solve a block, or 8640 (= 24 hours of shares), whichever is smaller. Payouts are weighted based on the amount of work each share took to solve, which is proportional to the p2pool difficulty at that time.&lt;br /&gt;
&lt;br /&gt;
The block reward (currently 25BTC) and the transaction fees are combined and apportioned according to these rules:&lt;br /&gt;
&lt;br /&gt;
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. (A miner with the aim to harm others could withhold the block, thereby preventing anybody from getting paid. He can NOT redirect the payout to himself.) The remaining 99.5% is distributed evenly to miners based on work done recently.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Stales ===&lt;br /&gt;
&lt;br /&gt;
On P2Pool stales refer to shares which can&#039;t make it into the sharechain.  Because the sharechain is 20 times faster than the Bitcoin chain many stales are common and expected. However, because the payout is [[Comparison_of_mining_pools|PPLNS]] only your stale rate relative to other nodes is relevant; the absolute rate is not.&lt;br /&gt;
&lt;br /&gt;
There are two reported kinds of stales in P2Pool: &amp;quot;DEAD ON ARRIVAL&amp;quot; shares and orphan shares. Dead shares were too old by the time they arrived at your local P2Pool. Very high dead rates can indicate miner misconfiguration. Orphan shares are shares which were not extended by the rest of the P2Pool network, because some other miner&#039;s share was accepted first. Very high orphan rates may indicate network connectivity problems. &lt;br /&gt;
&lt;br /&gt;
The P2Pool console output shows your relative stale rate compared to other P2Pool miners in the &#039;Own efficiency&#039; column:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2012-01-07 20:57:51.797420 Pool stales: 13% Own: 13±2% Own efficiency: 100±2%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you first start P2Pool claimed efficiency will be low and the error bounds on this estimate will be large, but as it runs the numbers will converge to their correct values.&lt;br /&gt;
&lt;br /&gt;
If your efficiency is unusually low, make sure your network connection isn&#039;t overloaded, that your miners support long polling and are not set to work for excessive amounts of time, and that your bitcoind has multiple connections.&lt;br /&gt;
&lt;br /&gt;
== Joining the pool ==&lt;br /&gt;
&lt;br /&gt;
Follow these steps to join the pool:&lt;br /&gt;
&lt;br /&gt;
* Run Bitcoin with the RPC interface enabled: edit bitcoin.conf to include:&lt;br /&gt;
 rpcuser=USER&lt;br /&gt;
 rpcpassword=LONG_RANDOM_SECRET_VALUE&lt;br /&gt;
 server=1&lt;br /&gt;
**&#039;&#039;&#039;Replace LONG_RANDOM_SECRET_VALUE with something long and random like the output of smashing your keyboard for a bit like fju4M78yAj3ds39pak92raK&#039;&#039;&#039;. You don&#039;t need to be able to remember it. If your RPC port becomes exposed to the internet a thief could steal your bitcoin if they could guess it, or use a brute force attack in order to find it.&lt;br /&gt;
** Bitcoin 0.8.5 or later is required&lt;br /&gt;
** It&#039;s important that your Bitcoin client be fully synchronized before starting. It&#039;s also better if you have the Bitcoin port forwarded&lt;br /&gt;
* Download p2pool:&lt;br /&gt;
** Windows binary: See http://forum.bitcoin.org/index.php?topic=18313.0&lt;br /&gt;
** Source download: https://github.com/forrestv/p2pool/tags&lt;br /&gt;
** git: git clone git://github.com/forrestv/p2pool.git&lt;br /&gt;
* Run p2pool: (See below for additional options.)&lt;br /&gt;
** Windows py2exe: run_p2pool.exe&lt;br /&gt;
** Source: python run_p2pool.py&lt;br /&gt;
* Run a miner daemon with long polling connecting to 127.0.0.1 (or the IP of the host running p2pool if it isn&#039;t on the same computer as the miner) on port 9332 with any username and password&lt;br /&gt;
** bfgminer -O u:p -o http://127.0.0.1:9332/ --submit-stales&lt;br /&gt;
&lt;br /&gt;
Dependencies if running from source:&lt;br /&gt;
* Python 2.6 or higher (but not 3.x)&lt;br /&gt;
* python-argparse&lt;br /&gt;
* Twisted (Ubuntu package python-twisted)&lt;br /&gt;
&lt;br /&gt;
=== Frequently Asked Questions ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Why does my miner report so many longpoll events when mining on p2pool? - P4Man&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; &amp;quot;Once every ~30 seconds is normal. That is how often p2pool shares are generated (as opposed to ~10 min for bitcoin blocks) - cabin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Do the &#039;orphan&#039; and &#039;dead&#039; shares in P2Pool&#039;s status display hurt me?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; They shouldn&#039;t - It&#039;s normal for some fraction of everyone&#039;s shares to end up orphaned or dead. Because payouts are calculated by counting how many shares you have relative to others, everyone with normal configurations is equally &amp;quot;hurt&amp;quot; by this. However, if you have a large proportion of stales, your payout will be hurt. You can see how well you&#039;re doing by looking at P2Pool&#039;s &amp;quot;Efficiency&amp;quot; (ex: &#039;&#039;Efficiency: ~110.6% (40-111%)&#039;&#039;). If 100% doesn&#039;t lie within the [http://en.wikipedia.org/wiki/Confidence_interval confidence interval] at the end, something is probably wrong (with 95% confidence).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;What do I do if my efficiency is low?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Make sure the computers you&#039;re running P2Pool and the miner on have enough memory and CPU time. If you have a lot of dead shares or the &amp;quot;Local dead on arrival&amp;quot; number is higher than a few percent, that means that something is wrong with your miner. Check to make sure that it is one of the working versions in the &#039;&#039;Miners&#039;&#039; section on this page. Lower the intensity or raise the FPS of your miner. If you have a lot of orphan shares, something is wrong with P2Pool&#039;s P2P connection. Decrease the load on your internet connection or enable QoS (Quality of Service) on your router.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What is PPLNS?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Pay-Per-Last-N-Shares is a payout method that is completely resistant to pool hoppers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I not getting very many shares?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The P2Pool difficulty is hundreds of times higher than on other pools. It can take time to get a share. P2Pool displays an estimate of how long you have to wait in the console output.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does my miner say it has found a lot of shares but p2pool say I have only found a few?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The real P2Pool difficulty is hundreds of times higher than on normal pools, but p2pool essentially lies to your miner and tells it to work on relatively easy shares so that it submits shares every few seconds instead of every few hours.  P2Pool then ignores any submitted shares that don&#039;t match the real share difficulty.  By doing this, P2Pool can more accurately report your local hash rate and you can see if you are having problems with too many stale shares quickly&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I getting so many rejects?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; You&#039;re using an incompatible miner. See the miners section here, increase your FPS on the miner, decrease the intensity, upgrade your miner, or try a different miner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What stops the pool operator or the block finder from stealing a block?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; A block solution is only worth anything because its hash matches Bitcoin&#039;s target. Altering anything within the block will change its hash and make it worthless. If you are concerned about the pool operator stealing a block, you should try to inspect the source code of each new version.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does it say &amp;quot;Generated?&amp;quot; I want to spend my coins now!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; P2Pool includes payouts in generation transactions, which must mature (taking 120 blocks or 20 hours) before they can be spent. The reason for this is that a block could be orphaned, which would make its payout invalid and could reverse transactions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I get paid transaction fees?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. They are split among P2Pool miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What are these payments I&#039;m getting that aren&#039;t generated?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; These are subsidies that people who support the idea of P2Pool send to miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Cool Subsidies sound like an awesome idea! How do I send some BTC to these awesome miners?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; See end of this page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I really need the WHOLE blockchain?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. Your node needs to be able to independently make decisions about what transactions to mine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; How do merged mining payments work?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Merged mining is handled entirely by namecoind, so you&#039;re solo mining and payouts will go into namecoind&#039;s wallet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Miners ===&lt;br /&gt;
&lt;br /&gt;
This is all for the latest p2pool version, as it includes several new workarounds. &lt;br /&gt;
&lt;br /&gt;
With all miners, using a HIGH FPS target (100?) or a LOW intensity (8 for bfgminer?) helps a lot with reducing stales.&lt;br /&gt;
&lt;br /&gt;
* bfgminer, cgminer, and ufasoft work perfectly without any extra options.&lt;br /&gt;
* DiabloMiner works fine after commit 3b731b9.&lt;br /&gt;
* Phoenix works fine after commit a658ef2.&lt;br /&gt;
* Poclbm works fine after commit 5e994e7.&lt;br /&gt;
&lt;br /&gt;
P2Pool uses higher difficulty shares than most centralized pools, so you&#039;ll see fewer shares reported. This is normal and doesn&#039;t reduce your payments.  It&#039;s also normal to see longpoll messages once per every ten seconds on average.&lt;br /&gt;
&lt;br /&gt;
====Tips to configure bfgminer to reduce stale/doa:====&lt;br /&gt;
* &amp;quot;gpu-threads&amp;quot; : &amp;quot;1&amp;quot;, (2 by default)&lt;br /&gt;
* &amp;quot;queue&amp;quot; : &amp;quot;0&amp;quot;, (1 by default)&lt;br /&gt;
&lt;br /&gt;
Because of fast longpooling in p2pool it is better not NOT fetch work ahead.&lt;br /&gt;
&lt;br /&gt;
On non-dedicated machines intensity=3 allows normal usage of PC, set it to 7 or more to get full hashrate.&lt;br /&gt;
&lt;br /&gt;
On most cards best is diablo and phatk kernel, looks like poclbm kernel have unstable rate.&lt;br /&gt;
&lt;br /&gt;
=== Useful features ===&lt;br /&gt;
&lt;br /&gt;
* If upgrading P2Pool or changing its configuration, you can start another instance of P2Pool in parallel with the first. It will start normally, but realize that the worker and P2P listening ports are busy and keep trying to bind to them in the background. Thus, you can do almost-completely-seamless upgrades of P2Pool.&lt;br /&gt;
* If you run multiple P2Pool nodes or have trusted friends that run P2Pool, you can use &#039;&#039;-n&#039;&#039; to establish a constant extra P2P connection to them.&lt;br /&gt;
* You can make P2Pool use a configuration file by running run_p2pool.py @FILENAME, with FILENAME being the path to a file containing the command-line arguments (newlines are ignored) Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--net bitcoin&lt;br /&gt;
-n 1.2.3.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Setting the username of your miner connecting to P2Pool to a Bitcoin address will make it mine to that address instead of the one requested from bitcoind or set by -a&lt;br /&gt;
* Appending &amp;quot;/1000&amp;quot; to a miner&#039;s username will increase the difficulty of producing a P2Pool share to at most 1000. This is useful to large miners because doing this can make it easier for small miners while minimally impacting the large miners themselves. See [https://bitcointalk.org/index.php?topic=18313.msg816322#msg816322 recommended values].&lt;br /&gt;
** Appending &amp;quot;+1&amp;quot; (for example) after that will make P2Pool always give your miners work with a difficulty of 1&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
Lots of data and useful tools are available at http://127.0.0.1:9332/something:&lt;br /&gt;
* /static/ - Lots of information from shares to graphs to payouts.&lt;br /&gt;
* /rate&lt;br /&gt;
* /users&lt;br /&gt;
* /fee&lt;br /&gt;
* /current_payouts&lt;br /&gt;
* /patron_sendmany - Gives sendmany outputs for fair donations to P2Pool&lt;br /&gt;
* /global_stats&lt;br /&gt;
* /local_stats&lt;br /&gt;
* /peer_addresses&lt;br /&gt;
* /payout_addr&lt;br /&gt;
* /recent_blocks&lt;br /&gt;
* /uptime&lt;br /&gt;
* /web/log - Some different stats collected over the last day&lt;br /&gt;
&lt;br /&gt;
=== Included README ===&lt;br /&gt;
&amp;lt;pre&amp;gt;Requirements:&lt;br /&gt;
    Generic:&lt;br /&gt;
        Bitcoin &amp;gt;=0.6.0rc4 or Bitcoin &amp;gt;=0.5.4 (for BIP16 support) or Litecoin&lt;br /&gt;
        Python&lt;br /&gt;
        Twisted&lt;br /&gt;
        python-argparse (for Python &amp;lt;=2.6)&lt;br /&gt;
    &lt;br /&gt;
    Linux:&lt;br /&gt;
        sudo apt-get install python-zope.interface python-twisted python-twisted-web&lt;br /&gt;
        sudo apt-get install python-argparse # if on Python 2.6 or older&lt;br /&gt;
    &lt;br /&gt;
    Windows:&lt;br /&gt;
        Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
        Install Twisted: http://twistedmatrix.com/trac/wiki/Downloads&lt;br /&gt;
        Install Zope.Interface: http://pypi.python.org/pypi/zope.interface/3.8.0&lt;br /&gt;
            Unzip the files into C:\Python27\Lib\site-packages&lt;br /&gt;
&lt;br /&gt;
Running P2Pool:&lt;br /&gt;
    To use P2Pool, you must be running your own local bitcoind. For standard&lt;br /&gt;
    configurations, using P2Pool should be as simple as:&lt;br /&gt;
&lt;br /&gt;
        python run_p2pool.py&lt;br /&gt;
&lt;br /&gt;
    Then run your miner program, connecting to 127.0.0.1 on port 9332 with any&lt;br /&gt;
    username and password.&lt;br /&gt;
&lt;br /&gt;
    If you are behind a NAT, you should enable TCP port forwarding on your&lt;br /&gt;
    router. Forward port 9333 to the host running P2Pool.&lt;br /&gt;
&lt;br /&gt;
    Run &amp;quot;python run_p2pool.py --help&amp;quot; for additional options.&lt;br /&gt;
&lt;br /&gt;
Notes for Litecoin:&lt;br /&gt;
    Requirements:&lt;br /&gt;
        In order to run P2Pool with the Litecoin network, you would need to build and install the&lt;br /&gt;
        ltc_scrypt module that includes the scrypt proof of work code that Litecoin uses for hashes.&lt;br /&gt;
&lt;br /&gt;
        Linux:&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
        Windows:&lt;br /&gt;
            Install MinGW: http://www.mingw.org/wiki/Getting_Started&lt;br /&gt;
            Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            C:\Python27\python.exe setup.py build --compile=mingw32 install&lt;br /&gt;
&lt;br /&gt;
            If you run into an error with unrecognized command line option &#039;-mno-cygwin&#039;, see this:&lt;br /&gt;
                http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o&lt;br /&gt;
    &lt;br /&gt;
    Running P2Pool:&lt;br /&gt;
        Run P2Pool with the &amp;quot;--net litecoin&amp;quot; option.&lt;br /&gt;
        Run your miner program, connecting to 127.0.0.1 on port 9327.&lt;br /&gt;
        Forward port 9338 to the host running P2Pool.&lt;br /&gt;
        &lt;br /&gt;
        Litecoin&#039;s use of ports 9332 and 9332 conflicts with P2Pool running on&lt;br /&gt;
        the Bitcoin network. To avoid problems, add these lines to litecoin.conf&lt;br /&gt;
        and restart litecoind:&lt;br /&gt;
            rpcport=10332&lt;br /&gt;
            port=10333&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option Reference ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
usage: run_p2pool.py [-h] [--version] [--net {bitcoin,litecoin}] [--testnet]&lt;br /&gt;
                     [--debug] [-a ADDRESS] [--datadir DATADIR]&lt;br /&gt;
                     [--logfile LOGFILE] [--merged MERGED_URLS]&lt;br /&gt;
                     [--give-author DONATION_PERCENTAGE] [--iocp]&lt;br /&gt;
                     [--irc-announce] [--no-bugreport] [--p2pool-port PORT]&lt;br /&gt;
                     [-n ADDR[:PORT]] [--disable-upnp] [--max-conns CONNS]&lt;br /&gt;
                     [-w PORT or ADDR:PORT] [-f FEE_PERCENTAGE]&lt;br /&gt;
                     [--bitcoind-address BITCOIND_ADDRESS]&lt;br /&gt;
                     [--bitcoind-rpc-port BITCOIND_RPC_PORT]&lt;br /&gt;
                     [--bitcoind-p2p-port BITCOIND_P2P_PORT]&lt;br /&gt;
                     [BITCOIND_RPCUSERPASS [BITCOIND_RPCUSERPASS ...]]&lt;br /&gt;
&lt;br /&gt;
p2pool (version 0.11.1-8-ged9359d)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  --version             show program&#039;s version number and exit&lt;br /&gt;
  --net {bitcoin,litecoin}&lt;br /&gt;
                        use specified network (default: bitcoin)&lt;br /&gt;
  --testnet             use the network&#039;s testnet&lt;br /&gt;
  --debug               enable debugging mode&lt;br /&gt;
  -a ADDRESS, --address ADDRESS&lt;br /&gt;
                        generate payouts to this address (default: &amp;lt;address&lt;br /&gt;
                        requested from bitcoind&amp;gt;)&lt;br /&gt;
  --datadir DATADIR     store data in this directory (default: &amp;lt;directory&lt;br /&gt;
                        run_p2pool.py is in&amp;gt;/data)&lt;br /&gt;
  --logfile LOGFILE     log to this file (default: data/&amp;lt;NET&amp;gt;/log)&lt;br /&gt;
  --merged MERGED_URLS  call getauxblock on this url to get work for merged&lt;br /&gt;
                        mining (example:&lt;br /&gt;
                        http://ncuser:ncpass@127.0.0.1:10332/)&lt;br /&gt;
  --give-author DONATION_PERCENTAGE&lt;br /&gt;
                        donate this percentage of work towards the development&lt;br /&gt;
                        of p2pool (default: 0.5)&lt;br /&gt;
  --iocp                use Windows IOCP API in order to avoid errors due to&lt;br /&gt;
                        large number of sockets being open&lt;br /&gt;
  --irc-announce        announce any blocks found on&lt;br /&gt;
                        irc://irc.freenode.net/#p2pool&lt;br /&gt;
  --no-bugreport        disable submitting caught exceptions to the author&lt;br /&gt;
  --disable-upnp        don&#039;t attempt to use UPnP to forward p2pool&#039;s P2P port&lt;br /&gt;
                        from the Internet to this computer&lt;br /&gt;
&lt;br /&gt;
p2pool interface:&lt;br /&gt;
  --p2pool-port PORT    use port PORT to listen for connections (forward this&lt;br /&gt;
                        port from your router!) (default: bitcoin:9333,&lt;br /&gt;
                        litecoin:9338)&lt;br /&gt;
  -n ADDR[:PORT], --p2pool-node ADDR[:PORT]&lt;br /&gt;
                        connect to existing p2pool node at ADDR listening on&lt;br /&gt;
                        port PORT (defaults to default p2pool P2P port) in&lt;br /&gt;
                        addition to builtin addresses&lt;br /&gt;
  --max-conns CONNS     maximum incoming connections (default: 40)&lt;br /&gt;
&lt;br /&gt;
worker interface:&lt;br /&gt;
  -w PORT or ADDR:PORT, --worker-port PORT or ADDR:PORT&lt;br /&gt;
                        listen on PORT on interface with ADDR for RPC&lt;br /&gt;
                        connections from miners (default: all interfaces,&lt;br /&gt;
                        bitcoin:9332, litecoin:9327)&lt;br /&gt;
  -f FEE_PERCENTAGE, --fee FEE_PERCENTAGE&lt;br /&gt;
                        charge workers mining to their own bitcoin address (by&lt;br /&gt;
                        setting their miner&#039;s username to a bitcoin address)&lt;br /&gt;
                        this percentage fee to mine on your p2pool instance.&lt;br /&gt;
                        Amount displayed at http://127.0.0.1:WORKER_PORT/fee&lt;br /&gt;
                        (default: 0)&lt;br /&gt;
&lt;br /&gt;
bitcoind interface:&lt;br /&gt;
  --bitcoind-address BITCOIND_ADDRESS&lt;br /&gt;
                        connect to this address (default: 127.0.0.1)&lt;br /&gt;
  --bitcoind-rpc-port BITCOIND_RPC_PORT&lt;br /&gt;
                        connect to JSON-RPC interface at this port (default:&lt;br /&gt;
                        bitcoin:8332, litecoin:9332 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  --bitcoind-p2p-port BITCOIND_P2P_PORT&lt;br /&gt;
                        connect to P2P interface at this port (default:&lt;br /&gt;
                        bitcoin:8333, litecoin:9333 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  BITCOIND_RPCUSERPASS  bitcoind RPC interface username, then password, space-&lt;br /&gt;
                        separated (only one being provided will cause the&lt;br /&gt;
                        username to default to being empty, and none will&lt;br /&gt;
                        cause P2Pool to read them from bitcoin.conf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interoperability table ==&lt;br /&gt;
P2pool works fine with most hardware. This lists some of the hardware confirmed to work and any special configuration required.&lt;br /&gt;
&lt;br /&gt;
* ASICminer blade 10GH/s (Requires adding +1 to username or proxy)&lt;br /&gt;
* Avalon 110nm 60-110 GH/s (All batches)&lt;br /&gt;
* Avalon based 55nm 200 GH/s (specific makers?)&lt;br /&gt;
* Avalon prototype 55nm 120GH/s (~ 20 exist)&lt;br /&gt;
* Icarus FPGA&lt;br /&gt;
* Bitfury strikes back H-card and M-card ([https://bitcointalk.org/index.php?topic=18313.msg4424081#msg4424081 instructions])&lt;br /&gt;
* Bitmain Antminer S1 180GH/s ([https://github.com/AntMiner/AntGen1/tree/master/firmware Requires 20131226 firmware.])&lt;br /&gt;
* Bitmain Antminer S3 440GH/s&lt;br /&gt;
* BFL SC Jalapeno, SC Single 30, 50, &amp;amp; 60 GH/s&lt;br /&gt;
&lt;br /&gt;
(Various GPU and most FPGAs other than BFL single FPGAs work fine too)&lt;br /&gt;
&lt;br /&gt;
This is a list of hardware with known issues that should not be used on p2pool.&lt;br /&gt;
&lt;br /&gt;
* Cointerra Terraminer IV (10-20% hash rate loss when mining on p2pool)&lt;br /&gt;
* Btimain Antminer S2 (10-20% hash rate loss when mining on p2pool, the S1 &amp;amp; S3 both work well on p2pool)&lt;br /&gt;
&lt;br /&gt;
== Protocol description ==&lt;br /&gt;
&lt;br /&gt;
P2Pool&#039;s protocol mirrors Bitcoin&#039;s P2P protocol in many ways. It uses the same framing (prefix, command, length, checksum, payload) and similar commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;version&#039;&#039;&#039; - sent to establish a connection - contains (&#039;&#039;version&#039;&#039;, &#039;&#039;services&#039;&#039;, &#039;&#039;addr_to&#039;&#039;, &#039;&#039;addr_from&#039;&#039;, &#039;&#039;nonce&#039;&#039;, &#039;&#039;sub_version&#039;&#039;, &#039;&#039;mode&#039;&#039;, &#039;&#039;best_share_hash&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;setmode&#039;&#039;&#039; - sent to update the &#039;&#039;mode&#039;&#039; sent in the &#039;&#039;&#039;version&#039;&#039;&#039; message - contains (&#039;&#039;mode&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;ping&#039;&#039;&#039; - sent to keep connection alive - contains ()&lt;br /&gt;
* &#039;&#039;&#039;addrme&#039;&#039;&#039; - request that the receiving node send out an addr for the sending node - contains (&#039;&#039;port&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;addrs&#039;&#039;&#039; - broadcast list of nodes&#039; addresses - contains (&#039;&#039;addrs&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getaddrs&#039;&#039;&#039; - request that the receiving node send &#039;&#039;count&#039;&#039; addrs - contains (&#039;&#039;count&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getshares&#039;&#039;&#039; - request that the receiving node send the shares referenced by &#039;&#039;hashes&#039;&#039; and &#039;&#039;parents&#039;&#039; of their parents, stopping at any share referenced by &#039;&#039;stops&#039;&#039; - contains (&#039;&#039;hashes&#039;&#039;, &#039;&#039;parents&#039;&#039;, &#039;&#039;stops&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;shares&#039;&#039;&#039; - broadcast message of the contents of shares - contains (&#039;&#039;shares&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
This project was announced on June 17, 2011 by Forrest Voight&amp;lt;ref&amp;gt;[https://forum.bitcoin.org/index.php?topic=18313.0 p2pool: Decentralized, DoS-resistant, Hop-Proof - Now active on mainnet!]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The pool began testing against mainnet in mid-July, 2011.  The pool was reviewed on a [[Bitcoin Miner]] post on July 26, 2011&amp;lt;ref&amp;gt;[http://www.bitcoinminer.com/post/8101660461 P2Pool Decentralized Pool Nearly Ready For Prime-Time]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The software author&#039;s address for donations can be found in the signature section of his [http://forum.bitcoin.org/index.php?action=profile;u=6447 forum profile].&lt;br /&gt;
&lt;br /&gt;
==Donating to P2Pool miners==&lt;br /&gt;
In order to encourage people to mine to P2Pool you can donate to the recent miners in proportion using a sendmany:&lt;br /&gt;
&lt;br /&gt;
For example, a bash script to donate 10 btc is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can replace &amp;quot;&amp;quot; with &amp;quot;accountname&amp;quot; if you want to pay from some specific bitcoind account, and you need to replace 127.0.0.1 with the address of your P2Pool node if you&#039;re not running one locally.&lt;br /&gt;
&lt;br /&gt;
Note that the amount you donate will be allocated to recent miners in proportion to the amount of work they&#039;ve done in the last 24 hours or so, but all the miner whose shares of the donated amount are less than 0.01 BTC will have their shares combined into a single amount which is awarded to one of them at random, with the chance of winning this &#039;lottery&#039; weighted by the miner&#039;s recent amount of work done.  You can change this 0.01 BTC threshold like this, for example, which says to pay 10 BTC, but to share it amongst more miners that the default, cutting off at 0.001 BTC instead of at 0.01 BTC.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10/0.001)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you decide to donate you should announce it on the forums so that your donations provide the most incentive possible.&lt;br /&gt;
&lt;br /&gt;
==Sponsors==&lt;br /&gt;
&lt;br /&gt;
Thanks to:&lt;br /&gt;
&lt;br /&gt;
* The [https://bitcoinfoundation.org/ Bitcoin Foundation] for its generous support of P2Pool&lt;br /&gt;
* The [https://litecoin.org/ Litecoin Project] for its generous donations to P2Pool&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Comparison of mining pools]]&lt;br /&gt;
* [[Pooled Mining]]&lt;br /&gt;
* [[P2Pool code documentation]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [http://forum.bitcoin.org/index.php?topic=18313.0 P2Pool forum]&lt;br /&gt;
* [https://github.com/forrestv/p2pool p2pool] project on GitHub&lt;br /&gt;
* {{Freenode IRC|p2pool}} discussion and support&lt;br /&gt;
* [http://p2pool.info/ p2pool.info] stats page (appears broken since May 2014 and as of June 2014 - you can use http://ANY.NODE:9332/static/graphs.html )&lt;br /&gt;
* [http://p2pool.hostv.pl p2pool.hostv.pl] Public list of P2Pool BTC/LTC nodes.&lt;br /&gt;
* [http://p2pool-nodes.info/ p2pool-nodes.info] Another public list of P2Pool (BTC) nodes.&lt;br /&gt;
* [http://whatisp2pool.com whatisp2pool.com] An easy introduction to mining and P2Pool.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Pool Operators]]&lt;br /&gt;
{{Pools}}&lt;/div&gt;</summary>
		<author><name>CoinCadence</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=50316</id>
		<title>P2Pool</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=50316"/>
		<updated>2014-08-19T20:26:40Z</updated>

		<summary type="html">&lt;p&gt;CoinCadence: /* Interoperability table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{infobox company|name=P2Pool&lt;br /&gt;
|trading_name=P2Pool&lt;br /&gt;
|industry=[[Mining pool]]&lt;br /&gt;
|foundation=July 17, 2011&lt;br /&gt;
|hashrate=1.6 Phash/s&lt;br /&gt;
}}&lt;br /&gt;
Links: http://p2pool.in/ - https://github.com/forrestv/p2pool - https://en.bitcoin.it/wiki/P2Pool - https://bitcointalk.org/index.php?topic=18313&lt;br /&gt;
&lt;br /&gt;
[[Image:P2pool_chain.png‎|thumb|350px|right|Visualization of the P2Pool share chain]]&lt;br /&gt;
P2Pool is a decentralized [[Bitcoin]] [[Bitcoin Pool|mining pool]] that works by creating a peer-to-peer network of miner nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;P2Pool creates a new block chain in which the difficulty is adjusted so a new block is found every 30 seconds. The blocks that get into the P2Pool block chain (called the &amp;quot;share chain&amp;quot;) are the same blocks that would get into the Bitcoin block chain, only they have a lower difficulty target. Whenever a peer announces a new share found (new block in the P2Pool block chain), it is received by the other peers, and the other peers verify that this block contains payouts for all the previous miners who found a share (and announced it) that made it into the P2Pool share chain. This continues until some peer finds a block that has a difficulty that meets the Bitcoin network&#039;s difficulty target. This peer announces this block to the Bitcoin network and miners who have submitted shares for this block are paid in the generation transaction, proportionally to how many shares they have found in the last while. - Unknown author&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Decentralized payout pooling solves the problem of centralized mining pools degrading the decentralization of Bitcoin and avoids the risk of hard to detect theft by pool operators.&lt;br /&gt;
&lt;br /&gt;
Miners are configured to connect to a P2Pool node that can be run locally, alongside the miner. P2Pool users must run a full Bitcoin node which serves the purpose of independently validating transactions and the Bitcoin blockchain. P2Pool also supports merged mining and several alternative blockchains.&lt;br /&gt;
&lt;br /&gt;
P2Pool nodes work on a chain of shares similar to Bitcoin&#039;s blockchain. Each node works on a block that includes payouts to the previous shares&#039; owners and the node itself, which can also result in a share if it meets P2Pool&#039;s difficulty.&lt;br /&gt;
&lt;br /&gt;
Because of the importance of strengthening Bitcoin&#039;s decentralization, some Bitcoin supporters donate to P2Pool miners, resulting in average returns above 100% of the expected reward.&lt;br /&gt;
However, it should be noted that there are other pools (such as [[BitPenny]] and [[Eligius]]) which can provide this same level of decentralization.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
P2Pool shares form a &amp;quot;sharechain&amp;quot; with each share referencing the previous share&#039;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&#039;s hash, and the current target for shares), and a Merkle branch linking that generation transaction to the block header&#039;s Merkle hash.&lt;br /&gt;
&lt;br /&gt;
The chain continuously regulates its target to keep generation around one share every thirty seconds, just as Bitcoin regulates it to generate one block every ten minutes.&lt;br /&gt;
This means that finding shares becomes more difficult (resulting in higher variance) the more people mine on P2Pool, though large miners have the option to raise their difficulty, and so reduce the impact of their mining on P2Pool&#039;s minimum difficulty.&lt;br /&gt;
&lt;br /&gt;
Unlike Bitcoin, nodes do not know the entire chain - instead they only hold the last 8640 shares (the last 3 day&#039;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 that the shares reference, establishing a provable timestamp. (If a share points to a block, it was definitely made after that block was made.)&lt;br /&gt;
&lt;br /&gt;
=== Payout logic ===&lt;br /&gt;
&lt;br /&gt;
Each share contains a generation transaction that pays to the previous &#039;&#039;n&#039;&#039; shares, where &#039;&#039;n&#039;&#039; is the number of shares whose total work is equal to 3 times the average work required to solve a block, or 8640 (= 24 hours of shares), whichever is smaller. Payouts are weighted based on the amount of work each share took to solve, which is proportional to the p2pool difficulty at that time.&lt;br /&gt;
&lt;br /&gt;
The block reward (currently 25BTC) and the transaction fees are combined and apportioned according to these rules:&lt;br /&gt;
&lt;br /&gt;
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. (A miner with the aim to harm others could withhold the block, thereby preventing anybody from getting paid. He can NOT redirect the payout to himself.) The remaining 99.5% is distributed evenly to miners based on work done recently.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Stales ===&lt;br /&gt;
&lt;br /&gt;
On P2Pool stales refer to shares which can&#039;t make it into the sharechain.  Because the sharechain is 20 times faster than the Bitcoin chain many stales are common and expected. However, because the payout is [[Comparison_of_mining_pools|PPLNS]] only your stale rate relative to other nodes is relevant; the absolute rate is not.&lt;br /&gt;
&lt;br /&gt;
There are two reported kinds of stales in P2Pool: &amp;quot;DEAD ON ARRIVAL&amp;quot; shares and orphan shares. Dead shares were too old by the time they arrived at your local P2Pool. Very high dead rates can indicate miner misconfiguration. Orphan shares are shares which were not extended by the rest of the P2Pool network, because some other miner&#039;s share was accepted first. Very high orphan rates may indicate network connectivity problems. &lt;br /&gt;
&lt;br /&gt;
The P2Pool console output shows your relative stale rate compared to other P2Pool miners in the &#039;Own efficiency&#039; column:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2012-01-07 20:57:51.797420 Pool stales: 13% Own: 13±2% Own efficiency: 100±2%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you first start P2Pool claimed efficiency will be low and the error bounds on this estimate will be large, but as it runs the numbers will converge to their correct values.&lt;br /&gt;
&lt;br /&gt;
If your efficiency is unusually low, make sure your network connection isn&#039;t overloaded, that your miners support long polling and are not set to work for excessive amounts of time, and that your bitcoind has multiple connections.&lt;br /&gt;
&lt;br /&gt;
== Joining the pool ==&lt;br /&gt;
&lt;br /&gt;
Follow these steps to join the pool:&lt;br /&gt;
&lt;br /&gt;
* Run Bitcoin with the RPC interface enabled: edit bitcoin.conf to include:&lt;br /&gt;
 rpcuser=USER&lt;br /&gt;
 rpcpassword=LONG_RANDOM_SECRET_VALUE&lt;br /&gt;
 server=1&lt;br /&gt;
**&#039;&#039;&#039;Replace LONG_RANDOM_SECRET_VALUE with something long and random like the output of smashing your keyboard for a bit like fju4M78yAj3ds39pak92raK&#039;&#039;&#039;. You don&#039;t need to be able to remember it. If your RPC port becomes exposed to the internet a thief could steal your bitcoin if they could guess it, or use a brute force attack in order to find it.&lt;br /&gt;
** Bitcoin 0.8.5 or later is required&lt;br /&gt;
** It&#039;s important that your Bitcoin client be fully synchronized before starting. It&#039;s also better if you have the Bitcoin port forwarded&lt;br /&gt;
* Download p2pool:&lt;br /&gt;
** Windows binary: See http://forum.bitcoin.org/index.php?topic=18313.0&lt;br /&gt;
** Source download: https://github.com/forrestv/p2pool/tags&lt;br /&gt;
** git: git clone git://github.com/forrestv/p2pool.git&lt;br /&gt;
* Run p2pool: (See below for additional options.)&lt;br /&gt;
** Windows py2exe: run_p2pool.exe&lt;br /&gt;
** Source: python run_p2pool.py&lt;br /&gt;
* Run a miner daemon with long polling connecting to 127.0.0.1 (or the IP of the host running p2pool if it isn&#039;t on the same computer as the miner) on port 9332 with any username and password&lt;br /&gt;
** bfgminer -O u:p -o http://127.0.0.1:9332/ --submit-stales&lt;br /&gt;
&lt;br /&gt;
Dependencies if running from source:&lt;br /&gt;
* Python 2.6 or higher (but not 3.x)&lt;br /&gt;
* python-argparse&lt;br /&gt;
* Twisted (Ubuntu package python-twisted)&lt;br /&gt;
&lt;br /&gt;
=== Frequently Asked Questions ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Why does my miner report so many longpoll events when mining on p2pool? - P4Man&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; &amp;quot;Once every ~30 seconds is normal. That is how often p2pool shares are generated (as opposed to ~10 min for bitcoin blocks) - cabin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Do the &#039;orphan&#039; and &#039;dead&#039; shares in P2Pool&#039;s status display hurt me?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; They shouldn&#039;t - It&#039;s normal for some fraction of everyone&#039;s shares to end up orphaned or dead. Because payouts are calculated by counting how many shares you have relative to others, everyone with normal configurations is equally &amp;quot;hurt&amp;quot; by this. However, if you have a large proportion of stales, your payout will be hurt. You can see how well you&#039;re doing by looking at P2Pool&#039;s &amp;quot;Efficiency&amp;quot; (ex: &#039;&#039;Efficiency: ~110.6% (40-111%)&#039;&#039;). If 100% doesn&#039;t lie within the [http://en.wikipedia.org/wiki/Confidence_interval confidence interval] at the end, something is probably wrong (with 95% confidence).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;What do I do if my efficiency is low?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Make sure the computers you&#039;re running P2Pool and the miner on have enough memory and CPU time. If you have a lot of dead shares or the &amp;quot;Local dead on arrival&amp;quot; number is higher than a few percent, that means that something is wrong with your miner. Check to make sure that it is one of the working versions in the &#039;&#039;Miners&#039;&#039; section on this page. Lower the intensity or raise the FPS of your miner. If you have a lot of orphan shares, something is wrong with P2Pool&#039;s P2P connection. Decrease the load on your internet connection or enable QoS (Quality of Service) on your router.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What is PPLNS?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Pay-Per-Last-N-Shares is a payout method that is completely resistant to pool hoppers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I not getting very many shares?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The P2Pool difficulty is hundreds of times higher than on other pools. It can take time to get a share. P2Pool displays an estimate of how long you have to wait in the console output.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does my miner say it has found a lot of shares but p2pool say I have only found a few?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The real P2Pool difficulty is hundreds of times higher than on normal pools, but p2pool essentially lies to your miner and tells it to work on relatively easy shares so that it submits shares every few seconds instead of every few hours.  P2Pool then ignores any submitted shares that don&#039;t match the real share difficulty.  By doing this, P2Pool can more accurately report your local hash rate and you can see if you are having problems with too many stale shares quickly&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I getting so many rejects?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; You&#039;re using an incompatible miner. See the miners section here, increase your FPS on the miner, decrease the intensity, upgrade your miner, or try a different miner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What stops the pool operator or the block finder from stealing a block?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; A block solution is only worth anything because its hash matches Bitcoin&#039;s target. Altering anything within the block will change its hash and make it worthless. If you are concerned about the pool operator stealing a block, you should try to inspect the source code of each new version.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does it say &amp;quot;Generated?&amp;quot; I want to spend my coins now!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; P2Pool includes payouts in generation transactions, which must mature (taking 120 blocks or 20 hours) before they can be spent. The reason for this is that a block could be orphaned, which would make its payout invalid and could reverse transactions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I get paid transaction fees?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. They are split among P2Pool miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What are these payments I&#039;m getting that aren&#039;t generated?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; These are subsidies that people who support the idea of P2Pool send to miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Cool Subsidies sound like an awesome idea! How do I send some BTC to these awesome miners?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; See end of this page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I really need the WHOLE blockchain?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. Your node needs to be able to independently make decisions about what transactions to mine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; How do merged mining payments work?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Merged mining is handled entirely by namecoind, so you&#039;re solo mining and payouts will go into namecoind&#039;s wallet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Miners ===&lt;br /&gt;
&lt;br /&gt;
This is all for the latest p2pool version, as it includes several new workarounds. &lt;br /&gt;
&lt;br /&gt;
With all miners, using a HIGH FPS target (100?) or a LOW intensity (8 for bfgminer?) helps a lot with reducing stales.&lt;br /&gt;
&lt;br /&gt;
* bfgminer, cgminer, and ufasoft work perfectly without any extra options.&lt;br /&gt;
* DiabloMiner works fine after commit 3b731b9.&lt;br /&gt;
* Phoenix works fine after commit a658ef2.&lt;br /&gt;
* Poclbm works fine after commit 5e994e7.&lt;br /&gt;
&lt;br /&gt;
P2Pool uses higher difficulty shares than most centralized pools, so you&#039;ll see fewer shares reported. This is normal and doesn&#039;t reduce your payments.  It&#039;s also normal to see longpoll messages once per every ten seconds on average.&lt;br /&gt;
&lt;br /&gt;
====Tips to configure bfgminer to reduce stale/doa:====&lt;br /&gt;
* &amp;quot;gpu-threads&amp;quot; : &amp;quot;1&amp;quot;, (2 by default)&lt;br /&gt;
* &amp;quot;queue&amp;quot; : &amp;quot;0&amp;quot;, (1 by default)&lt;br /&gt;
&lt;br /&gt;
Because of fast longpooling in p2pool it is better not NOT fetch work ahead.&lt;br /&gt;
&lt;br /&gt;
On non-dedicated machines intensity=3 allows normal usage of PC, set it to 7 or more to get full hashrate.&lt;br /&gt;
&lt;br /&gt;
On most cards best is diablo and phatk kernel, looks like poclbm kernel have unstable rate.&lt;br /&gt;
&lt;br /&gt;
=== Useful features ===&lt;br /&gt;
&lt;br /&gt;
* If upgrading P2Pool or changing its configuration, you can start another instance of P2Pool in parallel with the first. It will start normally, but realize that the worker and P2P listening ports are busy and keep trying to bind to them in the background. Thus, you can do almost-completely-seamless upgrades of P2Pool.&lt;br /&gt;
* If you run multiple P2Pool nodes or have trusted friends that run P2Pool, you can use &#039;&#039;-n&#039;&#039; to establish a constant extra P2P connection to them.&lt;br /&gt;
* You can make P2Pool use a configuration file by running run_p2pool.py @FILENAME, with FILENAME being the path to a file containing the command-line arguments (newlines are ignored) Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--net bitcoin&lt;br /&gt;
-n 1.2.3.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Setting the username of your miner connecting to P2Pool to a Bitcoin address will make it mine to that address instead of the one requested from bitcoind or set by -a&lt;br /&gt;
* Appending &amp;quot;/1000&amp;quot; to a miner&#039;s username will increase the difficulty of producing a P2Pool share to at most 1000. This is useful to large miners because doing this can make it easier for small miners while minimally impacting the large miners themselves. See [https://bitcointalk.org/index.php?topic=18313.msg816322#msg816322 recommended values].&lt;br /&gt;
** Appending &amp;quot;+1&amp;quot; (for example) after that will make P2Pool always give your miners work with a difficulty of 1&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
Lots of data and useful tools are available at http://127.0.0.1:9332/something:&lt;br /&gt;
* /static/ - Lots of information from shares to graphs to payouts.&lt;br /&gt;
* /rate&lt;br /&gt;
* /users&lt;br /&gt;
* /fee&lt;br /&gt;
* /current_payouts&lt;br /&gt;
* /patron_sendmany - Gives sendmany outputs for fair donations to P2Pool&lt;br /&gt;
* /global_stats&lt;br /&gt;
* /local_stats&lt;br /&gt;
* /peer_addresses&lt;br /&gt;
* /payout_addr&lt;br /&gt;
* /recent_blocks&lt;br /&gt;
* /uptime&lt;br /&gt;
* /web/log - Some different stats collected over the last day&lt;br /&gt;
&lt;br /&gt;
=== Included README ===&lt;br /&gt;
&amp;lt;pre&amp;gt;Requirements:&lt;br /&gt;
    Generic:&lt;br /&gt;
        Bitcoin &amp;gt;=0.6.0rc4 or Bitcoin &amp;gt;=0.5.4 (for BIP16 support) or Litecoin&lt;br /&gt;
        Python&lt;br /&gt;
        Twisted&lt;br /&gt;
        python-argparse (for Python &amp;lt;=2.6)&lt;br /&gt;
    &lt;br /&gt;
    Linux:&lt;br /&gt;
        sudo apt-get install python-zope.interface python-twisted python-twisted-web&lt;br /&gt;
        sudo apt-get install python-argparse # if on Python 2.6 or older&lt;br /&gt;
    &lt;br /&gt;
    Windows:&lt;br /&gt;
        Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
        Install Twisted: http://twistedmatrix.com/trac/wiki/Downloads&lt;br /&gt;
        Install Zope.Interface: http://pypi.python.org/pypi/zope.interface/3.8.0&lt;br /&gt;
            Unzip the files into C:\Python27\Lib\site-packages&lt;br /&gt;
&lt;br /&gt;
Running P2Pool:&lt;br /&gt;
    To use P2Pool, you must be running your own local bitcoind. For standard&lt;br /&gt;
    configurations, using P2Pool should be as simple as:&lt;br /&gt;
&lt;br /&gt;
        python run_p2pool.py&lt;br /&gt;
&lt;br /&gt;
    Then run your miner program, connecting to 127.0.0.1 on port 9332 with any&lt;br /&gt;
    username and password.&lt;br /&gt;
&lt;br /&gt;
    If you are behind a NAT, you should enable TCP port forwarding on your&lt;br /&gt;
    router. Forward port 9333 to the host running P2Pool.&lt;br /&gt;
&lt;br /&gt;
    Run &amp;quot;python run_p2pool.py --help&amp;quot; for additional options.&lt;br /&gt;
&lt;br /&gt;
Notes for Litecoin:&lt;br /&gt;
    Requirements:&lt;br /&gt;
        In order to run P2Pool with the Litecoin network, you would need to build and install the&lt;br /&gt;
        ltc_scrypt module that includes the scrypt proof of work code that Litecoin uses for hashes.&lt;br /&gt;
&lt;br /&gt;
        Linux:&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
        Windows:&lt;br /&gt;
            Install MinGW: http://www.mingw.org/wiki/Getting_Started&lt;br /&gt;
            Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            C:\Python27\python.exe setup.py build --compile=mingw32 install&lt;br /&gt;
&lt;br /&gt;
            If you run into an error with unrecognized command line option &#039;-mno-cygwin&#039;, see this:&lt;br /&gt;
                http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o&lt;br /&gt;
    &lt;br /&gt;
    Running P2Pool:&lt;br /&gt;
        Run P2Pool with the &amp;quot;--net litecoin&amp;quot; option.&lt;br /&gt;
        Run your miner program, connecting to 127.0.0.1 on port 9327.&lt;br /&gt;
        Forward port 9338 to the host running P2Pool.&lt;br /&gt;
        &lt;br /&gt;
        Litecoin&#039;s use of ports 9332 and 9332 conflicts with P2Pool running on&lt;br /&gt;
        the Bitcoin network. To avoid problems, add these lines to litecoin.conf&lt;br /&gt;
        and restart litecoind:&lt;br /&gt;
            rpcport=10332&lt;br /&gt;
            port=10333&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option Reference ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
usage: run_p2pool.py [-h] [--version] [--net {bitcoin,litecoin}] [--testnet]&lt;br /&gt;
                     [--debug] [-a ADDRESS] [--datadir DATADIR]&lt;br /&gt;
                     [--logfile LOGFILE] [--merged MERGED_URLS]&lt;br /&gt;
                     [--give-author DONATION_PERCENTAGE] [--iocp]&lt;br /&gt;
                     [--irc-announce] [--no-bugreport] [--p2pool-port PORT]&lt;br /&gt;
                     [-n ADDR[:PORT]] [--disable-upnp] [--max-conns CONNS]&lt;br /&gt;
                     [-w PORT or ADDR:PORT] [-f FEE_PERCENTAGE]&lt;br /&gt;
                     [--bitcoind-address BITCOIND_ADDRESS]&lt;br /&gt;
                     [--bitcoind-rpc-port BITCOIND_RPC_PORT]&lt;br /&gt;
                     [--bitcoind-p2p-port BITCOIND_P2P_PORT]&lt;br /&gt;
                     [BITCOIND_RPCUSERPASS [BITCOIND_RPCUSERPASS ...]]&lt;br /&gt;
&lt;br /&gt;
p2pool (version 0.11.1-8-ged9359d)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  --version             show program&#039;s version number and exit&lt;br /&gt;
  --net {bitcoin,litecoin}&lt;br /&gt;
                        use specified network (default: bitcoin)&lt;br /&gt;
  --testnet             use the network&#039;s testnet&lt;br /&gt;
  --debug               enable debugging mode&lt;br /&gt;
  -a ADDRESS, --address ADDRESS&lt;br /&gt;
                        generate payouts to this address (default: &amp;lt;address&lt;br /&gt;
                        requested from bitcoind&amp;gt;)&lt;br /&gt;
  --datadir DATADIR     store data in this directory (default: &amp;lt;directory&lt;br /&gt;
                        run_p2pool.py is in&amp;gt;/data)&lt;br /&gt;
  --logfile LOGFILE     log to this file (default: data/&amp;lt;NET&amp;gt;/log)&lt;br /&gt;
  --merged MERGED_URLS  call getauxblock on this url to get work for merged&lt;br /&gt;
                        mining (example:&lt;br /&gt;
                        http://ncuser:ncpass@127.0.0.1:10332/)&lt;br /&gt;
  --give-author DONATION_PERCENTAGE&lt;br /&gt;
                        donate this percentage of work towards the development&lt;br /&gt;
                        of p2pool (default: 0.5)&lt;br /&gt;
  --iocp                use Windows IOCP API in order to avoid errors due to&lt;br /&gt;
                        large number of sockets being open&lt;br /&gt;
  --irc-announce        announce any blocks found on&lt;br /&gt;
                        irc://irc.freenode.net/#p2pool&lt;br /&gt;
  --no-bugreport        disable submitting caught exceptions to the author&lt;br /&gt;
  --disable-upnp        don&#039;t attempt to use UPnP to forward p2pool&#039;s P2P port&lt;br /&gt;
                        from the Internet to this computer&lt;br /&gt;
&lt;br /&gt;
p2pool interface:&lt;br /&gt;
  --p2pool-port PORT    use port PORT to listen for connections (forward this&lt;br /&gt;
                        port from your router!) (default: bitcoin:9333,&lt;br /&gt;
                        litecoin:9338)&lt;br /&gt;
  -n ADDR[:PORT], --p2pool-node ADDR[:PORT]&lt;br /&gt;
                        connect to existing p2pool node at ADDR listening on&lt;br /&gt;
                        port PORT (defaults to default p2pool P2P port) in&lt;br /&gt;
                        addition to builtin addresses&lt;br /&gt;
  --max-conns CONNS     maximum incoming connections (default: 40)&lt;br /&gt;
&lt;br /&gt;
worker interface:&lt;br /&gt;
  -w PORT or ADDR:PORT, --worker-port PORT or ADDR:PORT&lt;br /&gt;
                        listen on PORT on interface with ADDR for RPC&lt;br /&gt;
                        connections from miners (default: all interfaces,&lt;br /&gt;
                        bitcoin:9332, litecoin:9327)&lt;br /&gt;
  -f FEE_PERCENTAGE, --fee FEE_PERCENTAGE&lt;br /&gt;
                        charge workers mining to their own bitcoin address (by&lt;br /&gt;
                        setting their miner&#039;s username to a bitcoin address)&lt;br /&gt;
                        this percentage fee to mine on your p2pool instance.&lt;br /&gt;
                        Amount displayed at http://127.0.0.1:WORKER_PORT/fee&lt;br /&gt;
                        (default: 0)&lt;br /&gt;
&lt;br /&gt;
bitcoind interface:&lt;br /&gt;
  --bitcoind-address BITCOIND_ADDRESS&lt;br /&gt;
                        connect to this address (default: 127.0.0.1)&lt;br /&gt;
  --bitcoind-rpc-port BITCOIND_RPC_PORT&lt;br /&gt;
                        connect to JSON-RPC interface at this port (default:&lt;br /&gt;
                        bitcoin:8332, litecoin:9332 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  --bitcoind-p2p-port BITCOIND_P2P_PORT&lt;br /&gt;
                        connect to P2P interface at this port (default:&lt;br /&gt;
                        bitcoin:8333, litecoin:9333 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  BITCOIND_RPCUSERPASS  bitcoind RPC interface username, then password, space-&lt;br /&gt;
                        separated (only one being provided will cause the&lt;br /&gt;
                        username to default to being empty, and none will&lt;br /&gt;
                        cause P2Pool to read them from bitcoin.conf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interoperability table ==&lt;br /&gt;
P2pool works fine with most hardware. This lists some of the hardware confirmed to work and any special configuration required.&lt;br /&gt;
&lt;br /&gt;
* ASICminer blade 10GH/s (Requires adding +1 to username or proxy)&lt;br /&gt;
* Avalon 110nm 60-110 GH/s (All batches)&lt;br /&gt;
* Avalon based 55nm 200 GH/s (specific makers?)&lt;br /&gt;
* Avalon prototype 55nm 120GH/s (~ 20 exist)&lt;br /&gt;
* Icarus FPGA&lt;br /&gt;
* Bitfury strikes back H-card and M-card ([https://bitcointalk.org/index.php?topic=18313.msg4424081#msg4424081 instructions])&lt;br /&gt;
* Bitmain Antminer S1 180GH/s ([https://github.com/AntMiner/AntGen1/tree/master/firmware Requires 20131226 firmware.])&lt;br /&gt;
* Bitmain Antminer S3 440GH/s&lt;br /&gt;
* BFL SC Jalapeno, SC Single 30, 50, &amp;amp; 60 GH/s&lt;br /&gt;
&lt;br /&gt;
(Various GPU and most FPGAs other than BFL single FPGAs work fine too)&lt;br /&gt;
&lt;br /&gt;
This is alist of hardware with known issues that should not be used on p2pool.&lt;br /&gt;
&lt;br /&gt;
* Cointerra Terraminer IV (10-20% hash rate loss when mining on p2pool)&lt;br /&gt;
* Btimain Antminer S2 (10-20% hash rate loss when mining on p2pool, the S1 &amp;amp; S3 both work well on p2pool)&lt;br /&gt;
&lt;br /&gt;
== Protocol description ==&lt;br /&gt;
&lt;br /&gt;
P2Pool&#039;s protocol mirrors Bitcoin&#039;s P2P protocol in many ways. It uses the same framing (prefix, command, length, checksum, payload) and similar commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;version&#039;&#039;&#039; - sent to establish a connection - contains (&#039;&#039;version&#039;&#039;, &#039;&#039;services&#039;&#039;, &#039;&#039;addr_to&#039;&#039;, &#039;&#039;addr_from&#039;&#039;, &#039;&#039;nonce&#039;&#039;, &#039;&#039;sub_version&#039;&#039;, &#039;&#039;mode&#039;&#039;, &#039;&#039;best_share_hash&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;setmode&#039;&#039;&#039; - sent to update the &#039;&#039;mode&#039;&#039; sent in the &#039;&#039;&#039;version&#039;&#039;&#039; message - contains (&#039;&#039;mode&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;ping&#039;&#039;&#039; - sent to keep connection alive - contains ()&lt;br /&gt;
* &#039;&#039;&#039;addrme&#039;&#039;&#039; - request that the receiving node send out an addr for the sending node - contains (&#039;&#039;port&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;addrs&#039;&#039;&#039; - broadcast list of nodes&#039; addresses - contains (&#039;&#039;addrs&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getaddrs&#039;&#039;&#039; - request that the receiving node send &#039;&#039;count&#039;&#039; addrs - contains (&#039;&#039;count&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getshares&#039;&#039;&#039; - request that the receiving node send the shares referenced by &#039;&#039;hashes&#039;&#039; and &#039;&#039;parents&#039;&#039; of their parents, stopping at any share referenced by &#039;&#039;stops&#039;&#039; - contains (&#039;&#039;hashes&#039;&#039;, &#039;&#039;parents&#039;&#039;, &#039;&#039;stops&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;shares&#039;&#039;&#039; - broadcast message of the contents of shares - contains (&#039;&#039;shares&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
This project was announced on June 17, 2011 by Forrest Voight&amp;lt;ref&amp;gt;[https://forum.bitcoin.org/index.php?topic=18313.0 p2pool: Decentralized, DoS-resistant, Hop-Proof - Now active on mainnet!]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The pool began testing against mainnet in mid-July, 2011.  The pool was reviewed on a [[Bitcoin Miner]] post on July 26, 2011&amp;lt;ref&amp;gt;[http://www.bitcoinminer.com/post/8101660461 P2Pool Decentralized Pool Nearly Ready For Prime-Time]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The software author&#039;s address for donations can be found in the signature section of his [http://forum.bitcoin.org/index.php?action=profile;u=6447 forum profile].&lt;br /&gt;
&lt;br /&gt;
==Donating to P2Pool miners==&lt;br /&gt;
In order to encourage people to mine to P2Pool you can donate to the recent miners in proportion using a sendmany:&lt;br /&gt;
&lt;br /&gt;
For example, a bash script to donate 10 btc is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can replace &amp;quot;&amp;quot; with &amp;quot;accountname&amp;quot; if you want to pay from some specific bitcoind account, and you need to replace 127.0.0.1 with the address of your P2Pool node if you&#039;re not running one locally.&lt;br /&gt;
&lt;br /&gt;
Note that the amount you donate will be allocated to recent miners in proportion to the amount of work they&#039;ve done in the last 24 hours or so, but all the miner whose shares of the donated amount are less than 0.01 BTC will have their shares combined into a single amount which is awarded to one of them at random, with the chance of winning this &#039;lottery&#039; weighted by the miner&#039;s recent amount of work done.  You can change this 0.01 BTC threshold like this, for example, which says to pay 10 BTC, but to share it amongst more miners that the default, cutting off at 0.001 BTC instead of at 0.01 BTC.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10/0.001)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you decide to donate you should announce it on the forums so that your donations provide the most incentive possible.&lt;br /&gt;
&lt;br /&gt;
==Sponsors==&lt;br /&gt;
&lt;br /&gt;
Thanks to:&lt;br /&gt;
&lt;br /&gt;
* The [https://bitcoinfoundation.org/ Bitcoin Foundation] for its generous support of P2Pool&lt;br /&gt;
* The [https://litecoin.org/ Litecoin Project] for its generous donations to P2Pool&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Comparison of mining pools]]&lt;br /&gt;
* [[Pooled Mining]]&lt;br /&gt;
* [[P2Pool code documentation]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [http://forum.bitcoin.org/index.php?topic=18313.0 P2Pool forum]&lt;br /&gt;
* [https://github.com/forrestv/p2pool p2pool] project on GitHub&lt;br /&gt;
* {{Freenode IRC|p2pool}} discussion and support&lt;br /&gt;
* [http://p2pool.info/ p2pool.info] stats page (appears broken since May 2014 and as of June 2014 - you can use http://ANY.NODE:9332/static/graphs.html )&lt;br /&gt;
* [http://p2pool.hostv.pl p2pool.hostv.pl] Public list of P2Pool BTC/LTC nodes.&lt;br /&gt;
* [http://p2pool-nodes.info/ p2pool-nodes.info] Another public list of P2Pool (BTC) nodes.&lt;br /&gt;
* [http://whatisp2pool.com whatisp2pool.com] An easy introduction to mining and P2Pool.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Pool Operators]]&lt;br /&gt;
{{Pools}}&lt;/div&gt;</summary>
		<author><name>CoinCadence</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=49119</id>
		<title>P2Pool</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=49119"/>
		<updated>2014-07-24T22:18:03Z</updated>

		<summary type="html">&lt;p&gt;CoinCadence: /* Interoperability table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Links: http://p2pool.in/ - https://github.com/forrestv/p2pool - https://en.bitcoin.it/wiki/P2Pool - https://bitcointalk.org/index.php?topic=18313&lt;br /&gt;
&lt;br /&gt;
[[Image:P2pool_chain.png‎|thumb|350px|right|Visualization of the P2Pool share chain]]&lt;br /&gt;
P2Pool is a decentralized [[Bitcoin]] [[Bitcoin Pool|mining pool]] that works by creating a peer-to-peer network of miner nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;P2Pool creates a new block chain in which the difficulty is adjusted so a new block is found every 30 seconds. The blocks that get into the P2Pool block chain (called the &amp;quot;share chain&amp;quot;) are the same blocks that would get into the Bitcoin block chain, only they have a lower difficulty target. Whenever a peer announces a new share found (new block in the P2Pool block chain), it is received by the other peers, and the other peers verify that this block contains payouts for all the previous miners who found a share (and announced it) that made it into the P2Pool share chain. This continues until some peer finds a block that has a difficulty that meets the Bitcoin network&#039;s difficulty target. This peer announces this block to the Bitcoin network and miners who have submitted shares for this block are paid in the generation transaction, proportionally to how many shares they have found in the last while. - Unknown author&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Decentralized payout pooling solves the problem of centralized mining pools degrading the decentralization of Bitcoin and avoids the risk of hard to detect theft by pool operators.&lt;br /&gt;
&lt;br /&gt;
Miners are configured to connect to a P2Pool node that can be run locally, alongside the miner. P2Pool users must run a full Bitcoin node which serves the purpose of independently validating transactions and the Bitcoin blockchain. P2Pool also supports merged mining and several alternative blockchains.&lt;br /&gt;
&lt;br /&gt;
P2Pool nodes work on a chain of shares similar to Bitcoin&#039;s blockchain. Each node works on a block that includes payouts to the previous shares&#039; owners and the node itself, which can also result in a share if it meets P2Pool&#039;s difficulty.&lt;br /&gt;
&lt;br /&gt;
Because of the importance of strengthening Bitcoin&#039;s decentralization, some Bitcoin supporters donate to P2Pool miners, resulting in average returns above 100% of the expected reward.&lt;br /&gt;
However, it should be noted that there are other pools (such as [[BitPenny]] and [[Eligius]]) which can provide this same level of decentralization.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
P2Pool shares form a &amp;quot;sharechain&amp;quot; with each share referencing the previous share&#039;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&#039;s hash, and the current target for shares), and a Merkle branch linking that generation transaction to the block header&#039;s Merkle hash.&lt;br /&gt;
&lt;br /&gt;
The chain continuously regulates its target to keep generation around one share every thirty seconds, just as Bitcoin regulates it to generate one block every ten minutes.&lt;br /&gt;
This means that finding shares becomes more difficult (resulting in higher variance) the more people mine on P2Pool, though large miners have the option to raise their difficulty, and so reduce the impact of their mining on P2Pool&#039;s minimum difficulty.&lt;br /&gt;
&lt;br /&gt;
Unlike Bitcoin, nodes do not know the entire chain - instead they only hold the last 8640 shares (the last day&#039;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 that the shares reference, establishing a provable timestamp. (If a share points to a block, it was definitely made after that block was made.)&lt;br /&gt;
&lt;br /&gt;
=== Payout logic ===&lt;br /&gt;
&lt;br /&gt;
Each share contains a generation transaction that pays to the previous &#039;&#039;n&#039;&#039; shares, where &#039;&#039;n&#039;&#039; is the number of shares whose total work is equal to 3 times the average work required to solve a block, or 8640 (= 24 hours of shares), whichever is smaller. Payouts are weighted based on the amount of work each share took to solve, which is proportional to the p2pool difficulty at that time.&lt;br /&gt;
&lt;br /&gt;
The block reward (currently 25BTC) and the transaction fees are combined and apportioned according to these rules:&lt;br /&gt;
&lt;br /&gt;
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. (A miner with the aim to harm others could withhold the block, thereby preventing anybody from getting paid. He can NOT redirect the payout to himself.) The remaining 99.5% is distributed evenly to miners based on work done recently.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Stales ===&lt;br /&gt;
&lt;br /&gt;
On P2Pool stales refer to shares which can&#039;t make it into the sharechain.  Because the sharechain is 60 times faster than the Bitcoin chain many stales are common and expected. However, because the payout is [[Comparison_of_mining_pools|PPLNS]] only your stale rate relative to other nodes is relevant; the absolute rate is not.&lt;br /&gt;
&lt;br /&gt;
There are two reported kinds of stales in P2Pool: &amp;quot;DEAD ON ARRIVAL&amp;quot; shares and orphan shares. Dead shares were too old by the time they arrived at your local P2Pool. Very high dead rates can indicate miner misconfiguration. Orphan shares are shares which were not extended by the rest of the P2Pool network, because some other miner&#039;s share was accepted first. Very high orphan rates may indicate network connectivity problems. &lt;br /&gt;
&lt;br /&gt;
The P2Pool console output shows your relative stale rate compared to other P2Pool miners in the &#039;Own efficiency&#039; column:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2012-01-07 20:57:51.797420 Pool stales: 13% Own: 13±2% Own efficiency: 100±2%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you first start P2Pool claimed efficiency will be low and the error bounds on this estimate will be large, but as it runs the numbers will converge to their correct values.&lt;br /&gt;
&lt;br /&gt;
If your efficiency is unusually low, make sure your network connection isn&#039;t overloaded, that your miners support long polling and are not set to work for excessive amounts of time, and that your bitcoind has multiple connections.&lt;br /&gt;
&lt;br /&gt;
== Joining the pool ==&lt;br /&gt;
&lt;br /&gt;
Follow these steps to join the pool:&lt;br /&gt;
&lt;br /&gt;
* Run Bitcoin with the RPC interface enabled: edit bitcoin.conf to include:&lt;br /&gt;
 rpcuser=USER&lt;br /&gt;
 rpcpassword=LONG_RANDOM_SECRET_VALUE&lt;br /&gt;
 server=1&lt;br /&gt;
**&#039;&#039;&#039;Replace LONG_RANDOM_SECRET_VALUE with something long and random like the output of smashing your keyboard for a bit like fju4M78yAj3ds39pak92raK&#039;&#039;&#039;. You don&#039;t need to be able to remember it. If your RPC port becomes exposed to the internet a thief could steal your bitcoin if they could guess it, or use a brute force attack in order to find it.&lt;br /&gt;
** Bitcoin 0.8.5 or later is required&lt;br /&gt;
** It&#039;s important that your Bitcoin client be fully synchronized before starting. It&#039;s also better if you have the Bitcoin port forwarded&lt;br /&gt;
* Download p2pool:&lt;br /&gt;
** Windows binary: See http://forum.bitcoin.org/index.php?topic=18313.0&lt;br /&gt;
** Source download: https://github.com/forrestv/p2pool/tags&lt;br /&gt;
** git: git clone git://github.com/forrestv/p2pool.git&lt;br /&gt;
* Run p2pool: (See below for additional options.)&lt;br /&gt;
** Windows py2exe: run_p2pool.exe&lt;br /&gt;
** Source: python run_p2pool.py&lt;br /&gt;
* Run a miner daemon with long polling connecting to 127.0.0.1 (or the IP of the host running p2pool if it isn&#039;t on the same computer as the miner) on port 9332 with any username and password&lt;br /&gt;
** bfgminer -O u:p -o http://127.0.0.1:9332/ --submit-stales&lt;br /&gt;
&lt;br /&gt;
Dependencies if running from source:&lt;br /&gt;
* Python 2.6 or higher (but not 3.x)&lt;br /&gt;
* python-argparse&lt;br /&gt;
* Twisted (Ubuntu package python-twisted)&lt;br /&gt;
&lt;br /&gt;
=== Frequently Asked Questions ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Why does my miner report so many longpoll events when mining on p2pool? - P4Man&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; &amp;quot;Once every ~10 seconds is normal. That is how often p2pool shares are generated (as opposed to ~10 min for bitcoin blocks) - cabin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Do the &#039;orphan&#039; and &#039;dead&#039; shares in P2Pool&#039;s status display hurt me?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; They shouldn&#039;t - It&#039;s normal for some fraction of everyone&#039;s shares to end up orphaned or dead. Because payouts are calculated by counting how many shares you have relative to others, everyone with normal configurations is equally &amp;quot;hurt&amp;quot; by this. However, if you have a large proportion of stales, your payout will be hurt. You can see how well you&#039;re doing by looking at P2Pool&#039;s &amp;quot;Efficiency&amp;quot; (ex: &#039;&#039;Efficiency: ~110.6% (40-111%)&#039;&#039;). If 100% doesn&#039;t lie within the [http://en.wikipedia.org/wiki/Confidence_interval confidence interval] at the end, something is probably wrong (with 95% confidence).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;What do I do if my efficiency is low?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Make sure the computers you&#039;re running P2Pool and the miner on have enough memory and CPU time. If you have a lot of dead shares or the &amp;quot;Local dead on arrival&amp;quot; number is higher than a few percent, that means that something is wrong with your miner. Check to make sure that it is one of the working versions in the &#039;&#039;Miners&#039;&#039; section on this page. Lower the intensity or raise the FPS of your miner. If you have a lot of orphan shares, something is wrong with P2Pool&#039;s P2P connection. Decrease the load on your internet connection or enable QoS (Quality of Service) on your router.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What is PPLNS?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Pay-Per-Last-N-Shares is a payout method that is completely resistant to pool hoppers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I not getting very many shares?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The P2Pool difficulty is hundreds of times higher than on other pools. It can take time to get a share. P2Pool displays an estimate of how long you have to wait in the console output.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does my miner say it has found a lot of shares but p2pool say I have only found a few?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The real P2Pool difficulty is hundreds of times higher than on normal pools, but p2pool essentially lies to your miner and tells it to work on relatively easy shares so that it submits shares every few seconds instead of every few hours.  P2Pool then ignores any submitted shares that don&#039;t match the real share difficulty.  By doing this, P2Pool can more accurately report your local hash rate and you can see if you are having problems with too many stale shares quickly&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I getting so many rejects?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; You&#039;re using an incompatible miner. See the miners section here, increase your FPS on the miner, decrease the intensity, upgrade your miner, or try a different miner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What stops the pool operator or the block finder from stealing a block?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; A block solution is only worth anything because its hash matches Bitcoin&#039;s target. Altering anything within the block will change its hash and make it worthless. If you are concerned about the pool operator stealing a block, you should try to inspect the source code of each new version.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does it say &amp;quot;Generated?&amp;quot; I want to spend my coins now!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; P2Pool includes payouts in generation transactions, which must mature (taking 120 blocks or 20 hours) before they can be spent. The reason for this is that a block could be orphaned, which would make its payout invalid and could reverse transactions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I get paid transaction fees?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. They are split among P2Pool miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What are these payments I&#039;m getting that aren&#039;t generated?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; These are subsidies that people who support the idea of P2Pool send to miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Cool Subsidies sound like an awesome idea! How do I send some BTC to these awesome miners?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; See end of this page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I really need the WHOLE blockchain?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. Your node needs to be able to independently make decisions about what transactions to mine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; How do merged mining payments work?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Merged mining is handled entirely by namecoind, so you&#039;re solo mining and payouts will go into namecoind&#039;s wallet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Miners ===&lt;br /&gt;
&lt;br /&gt;
This is all for the latest p2pool version, as it includes several new workarounds. &lt;br /&gt;
&lt;br /&gt;
With all miners, using a HIGH FPS target (100?) or a LOW intensity (8 for bfgminer?) helps a lot with reducing stales.&lt;br /&gt;
&lt;br /&gt;
* bfgminer, cgminer, and ufasoft work perfectly without any extra options.&lt;br /&gt;
* DiabloMiner works fine after commit 3b731b9.&lt;br /&gt;
* Phoenix works fine after commit a658ef2.&lt;br /&gt;
* Poclbm works fine after commit 5e994e7.&lt;br /&gt;
&lt;br /&gt;
P2Pool uses higher difficulty shares than most centralized pools, so you&#039;ll see fewer shares reported. This is normal and doesn&#039;t reduce your payments.  It&#039;s also normal to see longpoll messages once per every ten seconds on average.&lt;br /&gt;
&lt;br /&gt;
====Tips to configure bfgminer to reduce stale/doa:====&lt;br /&gt;
* &amp;quot;gpu-threads&amp;quot; : &amp;quot;1&amp;quot;, (2 by default)&lt;br /&gt;
* &amp;quot;queue&amp;quot; : &amp;quot;0&amp;quot;, (1 by default)&lt;br /&gt;
&lt;br /&gt;
Because of fast longpooling in p2pool it is better not NOT fetch work ahead.&lt;br /&gt;
&lt;br /&gt;
On non-dedicated machines intensity=3 allows normal usage of PC, set it to 7 or more to get full hashrate.&lt;br /&gt;
&lt;br /&gt;
On most cards best is diablo and phatk kernel, looks like poclbm kernel have unstable rate.&lt;br /&gt;
&lt;br /&gt;
=== Useful features ===&lt;br /&gt;
&lt;br /&gt;
* If upgrading P2Pool or changing its configuration, you can start another instance of P2Pool in parallel with the first. It will start normally, but realize that the worker and P2P listening ports are busy and keep trying to bind to them in the background. Thus, you can do almost-completely-seamless upgrades of P2Pool.&lt;br /&gt;
* If you run multiple P2Pool nodes or have trusted friends that run P2Pool, you can use &#039;&#039;-n&#039;&#039; to establish a constant extra P2P connection to them.&lt;br /&gt;
* You can make P2Pool use a configuration file by running run_p2pool.py @FILENAME, with FILENAME being the path to a file containing the command-line arguments (newlines are ignored) Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--net bitcoin&lt;br /&gt;
-n 1.2.3.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Setting the username of your miner connecting to P2Pool to a Bitcoin address will make it mine to that address instead of the one requested from bitcoind or set by -a&lt;br /&gt;
* Appending &amp;quot;/1000&amp;quot; to a miner&#039;s username will increase the difficulty of producing a P2Pool share to at most 1000. This is useful to large miners because doing this can make it easier for small miners while minimally impacting the large miners themselves. See [https://bitcointalk.org/index.php?topic=18313.msg816322#msg816322 recommended values].&lt;br /&gt;
** Appending &amp;quot;+1&amp;quot; (for example) after that will make P2Pool always give your miners work with a difficulty of 1&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
Lots of data and useful tools are available at http://127.0.0.1:9332/something:&lt;br /&gt;
* /static/ - Lots of information from shares to graphs to payouts.&lt;br /&gt;
* /rate&lt;br /&gt;
* /users&lt;br /&gt;
* /fee&lt;br /&gt;
* /current_payouts&lt;br /&gt;
* /patron_sendmany - Gives sendmany outputs for fair donations to P2Pool&lt;br /&gt;
* /global_stats&lt;br /&gt;
* /local_stats&lt;br /&gt;
* /peer_addresses&lt;br /&gt;
* /payout_addr&lt;br /&gt;
* /recent_blocks&lt;br /&gt;
* /uptime&lt;br /&gt;
* /web/log - Some different stats collected over the last day&lt;br /&gt;
&lt;br /&gt;
=== Included README ===&lt;br /&gt;
&amp;lt;pre&amp;gt;Requirements:&lt;br /&gt;
    Generic:&lt;br /&gt;
        Bitcoin &amp;gt;=0.6.0rc4 or Bitcoin &amp;gt;=0.5.4 (for BIP16 support) or Litecoin&lt;br /&gt;
        Python&lt;br /&gt;
        Twisted&lt;br /&gt;
        python-argparse (for Python &amp;lt;=2.6)&lt;br /&gt;
    &lt;br /&gt;
    Linux:&lt;br /&gt;
        sudo apt-get install python-zope.interface python-twisted python-twisted-web&lt;br /&gt;
        sudo apt-get install python-argparse # if on Python 2.6 or older&lt;br /&gt;
    &lt;br /&gt;
    Windows:&lt;br /&gt;
        Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
        Install Twisted: http://twistedmatrix.com/trac/wiki/Downloads&lt;br /&gt;
        Install Zope.Interface: http://pypi.python.org/pypi/zope.interface/3.8.0&lt;br /&gt;
            Unzip the files into C:\Python27\Lib\site-packages&lt;br /&gt;
&lt;br /&gt;
Running P2Pool:&lt;br /&gt;
    To use P2Pool, you must be running your own local bitcoind. For standard&lt;br /&gt;
    configurations, using P2Pool should be as simple as:&lt;br /&gt;
&lt;br /&gt;
        python run_p2pool.py&lt;br /&gt;
&lt;br /&gt;
    Then run your miner program, connecting to 127.0.0.1 on port 9332 with any&lt;br /&gt;
    username and password.&lt;br /&gt;
&lt;br /&gt;
    If you are behind a NAT, you should enable TCP port forwarding on your&lt;br /&gt;
    router. Forward port 9333 to the host running P2Pool.&lt;br /&gt;
&lt;br /&gt;
    Run &amp;quot;python run_p2pool.py --help&amp;quot; for additional options.&lt;br /&gt;
&lt;br /&gt;
Notes for Litecoin:&lt;br /&gt;
    Requirements:&lt;br /&gt;
        In order to run P2Pool with the Litecoin network, you would need to build and install the&lt;br /&gt;
        ltc_scrypt module that includes the scrypt proof of work code that Litecoin uses for hashes.&lt;br /&gt;
&lt;br /&gt;
        Linux:&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
        Windows:&lt;br /&gt;
            Install MinGW: http://www.mingw.org/wiki/Getting_Started&lt;br /&gt;
            Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            C:\Python27\python.exe setup.py build --compile=mingw32 install&lt;br /&gt;
&lt;br /&gt;
            If you run into an error with unrecognized command line option &#039;-mno-cygwin&#039;, see this:&lt;br /&gt;
                http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o&lt;br /&gt;
    &lt;br /&gt;
    Running P2Pool:&lt;br /&gt;
        Run P2Pool with the &amp;quot;--net litecoin&amp;quot; option.&lt;br /&gt;
        Run your miner program, connecting to 127.0.0.1 on port 9327.&lt;br /&gt;
        Forward port 9338 to the host running P2Pool.&lt;br /&gt;
        &lt;br /&gt;
        Litecoin&#039;s use of ports 9332 and 9332 conflicts with P2Pool running on&lt;br /&gt;
        the Bitcoin network. To avoid problems, add these lines to litecoin.conf&lt;br /&gt;
        and restart litecoind:&lt;br /&gt;
            rpcport=10332&lt;br /&gt;
            port=10333&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option Reference ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
usage: run_p2pool.py [-h] [--version] [--net {bitcoin,litecoin}] [--testnet]&lt;br /&gt;
                     [--debug] [-a ADDRESS] [--datadir DATADIR]&lt;br /&gt;
                     [--logfile LOGFILE] [--merged MERGED_URLS]&lt;br /&gt;
                     [--give-author DONATION_PERCENTAGE] [--iocp]&lt;br /&gt;
                     [--irc-announce] [--no-bugreport] [--p2pool-port PORT]&lt;br /&gt;
                     [-n ADDR[:PORT]] [--disable-upnp] [--max-conns CONNS]&lt;br /&gt;
                     [-w PORT or ADDR:PORT] [-f FEE_PERCENTAGE]&lt;br /&gt;
                     [--bitcoind-address BITCOIND_ADDRESS]&lt;br /&gt;
                     [--bitcoind-rpc-port BITCOIND_RPC_PORT]&lt;br /&gt;
                     [--bitcoind-p2p-port BITCOIND_P2P_PORT]&lt;br /&gt;
                     [BITCOIND_RPCUSERPASS [BITCOIND_RPCUSERPASS ...]]&lt;br /&gt;
&lt;br /&gt;
p2pool (version 0.11.1-8-ged9359d)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  --version             show program&#039;s version number and exit&lt;br /&gt;
  --net {bitcoin,litecoin}&lt;br /&gt;
                        use specified network (default: bitcoin)&lt;br /&gt;
  --testnet             use the network&#039;s testnet&lt;br /&gt;
  --debug               enable debugging mode&lt;br /&gt;
  -a ADDRESS, --address ADDRESS&lt;br /&gt;
                        generate payouts to this address (default: &amp;lt;address&lt;br /&gt;
                        requested from bitcoind&amp;gt;)&lt;br /&gt;
  --datadir DATADIR     store data in this directory (default: &amp;lt;directory&lt;br /&gt;
                        run_p2pool.py is in&amp;gt;/data)&lt;br /&gt;
  --logfile LOGFILE     log to this file (default: data/&amp;lt;NET&amp;gt;/log)&lt;br /&gt;
  --merged MERGED_URLS  call getauxblock on this url to get work for merged&lt;br /&gt;
                        mining (example:&lt;br /&gt;
                        http://ncuser:ncpass@127.0.0.1:10332/)&lt;br /&gt;
  --give-author DONATION_PERCENTAGE&lt;br /&gt;
                        donate this percentage of work towards the development&lt;br /&gt;
                        of p2pool (default: 0.5)&lt;br /&gt;
  --iocp                use Windows IOCP API in order to avoid errors due to&lt;br /&gt;
                        large number of sockets being open&lt;br /&gt;
  --irc-announce        announce any blocks found on&lt;br /&gt;
                        irc://irc.freenode.net/#p2pool&lt;br /&gt;
  --no-bugreport        disable submitting caught exceptions to the author&lt;br /&gt;
  --disable-upnp        don&#039;t attempt to use UPnP to forward p2pool&#039;s P2P port&lt;br /&gt;
                        from the Internet to this computer&lt;br /&gt;
&lt;br /&gt;
p2pool interface:&lt;br /&gt;
  --p2pool-port PORT    use port PORT to listen for connections (forward this&lt;br /&gt;
                        port from your router!) (default: bitcoin:9333,&lt;br /&gt;
                        litecoin:9338)&lt;br /&gt;
  -n ADDR[:PORT], --p2pool-node ADDR[:PORT]&lt;br /&gt;
                        connect to existing p2pool node at ADDR listening on&lt;br /&gt;
                        port PORT (defaults to default p2pool P2P port) in&lt;br /&gt;
                        addition to builtin addresses&lt;br /&gt;
  --max-conns CONNS     maximum incoming connections (default: 40)&lt;br /&gt;
&lt;br /&gt;
worker interface:&lt;br /&gt;
  -w PORT or ADDR:PORT, --worker-port PORT or ADDR:PORT&lt;br /&gt;
                        listen on PORT on interface with ADDR for RPC&lt;br /&gt;
                        connections from miners (default: all interfaces,&lt;br /&gt;
                        bitcoin:9332, litecoin:9327)&lt;br /&gt;
  -f FEE_PERCENTAGE, --fee FEE_PERCENTAGE&lt;br /&gt;
                        charge workers mining to their own bitcoin address (by&lt;br /&gt;
                        setting their miner&#039;s username to a bitcoin address)&lt;br /&gt;
                        this percentage fee to mine on your p2pool instance.&lt;br /&gt;
                        Amount displayed at http://127.0.0.1:WORKER_PORT/fee&lt;br /&gt;
                        (default: 0)&lt;br /&gt;
&lt;br /&gt;
bitcoind interface:&lt;br /&gt;
  --bitcoind-address BITCOIND_ADDRESS&lt;br /&gt;
                        connect to this address (default: 127.0.0.1)&lt;br /&gt;
  --bitcoind-rpc-port BITCOIND_RPC_PORT&lt;br /&gt;
                        connect to JSON-RPC interface at this port (default:&lt;br /&gt;
                        bitcoin:8332, litecoin:9332 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  --bitcoind-p2p-port BITCOIND_P2P_PORT&lt;br /&gt;
                        connect to P2P interface at this port (default:&lt;br /&gt;
                        bitcoin:8333, litecoin:9333 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  BITCOIND_RPCUSERPASS  bitcoind RPC interface username, then password, space-&lt;br /&gt;
                        separated (only one being provided will cause the&lt;br /&gt;
                        username to default to being empty, and none will&lt;br /&gt;
                        cause P2Pool to read them from bitcoin.conf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interoperability table ==&lt;br /&gt;
P2pool works fine with most hardware. This lists some of the hardware confirmed to work and any special configuration required.&lt;br /&gt;
&lt;br /&gt;
* ASICminer blade 10GH/s (Requires adding +1 to username or proxy)&lt;br /&gt;
* Avalon 110nm 60-110 GH/s (All batches)&lt;br /&gt;
* Avalon based 55nm 200 GH/s (specific makers?)&lt;br /&gt;
* Avalon prototype 55nm 120GH/s (~ 20 exist)&lt;br /&gt;
* Cointerra Terraminer IV (very low stale rate, maybe the lowest of any mining asic)&lt;br /&gt;
* Icarus FPGA&lt;br /&gt;
* Bitfury strikes back H-card and M-card ([https://bitcointalk.org/index.php?topic=18313.msg4424081#msg4424081 instructions])&lt;br /&gt;
* Bitmain Antminer S1 180GH/s ([https://github.com/AntMiner/AntGen1/tree/master/firmware Requires 20131226 firmware.])&lt;br /&gt;
* Bitmain Antminer S3 440GH/s&lt;br /&gt;
* BFL SC Jalapeno, SC Single 30, 50, &amp;amp; 60 GH/s&lt;br /&gt;
&lt;br /&gt;
(Various GPU and most FPGAs other than BFL single FPGAs work fine too)&lt;br /&gt;
&lt;br /&gt;
== Protocol description ==&lt;br /&gt;
&lt;br /&gt;
P2Pool&#039;s protocol mirrors Bitcoin&#039;s P2P protocol in many ways. It uses the same framing (prefix, command, length, checksum, payload) and similar commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;version&#039;&#039;&#039; - sent to establish a connection - contains (&#039;&#039;version&#039;&#039;, &#039;&#039;services&#039;&#039;, &#039;&#039;addr_to&#039;&#039;, &#039;&#039;addr_from&#039;&#039;, &#039;&#039;nonce&#039;&#039;, &#039;&#039;sub_version&#039;&#039;, &#039;&#039;mode&#039;&#039;, &#039;&#039;best_share_hash&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;setmode&#039;&#039;&#039; - sent to update the &#039;&#039;mode&#039;&#039; sent in the &#039;&#039;&#039;version&#039;&#039;&#039; message - contains (&#039;&#039;mode&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;ping&#039;&#039;&#039; - sent to keep connection alive - contains ()&lt;br /&gt;
* &#039;&#039;&#039;addrme&#039;&#039;&#039; - request that the receiving node send out an addr for the sending node - contains (&#039;&#039;port&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;addrs&#039;&#039;&#039; - broadcast list of nodes&#039; addresses - contains (&#039;&#039;addrs&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getaddrs&#039;&#039;&#039; - request that the receiving node send &#039;&#039;count&#039;&#039; addrs - contains (&#039;&#039;count&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getshares&#039;&#039;&#039; - request that the receiving node send the shares referenced by &#039;&#039;hashes&#039;&#039; and &#039;&#039;parents&#039;&#039; of their parents, stopping at any share referenced by &#039;&#039;stops&#039;&#039; - contains (&#039;&#039;hashes&#039;&#039;, &#039;&#039;parents&#039;&#039;, &#039;&#039;stops&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;shares&#039;&#039;&#039; - broadcast message of the contents of shares - contains (&#039;&#039;shares&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
This project was announced on June 17, 2011 by Forrest Voight&amp;lt;ref&amp;gt;[https://forum.bitcoin.org/index.php?topic=18313.0 p2pool: Decentralized, DoS-resistant, Hop-Proof - Now active on mainnet!]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The pool began testing against mainnet in mid-July, 2011.  The pool was reviewed on a [[Bitcoin Miner]] post on July 26, 2011&amp;lt;ref&amp;gt;[http://www.bitcoinminer.com/post/8101660461 P2Pool Decentralized Pool Nearly Ready For Prime-Time]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The software author&#039;s address for donations can be found in the signature section of his [http://forum.bitcoin.org/index.php?action=profile;u=6447 forum profile].&lt;br /&gt;
&lt;br /&gt;
==Donating to P2Pool miners==&lt;br /&gt;
In order to encourage people to mine to P2Pool you can donate to the recent miners in proportion using a sendmany:&lt;br /&gt;
&lt;br /&gt;
For example, a bash script to donate 10 btc is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can replace &amp;quot;&amp;quot; with &amp;quot;accountname&amp;quot; if you want to pay from some specific bitcoind account, and you need to replace 127.0.0.1 with the address of your P2Pool node if you&#039;re not running one locally.&lt;br /&gt;
&lt;br /&gt;
Note that the amount you donate will be allocated to recent miners in proportion to the amount of work they&#039;ve done in the last 24 hours or so, but all the miner whose shares of the donated amount are less than 0.01 BTC will have their shares combined into a single amount which is awarded to one of them at random, with the chance of winning this &#039;lottery&#039; weighted by the miner&#039;s recent amount of work done.  You can change this 0.01 BTC threshold like this, for example, which says to pay 10 BTC, but to share it amongst more miners that the default, cutting off at 0.001 BTC instead of at 0.01 BTC.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10/0.001)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you decide to donate you should announce it on the forums so that your donations provide the most incentive possible.&lt;br /&gt;
&lt;br /&gt;
==Sponsors==&lt;br /&gt;
&lt;br /&gt;
Thanks to:&lt;br /&gt;
&lt;br /&gt;
* The [https://bitcoinfoundation.org/ Bitcoin Foundation] for its generous support of P2Pool&lt;br /&gt;
* The [https://litecoin.org/ Litecoin Project] for its generous donations to P2Pool&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Comparison of mining pools]]&lt;br /&gt;
* [[Pooled Mining]]&lt;br /&gt;
* [[P2Pool code documentation]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [http://forum.bitcoin.org/index.php?topic=18313.0 P2Pool forum]&lt;br /&gt;
* [https://github.com/forrestv/p2pool p2pool] project on GitHub&lt;br /&gt;
* {{Freenode IRC|p2pool}} discussion and support&lt;br /&gt;
* [http://p2pool.info/ p2pool.info] stats page (appears broken since May 2014 and as of June 2014 - you can use http://ANY.NODE:9332/static/graphs.html )&lt;br /&gt;
* [http://p2pool.hostv.pl p2pool.hostv.pl] Public list of P2Pool BTC/LTC nodes.&lt;br /&gt;
* [http://p2pool-nodes.info/ p2pool-nodes.info] Another public list of P2Pool (BTC) nodes.&lt;br /&gt;
* [http://whatisp2pool.com whatisp2pool.com] An easy introduction to mining and P2Pool.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Pool Operators]]&lt;/div&gt;</summary>
		<author><name>CoinCadence</name></author>
	</entry>
</feed>