Hello everyone.
I am having a problem with GG and cryptonight mining.
On every pool that has variable difficulty, eventually your miner will be assigned a high diff and if GG will not find a share for 90 seconds
it will disconnect, upon reconnect diff will be at whatever starting diff port you have chosen and the whole cycle repeats.
Overall hashing speed takes a hit from all the disconnects.
I think the following code is responsible for the disconnect (gatelessgate.c):
/* The protocol specifies that notify messages should be sent
* every minute so if we fail to receive any for 90 seconds we
* assume the connection has been dropped and treat this pool
* as dead */
if (!sock_full(pool) && (sel_ret = select(pool->sock + 1, &rd, NULL, NULL, &timeout)) < 1) {
applog(LOG_DEBUG, "Stratum select failed on %s with value %d", get_pool_name(pool), sel_ret);
s = NULL;
} else
s = recv_line(pool);
if (!s) {
applog(LOG_NOTICE, "Stratum connection to %s interrupted", get_pool_name(pool));
pool->getfail_occasions++;
total_go++;
And the static initialization of the timeout a few lines above:
timeout.tv_sec = 90;
timeout.tv_usec = 0;
This disconnect does not occur on xmr_stak miners.
A workaround is setting a low enough fixed diff to ensure max share time < 90 sec, unfortunately most pools do not support fixed diff.