Pages:
Author

Topic: Embedable Javascript Bitcoin miner for your website (Read 149512 times)

newbie
Activity: 18
Merit: 0
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.
hero member
Activity: 740
Merit: 501
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?
sr. member
Activity: 314
Merit: 250
just out of curiosity: Is that jsMiner still available open source somewhere? I mean with network-layer to connect some pool..
hero member
Activity: 630
Merit: 500
Posts: 69
Litecoin coming in where Bitcoin devs seem to be lacking

The first version of the embeddable miner is ready. Smiley
I have written a short guide for webmasters interested in testing:
http://www.litecoinpool.org/embed
full member
Activity: 154
Merit: 101
Bitcoin!
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.
sr. member
Activity: 314
Merit: 251
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. Wink

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

This IS using that "HTML 5 future stuff"  Wink

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.
hero member
Activity: 630
Merit: 500
Posts: 69
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).   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 Smiley
member
Activity: 112
Merit: 10
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
hero member
Activity: 630
Merit: 500
Posts: 69
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 Smiley
member
Activity: 112
Merit: 10
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.
full member
Activity: 174
Merit: 100
Hi..I have an account but maybe I am blind but where do I find the JavaScript to embed in my website?
member
Activity: 112
Merit: 10
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.
hex
newbie
Activity: 45
Merit: 0
member
Activity: 98
Merit: 10
thanks for your work TheSeven! Smiley 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 Sad
Quote
message: upstream RPC error
code: -4
hero member
Activity: 504
Merit: 500
FPGA Mining LLC
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!  Cheesy
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.
member
Activity: 84
Merit: 10
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!  Cheesy
hero member
Activity: 504
Merit: 500
FPGA Mining LLC
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.
member
Activity: 84
Merit: 10
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.
hero member
Activity: 504
Merit: 500
FPGA Mining LLC
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
hero member
Activity: 609
Merit: 500
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.
Pages:
Jump to: