Commit Graph

  • 3cfe315b05 Fix locking error and remove entries from jp linked lists Con Kolivas 2014-06-13 17:19:05 +1000
  • 783f527795 Fix initial notify response ckolivas 2014-06-13 16:40:00 +1000
  • 7055f3b5d5 Create separate threads for processing share and authorisation submissions since they will be waiting for dtabase responses Con Kolivas 2014-06-13 15:18:30 +1000
  • 0ed07950e2 Create the basic authorise request keys we'll send to the database Con Kolivas 2014-06-12 23:52:10 +1000
  • 4907824168 id_val should be a duplicated json object Con Kolivas 2014-06-12 23:12:52 +1000
  • fa8b0b0b6f Unnecessary sleep now Con Kolivas 2014-06-12 23:05:48 +1000
  • badfb12da2 Do not try to send messages from the main signal handler to the children processes since they'll detect main disappearing and do not try to pthread join a dead thread Con Kolivas 2014-06-12 22:14:52 +1000
  • 221825782b Check for a dead main process in the generator loop Con Kolivas 2014-06-12 21:54:44 +1000
  • 8d4ac5fe55 Include more relevant information in the workinfo we'll be sending to ckdb Con Kolivas 2014-06-12 21:46:52 +1000
  • 5a8e63e7a4 Simplify createdate time to secs,nsecs Con Kolivas 2014-06-12 18:19:08 +1000
  • 1c452dcf5b Use stackspace for the createdate hex string Con Kolivas 2014-06-12 15:08:36 +1000
  • 1007e20035 Create a json string based on parameters we'll be sending to the database on every work update to be submitted once it's hooked in Con Kolivas 2014-06-12 15:01:14 +1000
  • 82cd47ceaa Store workbase generation time as a ts_t Con Kolivas 2014-06-12 14:10:25 +1000
  • 2b64025b4d Split our generated coinbase1 into gbt supplied and our own generated substrings and add nanoseconds to it to make each coinbase1 likely unique for multiple pool instances Con Kolivas 2014-06-12 14:04:14 +1000
  • 68eff4d6a1 Don't unlink the unix sockets to make it easier for processes to determine they are not being listened on Con Kolivas 2014-06-10 23:09:56 +1000
  • ca805e44f0 Provide a getfd function for getting the main connector file descriptor for seamless restarts Con Kolivas 2014-06-10 22:56:57 +1000
  • 6c4abba93c Provide a way to send binary data over unix sockets Con Kolivas 2014-06-10 22:06:37 +1000
  • 20e056c4a1 Close sock in connector loop after we've finished using it Con Kolivas 2014-06-10 21:38:50 +1000
  • 4ae647b1dd Empty the buffer on empty socket Con Kolivas 2014-06-10 21:32:32 +1000
  • 63ccad9105 Remove interrupted retry in connector Con Kolivas 2014-06-10 20:56:12 +1000
  • 76921ce29f Fix end of message parsing logic fail Con Kolivas 2014-06-10 16:59:41 +1000
  • a9c4c1690d Allow select to modify the timeout instead of it being reset on each pass through the read loop Con Kolivas 2014-06-10 16:30:40 +1000
  • dbffb29300 Append the null byte to the buffer before searching for the end of message marker Con Kolivas 2014-06-10 16:01:35 +1000
  • cc358038dd Don't allocate extra memory in case it generates a false end of message marker Con Kolivas 2014-06-10 02:56:30 +1000
  • a25dc8ab50 Don't toss out the buffer in read_socket_line if we just timed out Con Kolivas 2014-06-10 01:29:50 +1000
  • 655be56b3d Don't reuse buffer pointer directly in read_socket_line Con Kolivas 2014-06-10 01:25:48 +1000
  • 454d3aec0e Break out of trying for a live proxy if main is dead Con Kolivas 2014-06-10 00:54:00 +1000
  • 91b3f2b1d9 memset the json err variable before use Con Kolivas 2014-06-10 00:45:12 +1000
  • 75f330d468 Rework read_socket_line to keep reading while data is available Con Kolivas 2014-06-09 22:42:35 +1000
  • 98aec22e09 Close clean shut down sockets in read_socket_line and invalidate the fd Con Kolivas 2014-06-09 21:16:45 +1000
  • b57ffe23d6 Use one buffer for connsok line receives without relying on MSG_PEEK and abort appropriately when recv() returns 0 Con Kolivas 2014-06-09 20:04:13 +1000
  • 6a3a333031 connsock_t is a ckpool only struct Con Kolivas 2014-06-09 14:38:56 +1000
  • 942bbe2e6c Fix max sized coinbase that leads to stack corruption with large coinbase2 Con Kolivas 2014-06-09 14:09:43 +1000
  • cad9282c22 Avoid one htobe conversion using hex2bin Con Kolivas 2014-06-09 13:00:26 +1000
  • 19c31ad0c3 Fix inappropriate json object stealing Con Kolivas 2014-06-09 12:40:10 +1000
  • 352792758c Send SIGTERM to the parent process on a failure to send a message to a sub process Con Kolivas 2014-06-09 12:21:10 +1000
  • 007afe7ac8 Cancel and join proxy send and receive threads on shutdown to avoid deref after removing their memory Con Kolivas 2014-06-09 12:02:03 +1000
  • f62e344ff8 Add a sanity check for tdiffs to prevent negative values Con Kolivas 2014-06-09 00:24:53 +1000
  • 0623410889 Ping main on looking for the generator response in the stratifier to know if we've died before ever starting Con Kolivas 2014-06-08 16:33:16 +1000
  • 251ac7e7fe Be more generous with socket connect timeouts Con Kolivas 2014-06-06 09:44:09 +1000
  • aa70f0db5e Default unspecified port for proxy to 3334 Con Kolivas 2014-06-06 09:39:18 +1000
  • 7eb4e018b6 Allow arbitrary length coinbase2 for proxying to work properly Con Kolivas 2014-06-06 00:26:58 +1000
  • 93735544ca Add debugging to hex2bin to know where it failed from Con Kolivas 2014-06-06 00:11:07 +1000
  • 4121560bad Use MSG_WAITALL on reads to more reliably detect closed unix sockets Con Kolivas 2014-06-04 21:14:20 +1000
  • b297a35632 Remove unused buffer ram in send_client and demote messages to info level only Con Kolivas 2014-06-04 19:59:23 +1000
  • d66fde2185 Make the main listener socket always return a response and create a message input/sending loop in ckpmsg Con Kolivas 2014-06-03 23:27:02 +1000
  • b77e481c7e Use a weak logmsg function within libckpool allowing it to be included standalone without touching ckpool code Con Kolivas 2014-06-03 21:17:41 +1000
  • bc78acceca Move the functions that require ckpool specific variable types out of libckpool Con Kolivas 2014-06-03 20:36:40 +1000
  • ed341c9502 Create the beginnings of a separate tool to talk to ckpool sockets Con Kolivas 2014-06-03 14:55:30 +1000
  • 86e70edfbc Make all child processes ping the parent process at regular intervals and then die if it has disappeared. Do not attempt to send unix messages to dead processes and abort instantly on socket EINTR Con Kolivas 2014-06-03 14:04:09 +1000
  • 10a4b36f31 Make displayed stats based on round shares Con Kolivas 2014-05-30 10:15:11 +1000
  • d8b023350f Don't remove the ram from dead client instances to prevent a dereference Con Kolivas 2014-05-30 09:07:48 +1000
  • c4f0d57ae8 Fix various memory leaks Con Kolivas 2014-05-27 22:53:17 +1000
  • 8073936b46 Check for incorrect return value on asprintf Con Kolivas 2014-05-27 21:46:04 +1000
  • 164745af2e Clean up unnecessary jansson build components Con Kolivas 2014-05-27 20:21:56 +1000
  • d90b4ffddd Check return value of asprintf Con Kolivas 2014-05-27 20:12:19 +1000
  • 77f09c2858 Use local jansson in build Con Kolivas 2014-05-27 19:52:28 +1000
  • 74db5bcfb8 Import jansson 2.6 locally Con Kolivas 2014-05-27 19:16:06 +1000
  • 56d6649646 Fix jobid being wrong on proxy reconnect Con Kolivas 2014-05-27 18:19:09 +1000
  • bfec616da3 Create new proxy entries on the fly with the client reconnect command and switch to it Con Kolivas 2014-05-27 17:28:58 +1000
  • 601fb8cb34 Fix off-by-one error Con Kolivas 2014-05-26 22:47:58 +1000
  • d4e6668865 Fix minor uninitialised ram and leak issues Con Kolivas 2014-05-26 22:43:41 +1000
  • 3931e7bee9 Avoid realloc being required in send_json_msg Con Kolivas 2014-05-26 18:54:56 +1000
  • a3a586ee6e Use the retry on EINTR only on unix sockets Con Kolivas 2014-05-26 18:42:55 +1000
  • 306392950f Zero the read buffer fully in read_socket_line and handle closed sockets gracefully Con Kolivas 2014-05-26 18:31:32 +1000
  • 67fefd2675 Fall over to another bitcoind if any of our calls fail Con Kolivas 2014-05-26 17:34:29 +1000
  • 0b4c6c7821 Make the gbtbase data the private data per server instance Con Kolivas 2014-05-26 17:09:16 +1000
  • e959ba39a4 Iterate over the configured btcds, finding the first working one; failover to be added later Con Kolivas 2014-05-26 16:57:36 +1000
  • 82fe18554f Add total shares from each user to pool accounted diff shares Con Kolivas 2014-05-24 21:30:35 +1000
  • ca176c8e1d Fall over to the first working stratum proxy whenever we are disconnected Con Kolivas 2014-05-24 17:09:15 +1000
  • 3c70130ae2 Only show user share summary on block solve if they had any Con Kolivas 2014-05-24 15:25:07 +1000
  • 9b95920ab5 Remove redundant comment and there is no point capping shares to 5xdiff Con Kolivas 2014-05-24 14:30:51 +1000
  • d1e0072efd Load user stats on startup to ensure we don't miss clients that don't reconnect on a pool restart Con Kolivas 2014-05-24 13:34:22 +1000
  • 40807602c9 Fix macro variable name clashing and crash on logging prior to logfile being set Con Kolivas 2014-05-24 10:18:51 +1000
  • 7fabe1f14f With sigpipe masked, interrupted send calls are likely fatal Con Kolivas 2014-05-24 00:27:52 +1000
  • 01d5b71bef Broadcast to miners a message when the pool has solved a block Con Kolivas 2014-05-23 15:10:20 +1000
  • b4e6aef470 Log all output to a logfile, display all warnings, and use locking to prevent overlapped messages Con Kolivas 2014-05-23 12:56:24 +1000
  • f48558d2b5 Detach child processes from the tty leaving only the main process to talk to it and exit all processes in a consistent way with more information on termination Con Kolivas 2014-05-23 10:05:22 +1000
  • ed270c92fc PPLNS window should just be network diff ckolivas 2014-05-22 11:08:01 +1000
  • 2358d03037 Add pplns shares from reconnected users to the pool's total ckolivas 2014-05-22 10:33:10 +1000
  • d19a682d92 Set the maximum pplns window to 5xdiff ckolivas 2014-05-22 10:26:52 +1000
  • d86b6833ef Retain a proportion of shares across block solves when total shares is greater than the 1/5th window ckolivas 2014-05-22 10:11:55 +1000
  • 8e099c8dd1 Make the pplns window 1/5 of difficulty Con Kolivas 2014-05-22 00:17:06 +1000
  • 3102379119 Limit client diff drops to halving to prevent idle periods invalidating the calculations Con Kolivas 2014-05-22 00:08:30 +1000
  • 305165914d Display a rudimentary pplns summary on solving a block to calculate payouts Con Kolivas 2014-05-21 23:43:33 +1000
  • 1624aaa897 Display the pplns shares per worker and store it in the temporary logs Con Kolivas 2014-05-21 23:02:53 +1000
  • ce028d0485 Load the saved pplns shares on beginning a new user instance Con Kolivas 2014-05-21 22:57:33 +1000
  • f3c899e09b Store a rudimentary summary of pplns shares up to the current network diff in a logfile per user Con Kolivas 2014-05-21 22:50:00 +1000
  • 24643e9ba0 Get the network difficulty from the block header and use that to determine possible block solves in proxy mode Con Kolivas 2014-05-21 22:28:03 +1000
  • ed8f73a426 Unix message failures are almost always fatal so add debugging about where the functions were called from Con Kolivas 2014-05-21 21:25:28 +1000
  • e5953833a5 Don't show block hash in logs when accepted Con Kolivas 2014-05-21 07:21:35 +1000
  • 0471340fdd Update notify when we have a new subscription and gracefully drop connections from the send process to be detected rapidly in the recv thread Con Kolivas 2014-05-20 18:10:15 +1000
  • a50bb29d21 Free up old data in place if we are re-subscribing Con Kolivas 2014-05-20 17:35:21 +1000
  • 9983c96ca0 Fix uninitialised variable Con Kolivas 2014-05-20 16:26:47 +1000
  • 740edcc80c Revert "Do not hand out enonce1 to new clients when no notify data exists" Con Kolivas 2014-05-20 16:19:15 +1000
  • 5b7af2f7ff Avoid accessing notify instances outside of the notify lock and avoid leaking memory when we can't match the msgid in proxy_send Con Kolivas 2014-05-20 15:44:51 +1000
  • c9f550207f Send one on all process failure codes Con Kolivas 2014-05-20 15:29:53 +1000
  • cc791f0b67 Do not hand out enonce1 to new clients when no notify data exists Con Kolivas 2014-05-20 15:11:14 +1000
  • 923a4abe59 Don't bother sending the listener the shutdown message since the signal handler will kill off the main thread Con Kolivas 2014-05-20 14:52:58 +1000
  • da435ac22b Handle process exiting in the watchdog by shutting down Con Kolivas 2014-05-20 12:46:45 +1000