glambeth / zecProxy

Zcash Stratum Proxy
10 stars 6 forks source link

fails on all pools I tried - any hints? #5

Open aleqx opened 7 years ago

aleqx commented 7 years ago

I just installed this according to instructions on a Ubuntu 16.04.2 with all updates to date. I tried flypool, nanopool, suprnova using the EWBF miner ... all fail. Connecting directly to the pools works just fine.

my config.json is

{
        "wallet": "${MY_ZCASH_ADDRESS}.proxy",
        "pool": {
                "host": "eu1-zcash.flypool.org",
                "port": 3333
        }
}

Launched the proxy ... seems to work so far:

# node proxy.js
zecProxy is listening on port 8000
zecProxy connected to eu1-zcash.flypool.org:3333

Then I launched the ewbf miner ... it fails:

# ./miner --server localhost --port 8000 --user ${MY_ZCASH_ADDRESS}.rig1 --pass x --solver 0
+-------------------------------------------------+
|         EWBF's Zcash CUDA miner. 0.3.4b         |
+-------------------------------------------------+
INFO: Current pool: localhost:55555
INFO: Selected pools: 1
INFO: Solver: User defined.
INFO: Devices: All.
INFO: Temperature limit: 90
INFO: Api: Disabled
---------------------------------------------------
INFO: Target: 00083126e978d4fd...
INFO: Detected new work: fb7378cc1589ebcc45a1
ERROR: Stratum authorization timeout

The proxy output says:

# node proxy.js
zecProxy is listening on port 8000
zecProxy connected to eu1-zcash.flypool.org:3333
====================================
miner listener received data{"id":1,"method":"mining.subscribe","params":["EWBF 0.3.4b",null,"localhost","8000"]}
this data has been sent to the mining pool
====================================
====================================
pool socket has received data{"id":1,"result":["0176826716","0176826716"],"error":null}
====================================
====================================
miner listener received data{"id":2,"method":"mining.authorize","params":["${MY_ZCASH_ADDRESS}.rig1","x"]}
this data has been sent to the mining pool
====================================
====================================
pool socket has received data{"id":1,"result":true,"error":null}
====================================
====================================
pool socket has received data{"id":null,"method":"mining.set_target","params":["00083126e978d4fdf3b645a1cac083126e978d4fdf3b645a1cac083126e978d4"]}
sending this to the miners{"id":null,"method":"mining.set_target","params":["00083126e978d4fdf3b645a1cac083126e978d4fdf3b645a1cac083126e978d4"]}
====================================
====================================
pool socket has received data{"id":null,"method":"mining.notify","params":["fb7378cc1589ebcc45a1","04000000","86e62c3a16ffd7425fc06f95ac7f53b782f790128a53f93fe7209f2a00000000","add2f0e4852eebe56de710c31025e81d094f35689a4a415850f0568333363fcc","0000000000000000000000000000000000000000000000000000000000000000","57884559","1187311c",true]}
sending this to the miners{"id":null,"method":"mining.notify","params":["fb7378cc1589ebcc45a1","04000000","86e62c3a16ffd7425fc06f95ac7f53b782f790128a53f93fe7209f2a00000000","add2f0e4852eebe56de710c31025e81d094f35689a4a415850f0568333363fcc","0000000000000000000000000000000000000000000000000000000000000000","57884559","1187311c",true]}
====================================
miner disconnected
removing connection from dictionary

Executing the miner directly works just fine:

./miner --server eu1-zcash.flypool.org --port 3333 --user ${MY_ZCASH_ADDRESS}.rig1 --pass x --solver 0
+-------------------------------------------------+
|         EWBF's Zcash CUDA miner. 0.3.4b         |
+-------------------------------------------------+
INFO: Current pool: eu1-zcash.flypool.org:3333
INFO: Selected pools: 1
INFO: Solver: User defined.
INFO: Devices: All.
INFO: Temperature limit: 90
INFO: Api: Disabled
---------------------------------------------------
INFO: Target: 00083126e978d4fd...
CUDA: Device: 0 GeForce GTX 1080 Ti, 11172 MB i:64
INFO: Detected new work: 1b08648e83e4b652f78b
CUDA: Device: 1 GeForce GTX 1070, 8112 MB i:64
CUDA: Device: 0 User selected solver: 0
CUDA: Device: 1 User selected solver: 0
INFO 20:52:33: GPU0 Accepted share 12ms [A:1, R:0]\
...
aleqx commented 7 years ago

