Private PrimeCoin Pool [HowTO]

Hi Guys,

I have been trying to research how to run PrimeCoin as a server to provide work for my workers. However from what I can gather it is much different from than all the other miners software readily available and would need to be developed.

I could also gather that RPC does not work with the current PrimeCoin clients so you cannot simply start your wallet and connect other workers to it using the ip, rpcusername and rpcpassword. Has this changed ? Also are there plans to have this implemented ?

And in addition to that you will need you’ll need ‘getwork’ or ‘getblocktemplate’ compatible client to retrieve the work. The source for a few of these are already available.

Questions

  1. Can someone point me in the right track how to start distributing work to multiple workers from the prime coin client being ran
    2)If 1) above is not the suggested method. What is the suggested method ?

I am not asking for anything on a platter. Would just like to know how to start

Actually you can by now. Recently I added support for the GetBlockTemplate/SubmitBlock protocol to Mumus miner. Unlike GetWork this protocol works fine with standard Primecoin-Qt.

Since Rdebourbon added the code too I would recommend using his miner. Just download the most recent version from here.

I assume you already know how to setup the config for solo mining, but I’ll explain it anyway in case someone else wants to try it:

Navigate to the Primecoin data directory (the one where the wallet.dat is located)
On Windows you can find this directory at C:\Users<Username>\AppData\Roaming\Primecoin

In this directory create a file primecoin.conf with the following contents:

rpcuser=rpcuser rpcpassword=rpcpassword rpcallowip=127.0.0.1 rpcport=8332 server=1

After that start the wallet client and wait for it to finish synchronizing.
Then start your miner using the following command:

jhPrimeminer.exe -o 127.0.0.1:8332 -u rpcuser -p rpcpassword -xpm <your_wallet_address>

The wallet address for the -xpm parameter can be any valid address. It doesn’t need to be from the same wallet and it doesn’t even need to be your own. But only the wallet that knows this address will see the mined blocks.

In case you want to have multiple machines connect to a single wallet you can set the rpcallowip=127.0.0.1 parameter in the config to just rpcallowip=* which means that external computers are allowed to connect.

[quote=“jh00, post:2, topic:469”]Since Rdebourbon added the code too I would recommend using his miner. Just download the most recent version from here.[/quote]Only Windows version? Whether there is version for Linux?

Thanks a lot jh00 . Will give this a try once i get all the machines online and build out RPC service based service from there.

This was very helpful

Actually you can by now. Recently I added support for the GetBlockTemplate/SubmitBlock protocol to Mumus miner. Unlike GetWork this protocol works fine with standard Primecoin-Qt.

Since Rdebourbon added the code too I would recommend using his miner. Just download the most recent version from here.

I assume you already know how to setup the config for solo mining, but I’ll explain it anyway in case someone else wants to try it:

Navigate to the Primecoin data directory (the one where the wallet.dat is located)
On Windows you can find this directory at C:\Users<Username>\AppData\Roaming\Primecoin

In this directory create a file primecoin.conf with the following contents:

rpcuser=rpcuser rpcpassword=rpcpassword rpcallowip=127.0.0.1 rpcport=8332 server=1

After that start the wallet client and wait for it to finish synchronizing.
Then start your miner using the following command:

jhPrimeminer.exe -o 127.0.0.1:8332 -u rpcuser -p rpcpassword -xpm <your_wallet_address>

The wallet address for the -xpm parameter can be any valid address. It doesn’t need to be from the same wallet and it doesn’t even need to be your own. But only the wallet that knows this address will see the mined blocks.

In case you want to have multiple machines connect to a single wallet you can set the rpcallowip=127.0.0.1 parameter in the config to just rpcallowip=* which means that external computers are allowed to connect.[/quote]

Hi Grekk,

The quick fix for running on Linux might be to use Wine. I have not tested the performance of this yet, but from what I have read it seems to be doing fine.

You could take a look at Beeeer . However I do not think they have implemented getblocktemplate, they are instead using getwork.

In summary the main, difference between getwork and getblocktemplate seem to be the fact that the getwork implementation was limited by the amount of work it could provide to the workers around 4GH. With getblocktemplate block creation is moved to the miner and as a result can generate as much work as needed.

More on getblocktemplate here https://en.bitcoin.it/wiki/Getblocktemplate
More on getwork here https://en.bitcoin.it/wiki/Getwork

If interested in building a pool. This bit will be helpful https://en.bitcoin.it/wiki/Getblocktemplate#Poolserver_software

