support for NanoPool.com
Closed this issue · 3 comments
while i was testing the script i found that it does not support for nanoPool.org
i try to debug what is wrong and i found that it expect different Json response for Job work
i wonder if we can Map the NanoPool response into the proxy
i see that the script need json as follow
{
"id": 1,
"jsonrpc": "2.0",
"error": null,
"result": {
"id": "e3f4aa2e-be71-4bcf-b494-6851094074ed",
"job": {
"blocktemplate_blob": "0707a5f2e4d805f55bb1cd246d738e6c7e8a13137614b77b139a2c50e2e4b9196ba35fcff264700000000002a9856101ffed8461019ea5dac29f820102d103d3801c359ec0116a9184c9502f7a263dd14f7569579e5e339b28646eac1c3401f55c8a7a5d1498dc94a965633a8f0bf5682d13b57683ba09eca1af68bac948f202110000017d1098a7a30000000000000000000003abb53f348ab587f2b96878c03b8ad91239d1899764a08fe1da37276ba8e22e607c7cfa49cb158704c6f9d7c51cbe4a7921c67df32abb85d89a99f10616485bbdbb0d99f3c9115e1aa5b1ad7d125e46c82f0ee30bb25375b2671ff575fcd9f8ff",
"difficulty": 52802191848,
"height": 1589869,
"reserved_offset": 129,
"client_nonce_offset": 141,
"client_pool_offset": 137,
"target_diff": 5000,
"job_id": "2Kt1kqixGUY6M46Cy2DU85H0q3Hk",
"id": "e3f4aa2e-be71-4bcf-b494-6851094074ed"
},
"status": "OK"
}
}
Nano Pool return this
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1",
"job": {
"blob": "0707cff3e4d8059b650f9f8ef83c48f99c884d0c7b8fb4ba488ca44868889ff26a25d2ac5904f800000000866d611797691fb65b4a5ac8832403d261a471d3cb86b285d858f1fb427e7f8b03",
"job_id": "7728",
"target": "cf8b0000"
},
"status": "OK"
},
"error": null
}
now the idea is can we use the same script for any pool ?
i have added try and catch Block to capture any error around line
File: proxy.js around line 770
pool.activeBlocktemplate = new pool.coinFuncs.MasterBlockTemplate(blockTemplate);
to prevent the script from creaching
but still not working
Unfortunately xmr-node-proxy requires pool support that is currently provided only by nodejs-pools: https://github.com/Snipa22/nodejs-pool
Hummm so nodejs-pool is the one convert between Block Template and xmr-node-proxy
More precisely it provides enough data for xmr-node-proxy to be able to work.