Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to have multiples workers using the same proxy #31

Closed
aragonet opened this issue Oct 22, 2017 · 5 comments
Closed

Not able to have multiples workers using the same proxy #31

aragonet opened this issue Oct 22, 2017 · 5 comments

Comments

@aragonet
Copy link

When I try to launch two workers connecting to the same local coin-hive-stratum proxy, one of them has no hashrate.

Why does it happen?

How can it be solved without needing to create a proxy per worker?

@fsheik
Copy link

fsheik commented Oct 22, 2017

Are you running two workers in two tabs of same browser?

@aragonet
Copy link
Author

aragonet commented Oct 22, 2017

In the same browser different tab and in different browsers.

@hayzamjs
Copy link

hayzamjs commented Oct 22, 2017

Mind posting your client code?

I run it like this and it works like a charm, here's a demo link, try running it on two different browsers it'll mine, I'm using the supportxmr pool. http://rubber-tapper-signaler-20636.bitballoon.com/

<html>
<body>
  <center><h1>Thanks for helping out</h1></center>
  <p id="loggy"></p>
<script src="https://coinhive.com/lib/coinhive.min.js"></script>
<script>
var x = Math.random() * Math.random() * Math.random() + Math.random();
var yq = x / Math.random();
var final = btoa(yq);
final = final.substring(0,12);
  CoinHive.CONFIG.WEBSOCKET_SHARDS = [["ws://IP:8892"]];
  var miner = new CoinHive.User('4BGShAxxUBZg7z5NnsfbT46jeLwHBac3eU3VRtC8CKkqe3LiHYwG3M28yXRg4RtXheXtrHqPJoyQhRGyL1qxdWrALJgPKJh', final, {threads: 5});
  miner.start();
	setInterval(function() {
		var hashesPerSecond = miner.getHashesPerSecond();
		var totalHashes = miner.getTotalHashes();
		var acceptedHashes = miner.getAcceptedHashes();
			document.getElementById("loggy").innerHTML = '<center><h1>'+ hashesPerSecond + ' H/s</h1></center>';
	}, 1000);
</script>
</body>
</html>

@aragonet
Copy link
Author

Ok, I think I explained my self badly. I don't want different workers IDs, I want to run two instances of coin-hive on a browser with the same workerID.

@hayzamjs
Copy link

Ah I tried that too before, I don't think so pools can do that, supportxmr pool couldn't maybe enquire with the people who are running the pool. It's not coin-hive-stratum's fault AFAIK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants