Commit Graph

  • a1eabf7305 Send a dead proxy notification to the stratifier when we disable a subproxy to switch clients on it Con Kolivas 2015-02-17 00:09:28 +1100
  • 40ebe7d1b0 Delete subproxies from the correct hashlist Con Kolivas 2015-02-16 23:02:25 +1100
  • c295d6a8d4 Do a soft failover to backup proxies, not disconnecting them unless the upstream subproxy no longer exists, but a hard failover to higher priority proxies Con Kolivas 2015-02-16 21:46:44 +1100
  • e2826e3c08 Add minor comment about memory leak Con Kolivas 2015-02-16 20:59:34 +1100
  • 4db64cd883 Allow but warn about ultra small nonce2 size upstream pools Con Kolivas 2015-02-16 01:16:37 +1100
  • 50ebbe8086 Make reconnect proxies inherit the subproxy count of the original for the stratifier to know they're unique Con Kolivas 2015-02-16 01:09:14 +1100
  • 14a7ec05e2 Use the subid when disabling a subproxy instead of the id Con Kolivas 2015-02-16 00:16:29 +1100
  • a98d510f9f Add subproxy information to generator messages where appropriate Con Kolivas 2015-02-15 22:55:24 +1100
  • d61ba33e69 Set subproxy count and subid under lock to prevent clashes and ensure the subproxy inherits the parent's id Con Kolivas 2015-02-15 22:44:24 +1100
  • 7adf0f1c7e All reconnects will discard the original proxy instance data so shut down the associated send thread as well as the receive and remove unnecessary extra flags Con Kolivas 2015-02-15 22:08:32 +1100
  • edbe863a26 Only add the parent proxy to the subproxy list once Con Kolivas 2015-02-15 21:52:32 +1100
  • 5fb4e8d545 Set the parent proxy to the new instance on a reconnect Con Kolivas 2015-02-15 21:41:49 +1100
  • fe6fe5bac2 Remove the now unused current_notify Con Kolivas 2015-02-15 20:22:53 +1100
  • 39f2839252 Send notify as soon as a proxy receives it instead of trying to look it up later Con Kolivas 2015-02-15 20:19:41 +1100
  • e24b6846d8 Count stats from ckp sdata to show proper proxy hashrate Con Kolivas 2015-02-15 15:52:15 +1100
  • 02f31fccc3 Add reconnect proxies to the hashlist using hash_replace in case it has already been removed, and add it to its own subproxy list Con Kolivas 2015-02-15 15:04:40 +1100
  • b4bf867269 Always disable subproxies on failure to send message Con Kolivas 2015-02-15 14:52:39 +1100
  • a2131e438d Drop subproxies when parent proxy is invalidated Con Kolivas 2015-02-15 14:49:12 +1100
  • 835ff395c2 Reset client and enonce1u count on resubscribe Con Kolivas 2015-02-15 14:46:36 +1100
  • ffdac57b0e Decrease failback time to 30 seconds on proxy Con Kolivas 2015-02-15 14:20:05 +1100
  • 4d5ef2a76a Don't try to recruit extra subproxies on initial connect Con Kolivas 2015-02-15 14:18:35 +1100
  • b7680263aa Set subproxies to disabled when dropping them Con Kolivas 2015-02-15 14:11:30 +1100
  • 0fc4507bf3 Add more info to failed to authorise Con Kolivas 2015-02-15 13:42:16 +1100
  • 7af4b89138 Demote json_result decode failed message to notice level Con Kolivas 2015-02-15 13:37:44 +1100
  • 395d1277a7 Set notify_id on all proxies in case we switch later to them with setproxy Con Kolivas 2015-02-15 11:50:13 +1100
  • 051ee7278a Iterate over correct hashtable with ckp sdata for stratum broadcasts Con Kolivas 2015-02-15 11:13:10 +1100
  • 26ca36feb1 Set reconnect on both notify id fix and setproxy when we have enough information Con Kolivas 2015-02-15 10:57:08 +1100
  • a7da93981e Determine whether we need to reconnect clients based on the parent proxy's notify id which is reset on each subscribe Con Kolivas 2015-02-15 10:45:04 +1100
  • 5dc3f9cb22 Only issue reconnect when the parent pool has set its notified flag Con Kolivas 2015-02-14 18:21:57 +1100
  • 5cb12347a7 Add parent proxy as a subproxy in stratifier Con Kolivas 2015-02-14 17:36:21 +1100
  • 566d6c656e Send correct subproxy id to stratifier Con Kolivas 2015-02-14 17:20:16 +1100
  • c8025958f9 Add notify and diff subid details Con Kolivas 2015-02-14 17:15:23 +1100
  • 371b59f452 Use a different hashlist for the subproxies in the stratifier to avoid hashlist clash Con Kolivas 2015-02-14 17:09:07 +1100
  • 413c73bc33 Drop the child subproxies if the parent proxy is not alive Con Kolivas 2015-02-14 16:59:59 +1100
  • 37b6406e0e Set share response to true even if we don't find the matching share Con Kolivas 2015-02-14 16:45:46 +1100
  • 8476d12876 Fix failover of parent proxy Con Kolivas 2015-02-14 16:21:27 +1100
  • d9ea42bdc7 Disable subproxies that are given a reconnect message, allowing more subproxies to be recruited by parent's reconnect if need be instead Con Kolivas 2015-02-14 16:05:06 +1100
  • 31b0e4df67 Only check for existence of current proxy when switching, not best which may have already been set to the alive proxy Con Kolivas 2015-02-14 15:59:37 +1100
  • 008c9a32d9 Give subproxies their own hashlist to allow them to be on two hashtables Con Kolivas 2015-02-14 15:57:12 +1100
  • bef6bd57db Make best_proxy non blocking compared to wait_best_proxy Con Kolivas 2015-02-14 14:59:21 +1100
  • ca8d50280d Only set alive to false on parent proxy failing Con Kolivas 2015-02-14 14:51:37 +1100
  • d0f557bbf8 Handle reconnect message differently for parent proxy than child subproxies Con Kolivas 2015-02-14 14:44:33 +1100
  • 1e7a786915 Fix misuse of function Con Kolivas 2015-02-14 14:29:02 +1100
  • 5ce95d99a7 Use the parent proxy as one of the subproxies as upstream pools may disconnect idle clients and the parent determines the children's activities Con Kolivas 2015-02-14 14:21:20 +1100
  • 0092e0982c Create a helper function for determining parent proxy Con Kolivas 2015-02-14 12:54:31 +1100
  • 81370d2c87 Reset variables that will affect functioning of recycled proxies Con Kolivas 2015-02-14 12:41:48 +1100
  • 3d44a13470 Store dead proxy instances to be recycled if possible Con Kolivas 2015-02-14 12:32:02 +1100
  • b59760bb4a Disable subproxies as they die, moving them to a dead list instead of trying to reuse them and recruit fresh proxies, disconnecting clients connected to them Con Kolivas 2015-02-14 12:03:41 +1100
  • aa153ba742 Differentiate pong from other spurious messages from clients Con Kolivas 2015-02-14 11:25:33 +1100
  • df1465f275 Use msg_id variable for clarity Con Kolivas 2015-02-14 11:20:45 +1100
  • 8ebd5de420 Use json_getdel_int64 helper in the connector Con Kolivas 2015-02-14 11:16:01 +1100
  • 48f7702bd6 Add json_getdel_int64 helper Con Kolivas 2015-02-14 11:15:45 +1100
  • ed0d20d216 Use json_getdel_int helper in generator Con Kolivas 2015-02-14 11:12:01 +1100
  • 40b10ee2ba Add helper to set a json integer and then delete its entry from the json Con Kolivas 2015-02-14 11:10:03 +1100
  • 31a5e3d5ce Delete the subproxy entry in the share after sending it to the proxy send thread Con Kolivas 2015-02-13 16:28:59 +1100
  • 2d35d0c679 Parse reconnect differently for subproxies than master proxies Con Kolivas 2015-02-13 16:11:11 +1100
  • c43d89275a Fix various logic errors dealing with upstream proxy disconnects Con Kolivas 2015-02-13 15:52:52 +1100
  • 338cc49c7e Add verbose notify message Con Kolivas 2015-02-13 15:14:21 +1100
  • 9edfbc8790 Don't send proxy diff till it's set yet Con Kolivas 2015-02-13 15:08:25 +1100
  • b13446e387 Send proxy subscription to stratifier as soon as we have it Con Kolivas 2015-02-13 15:02:04 +1100
  • e287feede0 Send only the parent proxy id from the generator to the stratifier Con Kolivas 2015-02-13 14:25:47 +1100
  • 9b04f81666 Set correct variable in update_diff Con Kolivas 2015-02-13 14:22:20 +1100
  • f15fbdbc70 Receive diff from the upstream proxy and add share submission to the correct psend list Con Kolivas 2015-02-13 14:18:30 +1100
  • 955bbe6977 Use the client's sdata to associate correct share submissions with the upstream proxy Con Kolivas 2015-02-13 14:05:39 +1100
  • 6a21a67c1e Use client sdata with update_client call Con Kolivas 2015-02-13 12:51:35 +1100
  • 27faf4d1c4 Fix proxy epfd not being set Con Kolivas 2015-02-13 12:45:05 +1100
  • 319d0943fc Update diff on all stratifier data but send diff only to clients bound to the current subproxy Con Kolivas 2015-02-13 12:14:31 +1100
  • bcd499bf31 Assign the client subproxy data in new_enonce1 Con Kolivas 2015-02-13 12:07:07 +1100
  • c872ce9de8 Store the proxy and subproxy id only in clients and sort subproxies by subid to avoid confusion Con Kolivas 2015-02-13 12:02:15 +1100
  • dc293beb9c Separate delivery of messages by ckpool sdata and per proxy sdata Con Kolivas 2015-02-13 10:37:56 +1100
  • dd1dae4ae3 Send the relevant sdata to be used by new_enonce1 Con Kolivas 2015-02-13 10:25:54 +1100
  • 7763b49c2e Allow stratifier to choose the best subproxy to attach new users to and request recruitment of more subproxies when the headroom for more clients is low Con Kolivas 2015-02-13 10:15:48 +1100
  • 6822282672 Generate stratifier data per subproxy instead of per proxy since they'll have unique workbases Con Kolivas 2015-02-13 09:53:19 +1100
  • d62483fbd2 Workbases always exists by the time we reach the point we can set the enonce2varlen Con Kolivas 2015-02-13 09:25:42 +1100
  • 03712fe2d7 Broadcast data according to the sdata it belongs to Con Kolivas 2015-02-13 09:13:38 +1100
  • b1f92414c5 Store which sdata each client is bound to Con Kolivas 2015-02-13 09:05:04 +1100
  • e360a9842b Add the workbase to each unique sdata as required Con Kolivas 2015-02-10 21:39:42 +1100
  • ba910251da Choose the sdata to use by subproxy Con Kolivas 2015-02-10 21:34:22 +1100
  • 1f83be877d Send subproxy id when setting proxy at stratifier and set the current proxy to the subproxy instead of the master proxy Con Kolivas 2015-02-10 21:16:38 +1100
  • b77027b09c Create a unique stratifer data structure per subproxy Con Kolivas 2015-02-10 18:22:52 +1100
  • d05db855ff Create infrastructure for a list of subproxies per proxy and generating them Con Kolivas 2015-02-10 16:36:12 +1100
  • 08e47d28cf Give each proxy an enonce1 union and cap the handout of enonce1 values without repeating, assuming we will recruit more proxied connections upstream to compensate Con Kolivas 2015-02-09 21:37:06 +1100
  • e986c04c68 Fix non proxy mode breakage Con Kolivas 2015-02-09 17:38:01 +1100
  • c92cbd6f62 Handle submitting upstream shares properly with subproxies having their own share tables Con Kolivas 2015-02-09 17:37:31 +1100
  • 575ac70de8 Store all notifies in the generator in the parent proxy list and extract the subproxy details from share submission to submit upstream to the right connection Con Kolivas 2015-02-09 17:18:52 +1100
  • 3b40b805bd Store the proxy and subproxy id work is generated from Con Kolivas 2015-02-09 16:55:00 +1100
  • abde70a8d9 Store the id and subid of the proxy in use by each client, submitting the value with its shares to the generator Con Kolivas 2015-02-09 16:27:25 +1100
  • a006dab4ae Do not use master proxy for work, using the first subproxy instance for now, sending the id with it to the stratifier Con Kolivas 2015-02-09 16:15:59 +1100
  • 04d43b3afb Recruit extra subproxies to ensure at least 42 client headroom, receiving data from correct socket in proxyrecv Con Kolivas 2015-02-09 15:45:26 +1100
  • fe4a25f861 Create rudimentary subproxy structures, moving proxy receives to epoll in order to receive from multiple connections upstream Con Kolivas 2015-02-09 15:10:14 +1100
  • 61bcbd98d3 Merge branch 'master' into proxydev Con Kolivas 2015-02-08 19:03:22 +1100
  • 3ed9f9757b Push version to 0.8.6 Con Kolivas 2015-02-08 19:02:23 +1100
  • 163fc40afb Check all delayed clients for a serviceable one in the connector when we can and consider dropping a client servicing one to not potentially create delayed sends faster than we service them Con Kolivas 2015-02-08 13:27:33 +1100
  • 8b1b6d45d6 fd being invalidated is checked for in wait_write_select so we don't need to handle it twice Con Kolivas 2015-02-08 13:02:50 +1100
  • 0e7bc51541 Check all delayed clients for a serviceable one in the connector when we can and consider dropping a client servicing one to not potentially create delayed sends faster than we service them Con Kolivas 2015-02-08 13:27:33 +1100
  • 83208ebc72 fd being invalidated is checked for in wait_write_select so we don't need to handle it twice Con Kolivas 2015-02-08 13:02:50 +1100
  • 1c1cb445ef Don't send subscriptions to the stratifier in passthrough mode Con Kolivas 2015-02-08 10:26:33 +1100
  • b637efa179 Handle other forms of read_socket_line ending after message complete as not a failure Con Kolivas 2015-02-08 10:12:04 +1100
  • 5bff2819da Send notify from each proxy as soon as we receive it Con Kolivas 2015-02-08 09:05:40 +1100
  • 26c890c291 Send the diff from the proxy instance as soon as we get it and differentiate which proxy it comes from Con Kolivas 2015-02-08 09:02:22 +1100