Bitcoin Forum
May 12, 2024, 01:05:52 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: RollProxy - a bandwidth-saving mining proxy  (Read 14359 times)
pooler (OP)
Hero Member
*****
Offline Offline

Activity: 838
Merit: 507


View Profile
August 25, 2012, 07:51:43 PM
Last edit: August 29, 2012, 11:02:27 AM by pooler
 #1

Announcing RollProxy, a mining proxy... with a twist!

RollProxy takes advantage of the X-Roll-NTime extension to minimize the number of getwork requests you send to pools.  By keeping more requests local, it minimizes latency, while drastically reducing the load on upstream servers.
The proxy will prove especially useful to those who run many miners on a single local network.

Features
  • Works with Bitcoin as well as with Litecoin and other cryptocurrencies that use the getwork protocol
  • Makes persistent HTTP connections
  • Supports long polling
  • Per-worker statistics available via web interface
  • Round-robin failover mechanism (more advanced strategies may be implemented in the future)
  • Ability to connect through an additional proxy server

Please note that your miners need not support the X-Roll-NTime extension; it's the pools you connect to that need to. If you connect to a pool that doesn't support the extension, the proxy will still work, but you will see no increase in getwork efficiency. In that case, RollProxy will warn you with a "Work cannot be reused" message.
Major pools that are known to support the extension include:

  • For Bitcoin: Eclipse, Eligius, MaxBTC, Mt. Red, OzCoin, P2Pool, Slush
  • For Litecoin: burnside's, LitecoinCash, notroll.in, OzCoin, P2Pool, Pool-X, Xurious's

RollProxy is written in Python and is distributed under the terms of the AGPLv3. Please refer to the readme for details about setting it up.
https://github.com/pooler/rollproxy

This first public release (version 0.5.0) should already be pretty stable; I wish to thank Pontius, who helped me by testing preliminary versions of the program.

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
1715475952
Hero Member
*
Offline Offline

Posts: 1715475952

View Profile Personal Message (Offline)

Ignore
1715475952
Reply with quote  #2

1715475952
Report to moderator
1715475952
Hero Member
*
Offline Offline

Posts: 1715475952

View Profile Personal Message (Offline)

Ignore
1715475952
Reply with quote  #2

1715475952
Report to moderator
1715475952
Hero Member
*
Offline Offline

Posts: 1715475952

View Profile Personal Message (Offline)

Ignore
1715475952
Reply with quote  #2

1715475952
Report to moderator
The network tries to produce one block per 10 minutes. It does this by automatically adjusting how difficult it is to produce blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715475952
Hero Member
*
Offline Offline

Posts: 1715475952

View Profile Personal Message (Offline)

Ignore
1715475952
Reply with quote  #2

1715475952
Report to moderator
1715475952
Hero Member
*
Offline Offline

Posts: 1715475952

View Profile Personal Message (Offline)

Ignore
1715475952
Reply with quote  #2

1715475952
Report to moderator
paraipan
In memoriam
Legendary
*
Offline Offline

Activity: 924
Merit: 1004


Firstbits: 1pirata


View Profile WWW
August 25, 2012, 07:57:36 PM
 #2

Nice, will be using this  Smiley

BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
racerguy
Sr. Member
****
Offline Offline

Activity: 270
Merit: 250


View Profile
August 25, 2012, 09:52:57 PM
 #3

Nice work.
Pontius
Full Member
***
Offline Offline

Activity: 225
Merit: 100


View Profile
August 26, 2012, 07:41:46 AM
 #4

Great work, pooler! Thanks a lot for sharing this.
BR0KK
Hero Member
*****
Offline Offline

Activity: 784
Merit: 500



View Profile
August 26, 2012, 02:05:02 PM
 #5

And for the windows dummies out there (like me) Smiley?

how do i connect a miner to that proxy?

Normaly i give my mining program the credentials to my pool. For what i understand is that i give them to your proxy and connect my miner to it instead?




-ck
Legendary
*
Offline Offline

Activity: 4102
Merit: 1632


Ruu \o/


View Profile WWW
August 26, 2012, 02:45:08 PM
 #6

