I’ve made concept javascript ZEC miner, that works around ten times slower then native CPU miner, let’s say 0.1 Sol/s on average machine.
It’s build with emscripten and powered by asm.js (“use asm”), working more or less fine in Firefox, but requires manual setting of #enable-asm-webassembly and #enable-webassembly flags in fresh Chrome. It uses the same memory size as native. It could communicate thru websocket with proxy module on your side, verifying solutions and sending them to one of the pools under your credentials.
If you can attract 1000 users mining simultaneously for you, for example while sitting on your site and running it knowingly or implicitly, you can get up to $50 per month with current net hashrate and market prices.
Now I wonder should I publish it, or all hell will break loose with new generation of ads and spam in web?
This is something I’ve always planned to do for Cuckoo Cycle, but have been putting off until I can get 64-bit support, which is crucial for decent performance, and planned for future versions of web assembly.
Did you have to implement blake2b yourself? Any idea what percentage of your runtime is taken up by the blake2b computations?
It definitely should be done for Cuckoo too, together with new coin for it etc.
There is no 64 bit neither in asm.js nor in webassembly, which is really pity. BLAKE2b is indeed painfully slow and takes presumably 3/4 of all time. I’ve used reference implementation with _compress optimized for second update of zcash block (all zeroes except the number of hash, assuming all nonce will live in first part of powheader, and with less movement of bytes after calculation), but it improves only by 20%.
More precise: 10 nonces that gives 20 solutions are calculated in 139 seconds, and if I calculate only digit0 (without following steps 1…WK) it takes 120 secods, so BLAKE2b takes more than 80% of all time.
There are simmilar projects for bitcoins.
People could try to use it as an alternative to ads. And if the guest is shown a message somewhere like: “You are mining xxx coins to support this site” and has the possibility to stop it I would think its alright.
I guess if you have 1000 simultaneous visitors on average on your site (that in fact is a lot), you could do much more then $50/month with ads. So unless some WebGL gives any practical boost, this picture does not look good for me.
I agree, i would like to use this, I’m an IT Tech so i’ve got access to 600 machines but i can’t install software on them so a browser would be perfect to run every night. I had a look but i don’t exactly understand how to use it has i can run it but unsure where i put my wallet information etc
Thank you! Can you write some real life solution to connect this script to your pool? Could this full circle be done using just web tech js clientside/php server side? I build websites so I would use it…
I advise you to try something new, there are many javascript miners on web. I Preferably use coinimp than coinhive simply because coinimp has a more powerful solution that enables you to mine at 0% of your total hash rate. The more the number of users the more hashes you attain!