Open 49handyman opened 2 years ago
Moved over to another machine and reinstalled everything and used same configs.
at least its trying to connect. I need some debug info though to get it figured out.
I use a heavily modified version of knomp, its poolworker.js uses the following (should be original code):
var authorizeFN = function(ip, port, workerName, password, callback) {
handlers.auth(port, workerName, password, function(authorized) {
var authString = authorized ? 'Authorized' : 'Unauthorized ';
logger.debug('AUTH>TRUE> authstr '+ authString +' ip '+ functions.anonymizeIP(ip));
callback({
error: null,
authorized: authorized,
disconnect: false
});
});
};
and in node stratum.js
function handleAuthorize(message) {
_this.workerName = getSafeWorkerString(message.params[0]);
_this.workerPass = getSafeString(message.params[1]);
var addr = _this.workerName.split(".")[0];
options.authorizeFn(_this.remoteAddress, options.socket.localPort, addr, _this.workerPass, function(result) {
_this.authorized = (!result.error && result.authorized);
sendJson({
id : message.id,
result : _this.authorized,
error : result.error
});
// If the authorizer wants us to close the socket lets do it.
if (result.disconnect === true) {
options.socket.destroy();
}
});
}
On yours i see this:
// Establish New Stratum Client
socket.setKeepAlive(true);
const subscriptionId = uuid.v4();
const client = new Client(_this.config, socket, subscriptionId, authorizeFn);
_this.clients[subscriptionId] = client;
_this.emit('client.connected', client);
and in client.js
here is the dump with bad request
23:48:47.817722 IP 192.168.2.231.3040 > 76.92.241.147.50896: Flags [F.], seq 48, ack 101, win 64, options [nop,nop,TS val 235530851 ecr 34182393], length 0
E..4..@.@..q....L\.........;..[....@.......
. .c. ..
23:48:47.820687 IP 76.92.241.147.42482 > 192.168.2.231.3040: Flags [.], ack 1, win 913, options [nop,nop,TS val 34182399 ecr 235530805], length 0
E..4x.@.1..5L\..............F
......U......
. ... .5
23:48:47.820687 IP 76.92.241.147.42482 > 192.168.2.231.3040: Flags [P.], seq 1:102, ack 1, win 913, options [nop,nop,TS val 34182399 ecr 235530805], length 101
E...x.@.1...L\..............F
.............
. ... .5{"id":1255, "method":"mining.subscribe", "params":["cgminer/4.9.0", null, "136.37.103.232", "3040"]}
23:48:47.820769 IP 192.168.2.231.3040 > 76.92.241.147.42482: Flags [.], ack 102, win 64, options [nop,nop,TS val 235530854 ecr 34182399], length 0
E..4..@.@.+r....L\......F
.....]...@.......
. .f. ..
23:48:47.821861 IP 192.168.2.231.3040 > 76.92.241.147.42482: Flags [P.], seq 1:48, ack 102, win 64, options [nop,nop,TS val 235530856 ecr 34182399], length 47
E..c..@.@.+B....L\......F
.....]...@.......
. .h. ..HTTP/1.1 400 Bad Request
Connection: close
So far I cant get z15 miners to connect. I have the modified config and zcash.js files setup I think properly.
Has it been tested on Pirate-Chain at all?
Do you have any more detailed logging than "debug", not sure if im connecting to node wallet.
Let me know if you have any ideas for me to try or fix.
btw, stratum-ping seems to work fine.
Miners just keep trying to connect withour success.
Tcpdump