Note that cgminer does this already intrinsically and adding this proxy with it serves no real purpose. I can't speak for all other mining software though.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
pooler (OP)
Hero Member
*****
Offline Offline

Activity: 838
Merit: 507


View Profile
August 26, 2012, 08:59:36 PM
 #7

Note that cgminer does this already intrinsically and adding this proxy with it serves no real purpose.

That's if you only have one computer mining. If you have more than one, no miner can do what this proxy does.

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
pooler (OP)
Hero Member
*****
Offline Offline

Activity: 838
Merit: 507


View Profile
August 26, 2012, 09:32:54 PM
 #8

And for the windows dummies out there (like me) Smiley?
Last time I used Windows was about 10 years ago, so it's best if I let someone else answer this question...

how do i connect a miner to that proxy?

Normaly i give my mining program the credentials to my pool. For what i understand is that i give them to your proxy and connect my miner to it instead?
Yes. You start the proxy specifying the address and credentials for one or more pools; then you connect your miners to the proxy, which by default runs on port 8345. Miners need not authenticate, but if they provide a username you will see per-worker stats in the web interface of RollProxy (which is also served on port 8345 by default).

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
BR0KK
Hero Member
*****
Offline Offline

Activity: 784
Merit: 500



View Profile
August 27, 2012, 12:54:10 AM
 #9

So i connect them to  localhost:port x ?



pooler (OP)
Hero Member
*****
Offline Offline

Activity: 838
Merit: 507


View Profile
August 27, 2012, 07:01:25 AM
 #10

So i connect them to  localhost:port x ?

You connect miners to the computer running the proxy. If a miner is on the same computer as the proxy, you can just connect it to localhost:8345. If the proxy is running on, say, 192.168.1.123, connect miners to 192.168.1.123:8345.

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
Subo1977
Sr. Member
****
Offline Offline

Activity: 344
Merit: 250


Flixxo - Watch, Share, Earn!


View Profile
August 27, 2012, 11:07:25 AM
 #11

Great idea. I will try it out

X       ▄▄█████████▄▄
    ▄██▀▀         ▀▀██▄
  ▄██▀              ▀██▄
 ▄██     ██▄▄          ██▄
▄██      █████▄▄        ██▄
██       ████████▄▄      ██
██       ███████████▄    ██
██       ██████████▀     ██
▀██      ███████▀       ██▀
 ▀██     ████▀         ██▀
  ▀██▄   █▀          ▄██▀
    ▀██▄▄         ▄▄██▀
       ▀▀█████████▀▀
.flixxo    X▄████████████████████▄
██████████████████████
██████████████████████
████████████▀▀███████
█████▀████░░░░░░▄████
█████░░░░░░░░░░▄█████
█████▄░░░░░░░░░░██████
██████░░░░░░░░░███████
███████░░░░░░▄████████
████▄▄░░░░▄▄██████████
██████████████████████
██████████████████████
▀████████████████████▀
▄████████████████████▄
██████████████████████
█████████▀█▀██████████
██████▀▀▀▀▀████████
██████▄▄░░▄▄▄░░███████
████████░░███░░███████
████████░░░░░░▀███████
████████░░███▄░░██████
██████▀▀░░▀▀▀░░░██████
██████▄▄▄▄▄▄███████
█████████▄█▄██████████
██████████████████████
▀████████████████████▀
X[[]]X
macavity
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
August 27, 2012, 08:26:23 PM
 #12

say, pooler, would it be possible to add support for socks proxies in addition to http? this could quite possibly be the best thing since cgminer, if only it had socks support Smiley
Gabi
Legendary
*
Offline Offline

Activity: 1148
Merit: 1008


If you want to walk on water, get out of the boat


View Profile
August 27, 2012, 10:13:39 PM
 #13

What about just using p2pool?

pooler (OP)
Hero Member
*****
Offline Offline

Activity: 838
Merit: 507


View Profile
August 28, 2012, 08:59:29 AM
 #14

say, pooler, would it be possible to add support for socks proxies in addition to http? this could quite possibly be the best thing since cgminer, if only it had socks support Smiley

