Friday, August 15, 2014

Tips For P2Pool Bitcoin Mining, And Using My P2Pool Server

Scott's P2Pool
So you wanna use P2Pool to mine bitcoin. You got yourself a shiny new Antminer S3 for an amazing price, or you picked up an older Antminer S1 for a VERY amazing price (you can find them for under 200 bucks now). You've done the math and figured out that you can earn the bitcoin to pay off the miner in two months. You are going for it. So why P2Pool?

P2Pool Logo
I guess first you should know what it is. Instead of the normal bitcoin mining pools with one huge centralized server collecting a percentage, P2Pool works like torrents kinda. It's all decentralized. Nobody can cheat or lie or skim. But all hippy bullshit aside...

The big thing is you make more bitcoin. There's no other way to mine that makes more. The P2Pool network is faster than traditional bitcoin servers in getting its answers to the blockchain. So P2Pool frequently "ninjas" blocks from the large corporate bitcoin pools. So you can expect to make anywhere from 5-40 percent more (depending on the day) than you would mining Ghash or BTC Guild or any other site. So, how to start?

First is understanding how the mining works. Unlike traditional mining where you have to wait for them to process the coins and send them to you, with P2Pool you get the coins before they are "ripe". Your mining rewards are written directly to the bitcoin blockchain.

P2Pool earnings waiting for 100 confirmations
This is important to understand. Here is why:

1) When you mine p2pool, you use your bitcoin address as your username. So P2Pool is TOTALLY ANONYMOUS. That appeals to some folks. Get a throwaway bitcoin address and use it only for P2Pool mining if you so desire.

2) DO NOT mine directly to an exchange. Sites like have no clue what your unconfirmed blockchain coins are, and you will likely lose them if you try to use an exchange address as your P2Pool username. Get a wallet. Mine to it. Once the coins are mature and on your wallet, you can do whatever you want with them.

3) Because P2Pool mines directly to the blockchain, if you set a second P2Pool server as a backup pool, you will lose NO PROGRESS if a server goes down. If you are mining against one P2Pool server, it's like you are on all of them.

All good things. So lets talk about setting up your device. Even old timers don't know two of these tricks. Here's my configuration for one of my Antminer S3's

Correction, Use:
for the second one.

Everything looks normal there. I have 3 pools filled in. The first one is mine on my local network (where everyone else would be using stratum+tcp:// The second two are low-pinging alternate p2pool servers I found here:  Bitcoin Node Finder
A slick little website that will tell you where your closest bitcoin p2pool servers are. Pay attention to the fees. I ONLY mine on zero fee p2pool servers. Generally if you are on the east coast of the US, you want to use the same backup servers I'm using.

Notice that after my bitcoin address in username, I've added /5000+512 to the end. Here's why.

The /5000 means "don't give me low difficulty shares". And in general, it's just you not being an asshole. I have lots of 40-80GH miners show up, so I want to make sure they can get shares quicker. Putting the /5000 in means they will. It won't hurt you at all. You'll just get more of the higher difficulty shares you want anyway, increasing your chances of getting shares before a block is found.

The +512 is crucial. It means set my difficulty to 512. This means you'll communicate to the server less often, and get work in bigger chunks. That means you'll have less rejects, which means more bitcoin! The general rule of thumb is /1000 and +128 per 100GH of mining power. You can use anything for password. I picked "x".

And that's really all there is to it. After starting, 24-48 hours later, you'll start earning shares (unless you have over 1TB of hash. Then it might only take six hours) and if you previously did any regular pool mining, you'll be pleased at the extra bitcoin you make in a week. And you'll wish you had learned about P2Pool sooner.

So what's special about my mining site? Well, zero fees for one. But there's more. I've optimized the performance of the server and the network for max mining profit. Two intel NIC's, dedicated switch, QoS settings, and other boring crap that just means I have a great damn server. If I get another few "big" miners, I'm going to replace the current server with an IBM ThinkServer TS140 with a Xeon processor. But there are two other things special about my site. Notice this gear:

Clicking on it allows you to set your miner(s). This will highlight them on the screen. 

Which looks really cool after you pick a theme!

I'm a huge fan of the Slate theme myself. 

And that's pretty much it. The important thing is I didn't do anything that you can't do on your own. You can follow a guide for setting up a server like this one: 

or this one:

If you aren't planning to make the server public, it can run on older hardware. Any old laptop or desktop you have lying around. The goal is less than 50ms ping to your primary server. That's of course very easy if the server is sitting 5 feet from your miner. 

Let me know if you have any questions in the comments.