Giter VIP home page Giter VIP logo

powerpool's People

Contributors

ericecook avatar icook avatar marccardinal avatar patricklodder avatar sbwdlihao avatar udjinm6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powerpool's Issues

Netmon server up checker fails when CannotSendRequest is recieved

Traceback (most recent call last):
File "/home/isaac/programming/powerpool/powerpool/netmon.py", line 32, in monitor_nodes
conn.getinfo()
File "/home/isaac/.virtualenvs/pp/local/lib/python2.7/site-packages/bitcoinrpc/authproxy.py", line 115, in call
'Content-type': 'application/json'})
File "/usr/lib/python2.7/httplib.py", line 973, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1007, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 969, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 829, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 791, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 772, in connect
self.timeout, self.source_address)
File "/home/isaac/.virtualenvs/pp/local/lib/python2.7/site-packages/gevent/socket.py", line 591, in create_connection
raise err
error: [Errno 111] Connection refused
2014-02-22 12:21:48,951 [INFO] Couldn't connect to any RPC servers, sleeping for 1
2014-02-22 12:21:49,951 [INFO] Couldn't connect to any RPC servers, sleeping for 1
Traceback (most recent call last):
File "/home/isaac/.virtualenvs/pp/local/lib/python2.7/site-packages/gevent/greenlet.py", line 327, in run
result = self._run(_self.args, *_self.kwargs)
File "/home/isaac/programming/powerpool/powerpool/netmon.py", line 32, in monitor_nodes
conn.getinfo()
File "/home/isaac/.virtualenvs/pp/local/lib/python2.7/site-packages/bitcoinrpc/authproxy.py", line 115, in call
'Content-type': 'application/json'})
File "/usr/lib/python2.7/httplib.py", line 973, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1001, in _send_request
self.putrequest(method, url, **skips)
File "/usr/lib/python2.7/httplib.py", line 871, in putrequest
raise CannotSendRequest()
CannotSendRequest

Returned when failing a request, needs to catch the errror as a diconnected node and continue.

Broken pipes might not be being handled properly

2014-03-09 18:01:26,490 [stratum_server] [INFO] Recieving stratum connection from addr ('24.124.87.128', 38615) on sock
Traceback (most recent call last):
File "/home/dogecoin/venv/local/lib/python2.7/site-packages/gevent/event.py", line 114, in _notify_links
link(self)
File "/home/dogecoin/powerpool/powerpool/stratum_server.py", line 109, in new_block_call
push_job(flush=True)
File "/home/dogecoin/powerpool/powerpool/stratum_server.py", line 167, in push_job
fp.flush()
File "/usr/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
File "/home/dogecoin/venv/local/lib/python2.7/site-packages/gevent/socket.py", line 458, in sendall
data_sent += self.send(_get_memory(data, data_sent), flags)
File "/home/dogecoin/venv/local/lib/python2.7/site-packages/gevent/socket.py", line 435, in send
return sock.send(data, flags)
error: [Errno 32] Broken pipe
(<function new_block_call at 0x2eea0c8>,
<gevent.event.Event object at 0x300dcd0>) failed with error

Check to confirm that all cleanup is being performed properly. This should still be fine tho.

make job push task from block notif a no-op

404968-2014-03-30 11:06:16,853 [stratum_server] [INFO] Sending job id f5210000 to worker None.

this shouldn't happen. It's unlikely to be causing a problem, but should be fixed either way.

Pushing new block needs to trigger the main loop as opposed to force sending

Occasionally (0.2%) of the time we try to push a new block right when the main loop is using the socket. This causes new block notification to fail, thus increasing stale shares slightly. While efficiency is consistently 99%+ this should still be resolved. Will likely require rebuilding the main stratum loop to use read and write queues.

Est time 6+ hours.

Setup fatal disconnect conditions

Becomming disconnected from certain services should cause all clients to become disconnected until communication is restored. For example, loosing connection to all coinservers will cause no new block announcements to be sent out, silently generating 100% stale shares. It would be highly preferable to disconnect all peers so they can switch to a backup pool.

Seems to be a race condition causing difficulty mismatch with vardiff

Not 100% sure why, but sometimes a worker will think the difficulty is different than it is and can be seen by submitting a bunch of low diff shares. Seems to happen very infrequently.

Likely a race condition in which a job is generated based on one difficulty from the new block notification command and at the same time vardiff pushes a new difficulty. If the new difficulty notification arrives out of order with the job the client will think it's the wrong diff. This should be solved by job submission locking vardiff calculation function. The other way around will make gevent grumpy because it adds a blocking operation to an event call.

Rework vardiff engine to calculate difficulty based on entire address hashrate.

Currently we implement vardiff on a per-connection level. This is somewhat undesirable since people with large numbers of workers start hitting DOS limits at 20 shares/second with like 10-15 workers. A better solution would be setting difficulty on a per-address or per-ip basis. This would scale much better as well.

Store last sent job and don't send twice except on timeout.

New aux work on multiple auxiliary chains can trigger a send of the same job multiple times, which is wasteful. It would be a good idea to record the last job and have async job pushes only send jobs that hadn't been sent.

Again, more bandwidth reduction.

Setup a job manager that only updates jobs when values change

Currently it's quite common for jobs to be sent out 3 times when a main network block is solved (once for each merge mined block...). This could be prevented somewhat by recording changes in last_gbt and merged values and only actually recomputing and pushing when needed.

Store last job push and check from timeout

Since pushing of new jobs is asynchronous then it would be a good idea to store a last sent time, and have the timeout refer to last sent time instead of blindly sending. This will save some bandwidth and avoid spamming new job notifs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.