Post
Topic
Board Pools
Re: I'm working on a pool software and wanted to check if I'm on the right track
by
bernardk
on 02/12/2015, 15:07:33 UTC
After spending 2 days debugging getblocktemplate requests my conclusion is:

Most mining software implements a subset of GBT to make it work for them and doesn't follow the standard strictly.
Miners also introduce some other rules in agreement with pools that are not documented.
If you are working on a pool you will have to manually test it against miners to be sure it works (good luck).

I couldn't get cgminer to work with my pool proxy. The problem is that it differentiates between solo and pool mining (what I don't think is part of the getblocktemplate specification). After reading the source code I found this https://github.com/ckolivas/cgminer/blob/master/cgminer.c#L6512. So, cgminer will only treat you as a pool if you submit "coinbase/append" and "submit/coinbase" as mutables. This is not really explained anywhere and it took me some time to figure it out. I can understand the idea behind this choice, but it still looks a bit arbitrary to me. It will just reject you with a message that you are not a pool without clarification. I can see users breaking their head over this.

To answer some of the questions myself after 2 days of researching:

1. Stratum is much better defined and smaller. It is also more popular between pools. This makes it easier to implement and find information about. It's straight forward, there is basically only one way to do it. You loose some flexibility, but at least you don't need to deal with the mess of BIP22 and BIP23. I will try to write a tutorial how to implement GBT correctly if I find time.

2. Because of cgminer behavior the proxy needs to do much more. Now it needs to understand "submit/coinbase" and keep track of the transactions submited to the miner. It makes it more complicated. But using a bitcoin node to get information from the network and not implementing your own is still a good idea.

I didn't get to experiment with setting the difficulty. I hope I will soon have a proof of concept pool running on testnet to try more advanced stuff.

P.S. What is wrong with you guys? Accusing me of scaming. Casually requesting me to send you 25btc. Promoting your own pools. From my perspective this doesn't look like a welcoming community.