I realize that SOCKS support would be a very nice feature to have. The problem is that the master branch of urllib3 doesn't support SOCKS proxies yet, although developers have been working on it for some time now (see this pull request).
One option would be to rewrite RollProxy to use PycURL instead of urllib3, but the problem is that urllib3 seems to be the only decent HTTP library that supports connection pooling.
Another option would be to use SocksiPy, which however is buggy, old, and unmaintained.
For the above reasons, it's probably better to wait till the urllib3 guys finish implementing SOCKS support.

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
macavity
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
August 28, 2012, 08:23:11 PM
 #15

say, pooler, would it be possible to add support for socks proxies in addition to http? this could quite possibly be the best thing since cgminer, if only it had socks support Smiley

I realize that SOCKS support would be a very nice feature to have. The problem is that the master branch of urllib3 doesn't support SOCKS proxies yet, although developers have been working on it for some time now (see this pull request).
One option would be to rewrite RollProxy to use PycURL instead of urllib3, but the problem is that urllib3 seems to be the only decent HTTP library that supports connection pooling.
Another option would be to use SocksiPy, which however is buggy, old, and unmaintained.
For the above reasons, it's probably better to wait till the urllib3 guys finish implementing SOCKS support.
oh. Yeah, you're right. No point in rewriting the thing for another lib.

In any case, it seems my debian squeeze server is stuck on python 2.6.6 anyway, which neither offers urllib3 packages, nor satisfies rollproxy's version requirement. Oh well.
Pontius
Full Member
***
Offline Offline

Activity: 225
Merit: 100


View Profile
August 29, 2012, 07:09:46 AM
 #16

In any case, it seems my debian squeeze server is stuck on python 2.6.6 anyway, which neither offers urllib3 packages, nor satisfies rollproxy's version requirement. Oh well.


Rollproxy on squeeze works fine for me:

Code:
apt-get install python-pip
pip install argparse
pip install urllib3

python /usr/local/bin/rollproxy.py -v <your pool(s)>
[2012-08-29 08:58:05] Serving HTTP on port 8345
macavity
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
August 29, 2012, 01:01:11 PM
 #17

In any case, it seems my debian squeeze server is stuck on python 2.6.6 anyway, which neither offers urllib3 packages, nor satisfies rollproxy's version requirement. Oh well.


Rollproxy on squeeze works fine for me:

Code:
apt-get install python-pip
pip install argparse
pip install urllib3

python /usr/local/bin/rollproxy.py -v <your pool(s)>
[2012-08-29 08:58:05] Serving HTTP on port 8345
oooh, interesting. and here i tried installing the wheezy packages for urllib3 Roll Eyes
thank you very much, it is working now.

and thank you, too, pooler. rollproxy is great!
Mobius
Hero Member
*****
Offline Offline

Activity: 988
Merit: 1000



View Profile
August 30, 2012, 06:55:44 AM
 #18

say, pooler, would it be possible to add support for socks proxies in addition to http? this could quite possibly be the best thing since cgminer, if only it had socks support Smiley

cgminer does:
--socks-proxy <arg> Set socks4 proxy (host:port)
pooler (OP)
Hero Member
*****
Offline Offline

Activity: 838
Merit: 507


View Profile
August 31, 2012, 08:43:35 AM
 #19

say, pooler, would it be possible to add support for socks proxies in addition to http? this could quite possibly be the best thing since cgminer, if only it had socks support Smiley

cgminer does:
--socks-proxy <arg> Set socks4 proxy (host:port)

Unfortunately that doesn't help. What is needed is a way for RollProxy to connect to the Internet through a SOCKS4/5 proxy, not a way for the miners to connect to RollProxy through an additional local proxy.

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
mb300sd
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
September 17, 2012, 05:45:39 AM
 #20

say, pooler, would it be possible to add support for socks proxies in addition to http? this could quite possibly be the best thing since cgminer, if only it had socks support Smiley

cgminer does:
--socks-proxy <arg> Set socks4 proxy (host:port)

Unfortunately that doesn't help. What is needed is a way for RollProxy to connect to the Internet through a SOCKS4/5 proxy, not a way for the miners to connect to RollProxy through an additional local proxy.

Use socat.
 
for mining through tor,

socat tcp-listen:18332,fork,reuseaddr socks4a:127.0.0.1:pool.com:8332,socksport=9050

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
Pages: [1] 2 3 »  All
  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!