Bitcoin Forum
June 25, 2024, 10:27:59 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ANN] Open source Stratum to Stratum Proxy pool  (Read 2789 times)
clown (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
February 12, 2014, 09:43:17 AM
 #1

Proxypool is a pool server that splits the work from an upstream pool server and redistributes them to its miners, handling both shares submission and share logging for it's patrons.

The main goal is to split p2pool work load so that small miners will not experience any payout problems due to share difficulty.

Source code here
https://github.com/dogestreet/proxypool

My Dogecoin mining pool. 0% fee, proxypool into p2pool network
fcmatt
Legendary
*
Offline Offline

Activity: 2072
Merit: 1001


View Profile
February 13, 2014, 01:56:30 AM
 #2

Looks like a neat project. Thanks for sharing it. I will check it out in more detail as time allows.
clown (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
February 13, 2014, 01:08:30 PM
 #3

I'm running a live version on my Doge mining pool. Proxy pool feeding directly into the Dogecoin P2Pool network. Pretty positive results so far.

My Dogecoin mining pool. 0% fee, proxypool into p2pool network
roy7
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250


View Profile
February 24, 2014, 07:16:26 PM
 #4

Hi there. On the faq

Quote
5.Will I get paid more on the proxypool than on P2Pool?

If you weren't getting paid every time P2Pool finds a block, then the proxypool will ensure you get paid your fair share (more than what you'd get on P2Pool). If you don't have trouble with payout on P2Pool, then the proxypool will give you more consistent payouts.

That's incorrect about small miners. You don't earn less on p2pool if you aren't finding shares often enough to cover every block, because your share's values are high enough to average it out long-term. For example, if your speed only allows you to get 1 share per week, the math works out that your share will earn you (on average) 1 week worth of coins for your hash rate. The proxy pool reduces this variance, but it doesn't pay more.

Also any plans for sha256 support? Smiley I'd also like to suggest DGM as an alternate payment method.
clown (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
February 26, 2014, 06:18:00 AM
 #5

That's incorrect about small miners. You don't earn less on p2pool if you aren't finding shares often enough to cover every block, because your share's values are high enough to average it out long-term. For example, if your speed only allows you to get 1 share per week, the math works out that your share will earn you (on average) 1 week worth of coins for your hash rate. The proxy pool reduces this variance, but it doesn't pay more.

Also any plans for sha256 support? Smiley I'd also like to suggest DGM as an alternate payment method.

Many smaller miners miss the payout share completely. They need to find the hard share AND it needs it to be in the payout window. If the p2pool doesn't find a block in the payout window, then they miss out entirely. The probability of missing out entirely is quite large for smaller miners.

sha256 support should be fairly easy to patch in, although I don't plan on implementing it yet.

I went with CPPSRB since it was easy to do Smiley

My Dogecoin mining pool. 0% fee, proxypool into p2pool network
roy7
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250


View Profile
February 26, 2014, 01:59:38 PM
 #6

Many smaller miners miss the payout share completely. They need to find the hard share AND it needs it to be in the payout window. If the p2pool doesn't find a block in the payout window, then they miss out entirely. The probability of missing out entirely is quite large for smaller miners.

I guess this can be true based on the networks.py settings for a specific coin. We had a similar issue with Vertcoin at first since we only used a SPREAD of 3 which was way way too small, we copied that from Litecoin but Litecoin uses odd settings unlike any other successful p2pool network. We hard forked the VTC p2poll network to correct that and now it works so much better. BTC works okay with a SPREAD of 3 since the block time is 10 minutes and the time for p2pool to find a block is 1-3 days. That gives you like a 6 day lifetime to your share, the odds of a share not paying are virtually zero. But the faster the coin, the larger SPREAD needs to be.

Still though I suspect the odds of a share paying 0 are the same as a share paying multiple blocks, such that the math would average out over a long enough period of time. On Vertcoin we didn't think people were being underpaid, just the extra variance of the small payment window caused endless complaints and confusion by miners who didn't understand how p2pool worked. By making the window much larger (12 blocks of work instead of 3), shares should always pay something and you have more time to find a 2nd share before the first expires, so you permanently have some sort of payment coming on every block.

sha256 support should be fairly easy to patch in, although I don't plan on implementing it yet.

I went with CPPSRB since it was easy to do Smiley

If I dig deep one of these days maybe I'll try to add sha256 support and see how it goes. Smiley A proxy like this for smaller miners might be helpful for BTC itself. Even 180GH miners on p2pool tend to complain the variance is too high.

CPPSRB is fine, I just find DGM kinda sexy and use it on my TRC pool. I like the math behind it (non-hoppable, completely fair for all miners regardless of speed) and you just need to store 1 score per user, don't even need a share history.

Thanks for making this proxy though, it definitely meets a need.

If you run a large public doge node in addition to your proxy, you might consider applying this patch:

https://github.com/forrestv/p2pool/pull/174

We rolled it out on the whole Vertcoin network and it seems to work great.
roy7
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250


View Profile
February 27, 2014, 01:49:49 AM
Last edit: February 27, 2014, 02:55:12 AM by roy7
 #7

There doesn't seem to be a ubuntu package for the version of haskeel this needs but I'm trying. Wink (base-4.6 was required but the normal packages install an older base).

Edit: Ah ha. Ubuntu 12 is the problem, doesn't have packages for newer haskell. Time to compile from source, which takes a lifetime.
clown (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
February 27, 2014, 03:41:22 AM
 #8

CPPSRB is fine, I just find DGM kinda sexy and use it on my TRC pool. I like the math behind it (non-hoppable, completely fair for all miners regardless of speed) and you just need to store 1 score per user, don't even need a share history.

I'll have to check though the math, I'm not familiar with DGM. I have a feeling that some hopping-proof methods become hoppable if you know when the proxypool server's going to be paid.

If you run a large public doge node in addition to your proxy, you might consider applying this patch:

https://github.com/forrestv/p2pool/pull/174

We rolled it out on the whole Vertcoin network and it seems to work great.

Won't they still need to find a payable share to get into the share chain?

My Dogecoin mining pool. 0% fee, proxypool into p2pool network
roy7
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250


View Profile
February 27, 2014, 05:47:16 AM
 #9

Won't they still need to find a payable share to get into the share chain?

Yes indeed. It just makes miner's share targets lower if they are on a public node.

Still compiling haskell. At least stage 0 is done and into stage 1. About 3.5 hours so far. Smiley
clown (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
February 27, 2014, 02:31:04 PM
 #10

Still compiling haskell. At least stage 0 is done and into stage 1. About 3.5 hours so far. Smiley

Just get 13.10, I think Haskell platform missed the Ubuntu 12 release and it causes major pain.

apt-get install haskell-platform
cabal update
cabal install cabal-install # gets 1.18v

Add this line to the bottom of .profile
PATH="$HOME/.cabal/bin:$PATH"

Check cabal --version

Done.

My Dogecoin mining pool. 0% fee, proxypool into p2pool network
roy7
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250


View Profile
February 27, 2014, 04:12:26 PM
Last edit: February 27, 2014, 10:56:55 PM by roy7
 #11

Just get 13.10, I think Haskell platform missed the Ubuntu 12 release and it causes major pain.

apt-get install haskell-platform
cabal update
cabal install cabal-install # gets 1.18v

Add this line to the bottom of .profile
PATH="$HOME/.cabal/bin:$PATH"

Check cabal --version

Done.

Can I install the 13.10 package onto 12.04? Or do you mean upgrading from Ubuntu 12.04 LTS to 13.10? I've thought about that. Just makes me nervous. Smiley I let the build run all night but there's an error in the html file it can't get past. I change the build file to not build the docs, and have restarted the compile. Sadly it's back on stage 0 but I'm letting it run all day while I'm at work.

I did try updating cabal before but didn't use "cabal install cabal-install". Maybe that will upgrade me. I wasn't able to directly upgrade base to 4.6.0.1 from within cabal that I could tell, and my base version was to old for your dependencies it seemed.

Edit: Perhaps I'm not meant to be a part of this project, lol.

Code:
[73 of 73] Compiling Main             ( Main.hs, dist/build/cabal/cabal-tmp/Main.o )
Linking dist/build/cabal/cabal ...
Installing executable(s) in /home/ubuntu/.cabal/bin
ubuntu@ip-10-143-203-223:~/code/proxypool$ cabal --version
cabal-install version 0.14.0
using version 1.14.0 of the Cabal library

But wait! ~/.cabal/bin you say?

Code:
ubuntu@ip-10-143-203-223:~/code/proxypool$ ~/.cabal/bin/cabal --version
cabal-install version 1.18.0.2
using version 1.18.1.2 of the Cabal library

But alas, even with cabal 1.18 I'm still stuck with base-4.5.0.0 which fails the base ==4.6.* check.
roy7
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250


View Profile
February 27, 2014, 11:40:03 PM
 #12

Ok by installing everything form source I've got it built. Whew. Wish they provided packages for haskell for 12.04 LTS since it's still got a few years of support left in it.

Once built though, how do you actually run it? This is all I've come up with.

Code:
ubuntu@ip-10-143-203-223:~/code/proxypool$ ./dist/build/server/server
[2014-02-27 23:37:10][main][INFO] Starting server with config: proxypool.json
[2014-02-27 23:37:10][client][INFO] Listening on localhost:9555
[2014-02-27 23:37:10][db][INFO] Connecting to localhost
[2014-02-27 23:37:10][db][WARNING] IOException in DB: connect: does not exist (Connection refused)
[2014-02-27 23:37:10][db][WARNING] Sleeping for 5 seconds before reconnection
server: getAddrInfo: does not exist (Name or service not known)

README has all the build/config info but not what to do once actually built. Wink What are the redis* settings for? What sort of database do I need to configure?
clown (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
February 28, 2014, 04:30:37 AM
Last edit: February 28, 2014, 06:58:10 AM by clown
 #13

You need redis (the database) - the pool will publish shares into redis, and you can subscribe on the channel to get the shares out.

Code:
$ sudo apt-get install redis-server

https://library.linode.com/databases/redis/ubuntu-12.04-precise-pangolin

With cabal

Code:
$ cabal run server

Work as well.

If you want to come chat, come in my pool's IRC - #dogestreet on Freenode

My Dogecoin mining pool. 0% fee, proxypool into p2pool network
fruor
Member
**
Offline Offline

Activity: 78
Merit: 13


View Profile WWW
February 28, 2014, 09:57:33 AM
 #14

would a theoretical 51% of the pool could do any harm?

roy7
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250


View Profile
February 28, 2014, 02:47:47 PM
Last edit: February 28, 2014, 03:50:08 PM by roy7
 #15

You need redis (the database) - the pool will publish shares into redis, and you can subscribe on the channel to get the shares out.

Code:
$ sudo apt-get install redis-server

https://library.linode.com/databases/redis/ubuntu-12.04-precise-pangolin

With cabal

Code:
$ cabal run server

Work as well.

If you want to come chat, come in my pool's IRC - #dogestreet on Freenode

Great, thanks. Had never heard of Haskell before your proxy project or redis. Smiley I do hang out on irc but normally #p2pool and #p2pool-vtc.

Edit: Here's a nice summary:

http://stackoverflow.com/questions/7888880/what-is-redis-and-what-do-i-use-it-for

As a first glance it seems to remind me of the Amazon SQS / SNS services I use on my TRC pool.

For anyone else following along, you run "cabal run server" inside the proxypool folder.
temple
Hero Member
*****
Offline Offline

Activity: 1442
Merit: 539


View Profile
June 05, 2016, 06:01:50 PM
 #16

great project. why not just stop?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!