Wow!
First off, to everyone who registered and/or replied to this thread. Thank you all. I never imagined there would be this much interest in this. Your feedback, all of it, is great. This is really helping us find ways to make this even better.
I see one BIG flaw on this system... google its gona kill you.
They gona mark the web page as a "malware".
You could easily hide it from bots with a few lines of PHP.
I am a little confused on what the concern is. AFAIK, Google, et al, do not execute Javascript when they visit your website. Am I missing something?
This is really powerful.
A question: is the mining task correctly prioritized not to annoy the user (lower priority than anything else)?
The CPU going to 100% won't be a problem if the user continues to be able to use his computer normally. But if the mining process has the same priority as other user processes, that might piss him off, with reason.
I don't even know if you can set priorities in javascript like that.
Javascript cannot explicitly set thread prioritization, the browser is left taking care of that. From my testing, it would appear that all the major browsers do set thread priority to "nice". Read my replies below though, because this seems to be a shared concern, and I think I know how we can help limit the CPU utilization if you so desired.
This is freakingly awesome idea!
It surely will help to
better distribute the overall hashing power, thus making the bitcoin network even more resilient.
I'm not sure the client will be very happy to see his computer burning CPU for no apparent reason, though.
But indeed it is probably better than annoying ads. Again: awesome idea.
Not quite...
Google could place this on their website and gain 50%+ hashing power of the network overnight.
EDIT: Then again, maybe not...
According to my calculations....
One $100 5830 can do 300,000,000 hashes per second if tweaked correctly.
Divided by an average of 10,000 hashes per second for an average cpu running this javascript miner = 30,000 concurrent visitors to your website to equal the hashing power of a 5830 - and whenever users hit your website, their CPUs would start burning up... so they would probably leave within let's say 2 minutes of visiting your web page.
So multiply 30,000 concurrent required visitors by the number of 2 minute intervals in the day... (24 * 60 / 2 = 720)
And you come to a total of
21,600,000 unique visitors per day that you would need to your website in order to hash the equivalent of a
$100 GPU.
Or make about $8 per day according to the bitcoin calculator right now from 21 million unique visitors.... totally not worth it.
Phew, now I feel better about my mining investments!
Don't get me wrong OP, I love it when
anybody contributes
anything to the bitcoin network, I am just thinking out loud.
Thanks, I appreciate the feedback. You are right, this is not ever going to compete with a GPU miner. The basic idea is that you, the website operator, have all these visitors. Right now many websites place banner ads on their site to try and make revenue. Banner ads are less than ideal in that they require the visitor to do something (assuming PPC, not PPV) for you to make revenue. This, however, is entirely non-volontary on the site visitor's behalve. They *have* to mine bitcoins for you if they are using your site. There was mention in a previous reply about turning this off for registered users, or other sub-sections of your website base, and I think thats an awesome idea too.
Where this Javascript miner really shines is in it hash/sec per watt
I do think you have a valid point about not wanting to run people off with a high CPU usage, so did a few others. For now, just use the
forceUIThread: true setting to make the worker process more CPU friendly. This will reduce your hashing rate, but will make it more friendly for your website visitors if you choose. Today I will also look into making more of a "nice" setting where you could set the niceness with better precession... of course this would be implemented in a work-pause-work, and not actually setting the thread priority level... but, I do believe the browsers already have their threads set to nice... so this would only be reducing the CPU load, which is what I believe you (all) are looking for as an option. I agree, I think that'd be a good setting to have.
As far as GPUs, I'm glad I bought mine as well. I do not think they'll be going anywhere anytime soon.
Just awesome. An easy way to use my work computer as a bitcoin generator. I can even leave it on 24/7 if the cleaning lady doesn't turn it off
.
Any easy way for me to display my hashes/s in the little HTML file i made?
Also: When running one instance i get 50% CPU, with two 100% CPU. Does this matter in the sense that i might be doing double work or?
Which browser gave you 100%? Of the browsers I tested, they generally fall into two categories... those that support HTML 5 web workers, and those that do not. Only the ones that support web workers should be running the CPU at any noticeable percent (maybe I'm wrong, I'll test more)... but the ones with web workers support will max out 1 core.
So, in the 50% case, I assume that means you have a dual-core machine?
In the 100% case.... I am stumped. Unless you only had 1 core, or had this open in multiple tabs, I do not know how that would have happened. Let me know what browser and OS, and I'll look into it.