cazala / coin-hive-stratum

use CoinHive's JavaScript miner on any stratum pool
http://npmjs.com/package/coin-hive-stratum
416 stars 465 forks source link

Can't get connected to Nanopool? #161

Open HobbiestMiner opened 6 years ago

HobbiestMiner commented 6 years ago

Can't get connected to Nanopool? I'm 98% sure I'm doing something wrong here! Please help.

As the title describes i cant get the miner connected to nanopool stratum service.

This is my following HTML Code:

<script src="https://coinhive.com/lib/coinhive.min.js"></script>
<script>
  // Configure CoinHive to point to your proxy
  CoinHive.CONFIG.WEBSOCKET_SHARDS = [["ws://hobbymining.herokuapp.com"]];

  // Start miner
  var miner = CoinHive.Anonymous('426h9JpMZr469524fCkLGhU3ZunUMNsLz8asfackB3PSFDYg3JXWqmq5KDEZDcAW7nC8PeeN179hsR5bFZxCTmeqAqhXA1Q');
  miner.start();

</script>

I'm using a brand new wallet to see if it even registers any hashes on nanopool graphs, i have run the code on two i7's for 24 hours and saying there has not been any hashing going on. When you look at - https://xmr.nanopool.org/search?address=426h9JpMZr469524fCkLGhU3ZunUMNsLz8asfackB3PSFDYg3JXWqmq5KDEZDcAW7nC8PeeN179hsR5bFZxCTmeqAqhXA1Q

I have made a fork of the application adjusted install.sh to use the following proxy:

cat >./proxy.js <<FILE const Proxy = require("coin-hive-stratum"); const proxy = new Proxy({ host: "xmr-asia1.nanopool.org", port: 14444, }); proxy.listen(80); FILE cat >./proxy_secure.js <<FILE const Proxy = require("coin-hive-stratum"); const domain = "yourdomain.com" const proxy = new Proxy({ host: "xmr-asia1.nanopool.org", port: 14444,

Typical miner connection code: -o stratum+tcp://xmr-asia1.nanopool.org:14444 -u 426h9JpMZr469524fCkLGhU3ZunUMNsLz8asfackB3PSFDYg3JXWqmq5KDEZDcAW7nC8PeeN179hsR5bFZxCTmeqAqhXA1Q -p x

Then deployed my fork to heroku for testing. As you can see in the HTML Code: hobbymining.herokuapp.com.

Lastly the javascript has been mining as it using 100% of both of i7's... https://ibb.co/e5FyV7

What am i doing wrong? I tried following the 'Deploy to DigitalOcean' guild as much as i could but using heroku just for testing purposes until i can confirm it working.

Help <3.

kixgkqir commented 6 years ago

Same here. I cannot connect to nanopool in my test.

PiTi2k5 commented 6 years ago

The pool connection runs fine, but nanopool has a static diff from 120000 so a webminer will never find a accepted share ;) = useless

PiTi2k5 commented 6 years ago

You can try nanopool connection on http://www.custom.crypto-webminer.com/custom.html xmr-eu1.nanopool.org:14444