... now if I execute it again I get:

# node proxy.js
zecProxy is listening on port 8000
zecProxy connected to eu1-zcash.flypool.org:3333
undefined:1

^

SyntaxError: Unexpected token
    at Object.parse (native)
    at DestroyableTransform.strict (/root/zecProxy/node_modules/ldjson-stream/index.js:14:26)
    at DestroyableTransform.transform [as _transform] (/root/zecProxy/node_modules/split2/index.js:27:21)
    at DestroyableTransform.Transform._read (/root/zecProxy/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at DestroyableTransform.Transform._write (/root/zecProxy/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/root/zecProxy/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/root/zecProxy/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at DestroyableTransform.Writable.write (/root/zecProxy/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at Socket.ondata (_stream_readable.js:528:20)
    at emitOne (events.js:82:20)

Did the pool ban me? Hmm

aleqx commented 7 years ago

On nanopool with nodejs 4.2.6 I get this:

./miner --server localhost --port 8000 --user ${MY_ZCASH_ADDRESS}.proxy/${MY_EMAIL} --pass x --solver 0
# node proxy.js
zecProxy is listening on port 8000
zecProxy connected to zec-eu1.nanopool.org:6666
====================================
miner listener received data{"id":1,"method":"mining.subscribe","params":["EWBF 0.3.4b",null,"localhost","8000"]}
this data has been sent to the mining pool
====================================
====================================
pool socket has received data{"id":1,"result":[null,"605901000000000070b887d5a58e565f"],"error":null}
====================================
====================================
pool socket has received data{"id":null,"params":["000369d000000000000000000000000000000000000000000000000000000000"],"method":"mining.set_target"}
sending this to the miners{"id":null,"params":["000369d000000000000000000000000000000000000000000000000000000000"],"method":"mining.set_target"}
====================================
====================================
miner listener received data{"id":2,"method":"mining.authorize","params":["${MY_ZCASH_ADDRESS}.proxy/${MY_EMAIL}","x"]}
this data has been sent to the mining pool
====================================
====================================
pool socket has received data{"id":2,"result":true,"error":null}
/root/zecProxy/lib/pool_listener.js:32
                        miners.get(obj.id).write(JSON.stringify(obj) + '\n');
                                          ^

TypeError: Cannot read property 'write' of undefined
    at DestroyableTransform.<anonymous> (/root/zecProxy/lib/pool_listener.js:32:22)
    at emitOne (events.js:77:13)
    at DestroyableTransform.emit (events.js:169:7)
    at DestroyableTransform.<anonymous> (/root/zecProxy/node_modules/readable-stream/lib/_stream_readable.js:786:14)
    at emitNone (events.js:67:13)
    at DestroyableTransform.emit (events.js:166:7)
    at emitReadable_ (/root/zecProxy/node_modules/readable-stream/lib/_stream_readable.js:448:10)
    at emitReadable (/root/zecProxy/node_modules/readable-stream/lib/_stream_readable.js:444:5)
    at readableAddChunk (/root/zecProxy/node_modules/readable-stream/lib/_stream_readable.js:187:9)
    at DestroyableTransform.Readable.push (/root/zecProxy/node_modules/readable-stream/lib/_stream_readable.js:149:10)
aleqx commented 7 years ago

Looking at the code, I have to ask: have you actually used this successfully with multiple miners behind the proxy? The reason I'm asking is that your code sends the same job to all miners for all broadcast jobs from the pool (the mining.notify method) ... isn't that going to create duplicate work for the miners?

BScrk commented 6 years ago

Hi guys, We have same issue (first post) with eu1-zcash.flypool.org Any hint ?

deke997 commented 6 years ago

I have the same issue as the first post with EWBF. nhqminer works fine.

Any ideas?