cdhowie / bitcoin-mining-proxy Goto Github PK
View Code? Open in Web Editor NEWMulti-pool, multi-worker proxy for Bitcoin miners, supporting long polling and pool failover
License: GNU Affero General Public License v3.0
Multi-pool, multi-worker proxy for Bitcoin miners, supporting long polling and pool failover
License: GNU Affero General Public License v3.0
This is an enhancement/feature request, but I was wondering if there was a way to list pools and shares submitted to each pool in the past hour/hashrate.
Similar to the Worker table, but per pool instead.
dupe
Hello,
Can we still use scrypt?
How to set it up is how to connect our worker SVP
with cgminer
A big thank-you
using latest git version,
I'm getting the message in error_log of apache.
I posted a new topic in bitcoin forum : ( http://forum.bitcoin.org/index.php?topic=32547.msg406460#msg406460 )
for the stale rate, won't it make more sense if it is daily or even lifetime instead of default interval 1h?
but for submitted share alert, i would probably like 5min. to check whether one card is down.
for hashing speed, 15min will be fine.
so I recommend separate interval settings for submitted share alert, hashing speed and stale rate.
When a pool fails to respond to a request or returns an error, the software should only try again on the next few requests and then back off for a minute or two to improve efficiency of the miner as well as give the pool some breathing room.
Many pools provide an API to view the balance of your account. Perhaps this can be integrated so you can view the balance of all of your pools from the pool overview page.
I've managed to install and configure the proxy (adding pools, workers, and adding workers to pools), but when I point a miner to it, it seems that only the authentication happens. Here's what phoenix spits out:
[14/06/2011 21:13:34] Phoenix 1.48 starting...
[14/06/2011 21:13:34] Connected to server
[0 Khash/sec] [0 Accepted] [0 Rejected] [RPC]Unhandled Error
Traceback (most recent call last):
File "phoenix.py", line 125, in <module>
File "twisted\internet\base.pyc", line 1162, in run
File "twisted\internet\base.pyc", line 1171, in mainLoop
--- <exception caught here> ---
File "twisted\internet\base.pyc", line 793, in runUntilCurrent
File "minerutil\RPCProtocol.pyc", line 127, in callback
File "minerutil\RPCProtocol.pyc", line 319, in handleWork
exceptions.TypeError: argument of type 'NoneType' is not iterable
Phoenix r101 does not give any error messages, but stays at 0Mhash/s
I've also tried using bitcoin getwork
, to which I get error: no response from server
. I'm not sure if this should work, however
The proxy is on PHP 5.3.6-pl0-gentoo (fpm-fcgi) on Cherokee 1.2.2
My miners are doing 418Mhash/sec, yet on the dashboard, it says 1 miner is up doing 1.93MHash. While it reports the other 7 as down completely. I've been running the proxy for about 4 hours now.
My setup is Phoenix 1.7.4 -> bitcoin mining proxy -> merged mining proxy -> bitcoin/namecoin/ixcoin/i0coin daemons
Really like the look of this proxy, hope we can fix this one :D
Rather than change individual priorities by click, edit and save, wouldn't it be much easier to just drag and drop to rearrange the position on the list?
I'm still tracking down the exact cause, but if long-polling is enabled and you serve the proxy with LigHTTPd, it will quit responding to requests as the PHP FastCGI process hangs indefinitely.
Increasing the "max-procs" directive will delay this but it eventually happens in every configuration I've tried.
If you want more details, let me know, otherwise I'll keep pursuing this on my own and see if I can find a way to fix it.
Referencing the post here: http://forum.bitcoin.org/index.php?topic=5506.msg202247#msg202247
To clarify this a bit, would like the option to edit all pools or all workers within the same page. This would not replace existing functionality but I think add another button below the list of pools/workers that has an 'Edit All' functionality.
There are some clients which don't support long polling using params (phoenix is one), and end up hammering the webserver over and over.
Also long polling uses up a php process indefinitely. I have had a situation where a client keeps hitting that URL every 5 seconds (because its having some sort of issues), causing all of the backend PHP processes to be used up.
Until this is a little more stable, I've manually edited the code to not use long polling at all.
Right now you can edit the pools assigned to a worker, through the worker. This would allow the ability to add/edit/view workers from the reverse side. You choose the pool, and then add workers into it, etc.
From the thread here: http://forum.bitcoin.org/index.php?topic=5506.msg180612#msg180612
Ok with php 5.3.5 things work better but there is still a blank page when editing a worker. Changed name or password is not saved.
When opening the page on /admin a login screen is presented.
After typing the username and password like defined in config.inc.php I get redirected to the same login screen.
I can do this a infinity time without ever getting into the site.
When removing
auth_fail(); from function do_admin_auth()
the site works without any problems.
Attempting to edit a pool in the latest git commit ( 81b3ce1 ) results in the error "Pool not found."
This seems to be because of a missing GROUP BY
clause in the SQL query starting on line 96 in pool.inc.php, which throws a MySQL error. Adding GROUP BY wp.worker_id
after the WHERE
clause appears to fix this.
[warn] Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
No error appears, all my miners quit connecting, so I checked the apache logs and that appeared. Any idea?
Some pools take longer than 2 seconds to respond to submission requests (depending on load, ddos, etc...). This isn't a problem during a getwork request (just hop to the second pool in line), but it has been causing a high number of "rejects" for me.
I propose implementing a submission caching system. The proxy caches the submission allowing the worker to immediately request a new piece of work. The proxy then tries to send the solved work X times with Y timeout (say, X=10, Y=20). Of course, this will invalidate the statistics reported on each individual miner for accepts/rejects.
Another option would be to simply increase the timeout on work submission.
I would like to implement a C# service that can replace/supplement the PHP getwork/LP backend to more efficiently handle requests, keep queues of work around, and provide better failover decisions. The current "execute code upon request" model is a bit limiting, so allowing a long-running service to decide how to failover and how/when to appropriately respond to miner LP requests (as well as to handle the pool LP requests) would be extremely beneficial to performance and maintainability of the proxy.
as the title says, can it?
hi,
i really love your proxy!
but one of my pools "multipool.hpc.tw:8337 -u #btc adress# -p ignored" does not work.
on forums.bitcoin.org there is one post which might bring an solution: http://forum.bitcoin.org/index.php?topic=5506.msg280186#msg280186
regards & thank you for your work
flower
If a work submission fails due to an HTTP or JSON-level error (this is different from the share being rejected), the software should try again a few times and then finally disable the pool for a few minutes to prevent miners from working a pool that cannot process share submissions.
It would seem that the ufasoft miner is failing to communicate with the proxy correctly. It receives work from the proxy, but when it submits completed work, it never is actually processed, or passed through to the pool by the proxy. I have tried monitoring packets to see what is different about how ufa communicated vs puddinpop rpc, but apparently this is above my pay grade to figure out and contribute a solution.
I am getting an error message that says:
Malformed long-polling request URL
Sorry if the answer is already buried in here someplace, I cannot find it.
Everything appears to be set up correctly - Pools added and active, workers added and active. Dashboard and SQL server appear to be working, but thats as far as it goes. I've tried different pools, and have had no luck. Could somebody help me out, or point me in the right direction ?
EDIT
I switched hosting providers to see if it was my server now I'm getting:
"Sorry, I don't understand what you just said."
When connecting with a miner it just sits there on 0Mh
I'm using PHP 5.3 / Apache 2.2 / MySQL 5.1
magic_quotes_gpc is OFF (confirmed)
Hi,
is it possible to add support for a proxy?
I'm behind a squid proxy and I cannot access internet directly: I'm not a PHP expert but it looks like you need to change function place_json_call() in common.inc.php.
Thanks
Bye
Piero
The proxy is sending an extra "\r\n\r\n" after the JSON content of the HTTP request. This is an error.
config.inc.php
should have an option for the timezone (either GMT offset or proper named zone) that will be used to adjust timestamps before they are displayed.
If the pool or pool-worker assignment corresponding to an outstanding long polling request is disabled, the long polling request does not abort. This has three implications:
Not sure what the issue here is, if someone can point me in the direction to debug this I'll happily do it. The pool works fine with a direct connection from phoenix, but doesn't get used at all via proxy.
I've double checked pool info in the proxy DB and it is correct. Perhaps related to the multipool issue?
90% shares arent being submitted?
Linux:
[24/06/11 8:49:58 PM] DEBUG: Attempt 77 found on Cypress (#3)
[24/06/11 8:50:02 PM] DEBUG: Attempt 78 found on Cypress (#2)
[24/06/11 8:50:07 PM] DEBUG: Attempt 79 found on Cypress (#2)
[24/06/11 8:50:12 PM] DEBUG: Attempt 80 found on Cypress (#3)
[24/06/11 8:50:13 PM] DEBUG: Attempt 81 found on Cypress (#2)
[24/06/11 8:50:14 PM] DEBUG: Attempt 82 found on Cypress (#3)
[24/06/11 8:50:15 PM] DEBUG: Attempt 83 found on Cypress (#2)
[24/06/11 8:50:18 PM] DEBUG: Attempt 84 found on Cypress (#3)
[24/06/11 8:50:21 PM] DEBUG: Attempt 85 found on Cypress (#1)
[24/06/11 8:50:23 PM] DEBUG: Attempt 86 found on Cypress (#2)
[24/06/11 8:50:33 PM] DEBUG: Attempt 87 found on Cypress (#2)
Windows machine:
[24/06/11 8:56:17 PM] DEBUG: Attempt 3 found on Cayman (#2)
[24/06/11 8:56:18 PM] DEBUG: Attempt 4 found on Cayman (#2)
[24/06/11 8:56:20 PM] DEBUG: Attempt 5 found on Cayman (#2)
[24/06/11 8:56:26 PM] DEBUG: Forcing getwork update due to nonce saturation
[24/06/11 8:56:31 PM] DEBUG: Forcing getwork update due to nonce saturation
[24/06/11 8:56:32 PM] DEBUG: Attempt 6 found on Cayman (#2)
[24/06/11 8:56:32 PM] DEBUG: Attempt 7 found on Cayman (#2)
[24/06/11 8:56:34 PM] DEBUG: Attempt 8 found on Cayman (#2)
[24/06/11 8:56:38 PM] DEBUG: Attempt 9 found on Cayman (#2)
mhash 364.5/362.8 | a/r/hwe: 0/1/0 | ghash: 30.1 | fps: 30.4
Nothing is being submitted?
Phoenix works 100%.
[26/06/2011 20:44:55] Server gave new work; passing to WorkQueue
[26/06/2011 20:44:58] Result 00000000b278dc5f... accepted
[26/06/2011 20:45:06] Result 0000000040786380... rejected
[26/06/2011 20:45:06] Result 00000000554f353d... accepted
[26/06/2011 20:45:08] Result 000000002c8473cf... accepted
[26/06/2011 20:45:08] Server gave new work; passing to WorkQueue
[26/06/2011 20:45:11] Result 00000000d9981a03... accepted
[26/06/2011 20:45:12] Result 00000000e022cef0... rejected
[26/06/2011 20:45:26] Result 000000001c40b050... accepted
[26/06/2011 20:45:32] Warning: work queue empty, miner is idle
[26/06/2011 20:45:33] Server gave new work; passing to WorkQueue
[26/06/2011 20:45:35] Server gave new work; passing to WorkQueue
[26/06/2011 20:45:47] Server gave new work; passing to WorkQueue
[26/06/2011 20:46:00] Server gave new work; passing to WorkQueue
[26/06/2011 20:46:06] Result 00000000516f1f92... accepted
[26/06/2011 20:46:13] Server gave new work; passing to WorkQueue
[26/06/2011 20:46:25] Server gave new work; passing to WorkQueue
[26/06/2011 20:46:38] Server gave new work; passing to WorkQueue
[26/06/2011 20:46:41] Result 000000006bb4311a... accepted
[26/06/2011 20:46:45] Result 00000000c2c76ecf... accepted
[337.08 Mhash/sec] [1540 Accepted] [76 Rejected] [RPC (+LP)]
From the creator of DiabloMiner:
"The proxy probably does not correctly support things DiabloMiner does, such as time incrementing and returning multiple nonces for the same getwork over short periods. It looks like the sendwork thread is being choked by the proxy.
So, clearly, its a proxy bug."
I was unable to mine with a pool hostname that only resolved to an IPv6 address.
After few hours, I cannot connect to the proxy, in apache error_log, I see the following message :
[Thu Jul 28 20:17:37 2011] [error] [client 192.168.0.XXX] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1040] Too many connections' in common.inc.php:33\nStack trace:\n#0 common.inc.php(33): PDO->__construct('mysql:host=loca...', 'bitcoin_proxy', '741369')\n#1 index.php(31): db_connect()\n#2 {main}\n thrown in common.inc.php on line 33
We most likely have a preferences over pools/servers over all our workers. Changing the priority on each individual worker is just tiresome. Wouldn't it be better to have a bulk pool priority change option for all workers?
Reference this post here: http://forum.bitcoin.org/index.php?topic=5506.msg219633#msg219633
Don't know if this would be really usable. I can see if you want multiple workers on the proxy to point to one worker on the pool. Does that defeat the point of this proxy?
Hey boss! :)
How can i connect to the proxy for example with guiminer?
Host: Webserver IP, port 80? username/pw ok
I tried several programs, but the answer: Server not found, or Nothing to read from server after xtime sleeping 1 seconds inbetween
I have forwarded 80, 443, 3333, 3433, 8888 ports
Adresses in database:
name: Zpool
stratum+tcp://scrypt.eu.mine.zpool.ca:3433
name: LTCPOOL
url: tcp://litecoinpool.org:3333
(Problem is: miner connecting to web, but it doesn't go any further) please help.
Thx, and have a nice day! :) +coffee
The proxy should be modified to support Deepbit's failover extensions. This will require database schema changes to cache the contents of the X-Host-List
header, as well as code changes to support failing over to the hosts.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.