[quote=“optimusprime, post:5, topic:469”]The quick fix for running on Linux might be to use Wine. I have not tested the performance of this yet, but from what I have read it seems to be doing fine.[/quote]I don`t want to use wine.

[quote=“optimusprime, post:5, topic:469”]Hi Grekk,

The quick fix for running on Linux might be to use Wine. I have not tested the performance of this yet, but from what I have read it seems to be doing fine.[/quote]

I use linux, and I have not noticed any speed difference that matters when using wine… I would give it a try.

Hi, all
Try to run today under wine, produces many errors under Ubuntu 12.04.
fixme:ver:GetCurrentPackageId (0x23f660 (nil)): stub

Can anyone help me?

ADD
I found a version for Linux(Rdebourbon’s 3.3), but it does not support the “-XPM” parametr
https://bitcointalk.org/index.php?topic=257623.msg3170859#msg3170859

[quote=“jh00, post:2, topic:469”]jhPrimeminer.exe -o 127.0.0.1:8332 -u rpcuser -p rpcpassword -xpm <your_wallet_address>
The wallet address for the -xpm parameter can be any valid address. It doesn’t need to be from the same wallet and it doesn’t even need to be your own. But only the wallet that knows this address will see the mined blocks.[/quote]

How is that possible? Aren’t you always mining to one of the addresses of the wallet you are using?

[quote=“Grekk, post:8, topic:469”]I found a version for Linux(Rdebourbon’s 3.3), but it does not support the “-XPM” parametr
https://bitcointalk.org/index.php?topic=257623.msg3170859#msg3170859[/quote]
The linux version is outdated and still using GetWork, not GetBlock - so it won’t work at all - wine is your best bet for now.

[quote=“Sy, post:9, topic:469”]The linux version is outdated and still using GetWork, not GetBlock - so it won’t work at all - wine is your best bet for now.[/quote] I was able to run “jhPrimeminer_RdBBeta4.0E3_x64” through wine, first impressions are very slow… , 2-3 times slower Xolominer.

pps isnt really compareable through different software versions, it all depends on what chain size they are looking for.

[quote=“Sy, post:11, topic:469”]pps isnt really compareable through different software versions, it all depends on what chain size they are looking for.[/quote]I judge by the found shares per day (7, 8, 9)

Possible, not sure how much xolo has improved the miner, someone with coding knowledge would have to take a look, possibly merge the two…

Possible, not sure how much xolo has improved the miner, someone with coding knowledge would have to take a look, possibly merge the two…[/quote] Maybe it’s because of that works in wine?

jhPrimeminer_RdBBeta4.0E3_x64 - After 24 hours

10/22/13-14:34:32 - New Block: 222936 - Diff: 9.939244 / 9.939244 Best/Max diff: [ 8.997561 / 6.458423 ] 6ch/h: 28.14 - 779 [ 202 / 311 / 266 ] 7ch/h: 2.20 - 61 [ 21 / 19 / 21 ] 8ch/h: 0.40 - 11 [ 4 / 4 / 3 ] MNPS:369.73 PPS:16675 WPS:15.593 ACC:1069 Current Primorial: 43 - Sieve Size: 1482000 - Prime Count: 11412

Xolominer

[code]*** running time: 24.306hrs


*** 6-chains: 2572 (91.890%)
*** 7-chains: 207 (7.395%)
*** 8-chains: 18 (0.643%)
*** 9-chains: 2 (0.071%)


*** valid: 2799 (85.283%)
*** rejects: 480 (14.625%)
*** stale: 3 (0.091%)[/code]

I’m running it in Windows 8 for over 24h now, no 9 chain on any machine -.-

Thanks for the guide! :smiley: Just found my first block using this method in ~6 hours

Was wondering if there is a way to debug how many shares are being submit per block or something? (instead of having to go thru all my clients connected) Kinda hard to keep count with my ~10 hosts mining :stuck_out_tongue:

Chrome and my antivirus went off when trying to run the miner from that dropbox link.

Just found my first block with my fifth 9-share in about 24 hours on 25 cores, so it’s definitly working :slight_smile:

On my case I cant get this setup stable… after like ~12 hours seems like the RPC thread of the primecoind crashes. Even trying to exit my wallet, that thread wont die until I force it via the Process Explorer. Ive tried the official 1.2 wallet and the HP11 wallets on Windows 8.1 64bits

On the jhprimeminers I just get

UpdateWork(GetBlockTemplate) failed.
UpdateWork(GetBlockTemplate) failed.
UpdateWork(GetBlockTemplate) failed.
UpdateWork(GetBlockTemplate) failed.
UpdateWork(GetBlockTemplate) failed.
UpdateWork(GetBlockTemplate) failed.

Might fire up my wallet on a Linux VM just to see if the windows builds is having this issues