Bitcoin Forum
December 07, 2016, 08:33:07 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Is A Javascript Based Miner At All Possible?  (Read 2296 times)
gigabytecoin
Sr. Member
****
Offline Offline

Activity: 280


View Profile
March 24, 2011, 04:19:26 AM
 #1

Check this out: http://www.webtoolkit.info/javascript-sha256.html

Apparantly you can create sha256 hashes through javascript in your browser.

So, can you mine with it?

Maybe with some node.js on the server?
1481142787
Hero Member
*
Offline Offline

Posts: 1481142787

View Profile Personal Message (Offline)

Ignore
1481142787
Reply with quote  #2

1481142787
Report to moderator
1481142787
Hero Member
*
Offline Offline

Posts: 1481142787

View Profile Personal Message (Offline)

Ignore
1481142787
Reply with quote  #2

1481142787
Report to moderator
1481142787
Hero Member
*
Offline Offline

Posts: 1481142787

View Profile Personal Message (Offline)

Ignore
1481142787
Reply with quote  #2

1481142787
Report to moderator
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481142787
Hero Member
*
Offline Offline

Posts: 1481142787

View Profile Personal Message (Offline)

Ignore
1481142787
Reply with quote  #2

1481142787
Report to moderator
doublec
Legendary
*
Offline Offline

Activity: 1078


View Profile
March 24, 2011, 04:29:06 AM
 #2

It'll be more interesting when WebCL becomes available in browsers:

http://www.conceivablytech.com/5978/products/webcl-to-enablegpu-accelerated-web-apps
gigabytecoin
Sr. Member
****
Offline Offline

Activity: 280


View Profile
March 26, 2011, 08:45:22 PM
 #3

It'll be more interesting when WebCL becomes available in browsers:

http://www.conceivablytech.com/5978/products/webcl-to-enablegpu-accelerated-web-apps

Whoaaaaa nelly, thanks for the link.
snedie
Member
**
Offline Offline

Activity: 112


View Profile
March 29, 2011, 11:46:19 PM
 #4

Isn't this what ATI is designing for their new 6000 series architecture?

I would link to the youtube videos but the "Subcription" feature is getting updates right now so I cant access their channel, however here is a caveat to look at: http://blogs.amd.com/developer/2010/09/15/hardware-accelerated-web-with-amd-and-internet-explorer-9-beta/
ryepdx
Hero Member
*****
Offline Offline

Activity: 714



View Profile WWW
March 31, 2011, 09:25:29 PM
 #5

Slush made a Javascript miner a while ago. Never released it as he made it for his own test purposes. But here's the thread:
http://bitcointalk.org/index.php?topic=1925.msg24236#msg24236
randomproof
Member
**
Offline Offline

Activity: 61


View Profile
April 04, 2011, 05:18:25 PM
 #6

Most browsers have a limit for how long a script can run when you load a page.  I think about 30 seconds.

Donations to me:   19599Y3PTRF1mNdzVjQzePr67ttMiBG5LS
bittersweet
Full Member
***
Offline Offline

Activity: 224



View Profile
April 04, 2011, 05:51:12 PM
 #7

The limit doesn't matter unless a single mining operation (hashing I suppose?) would take longer. You can just make the mining function call itself in some time intervals.

My Bitcoin address: 1DjTsAYP3xR4ymcTUKNuFa5aHt42q2VgSg
gigabytecoin
Sr. Member
****
Offline Offline

Activity: 280


View Profile
April 05, 2011, 05:55:05 AM
 #8

Slush made a Javascript miner a while ago. Never released it as he made it for his own test purposes. But here's the thread:
http://bitcointalk.org/index.php?topic=1925.msg24236#msg24236

Thanks for that, I have just PM'ed him for the basic code. Just want a basic understanding of how a bitcoin is generated, and I believe javascript could show this in the simplest format.
fpgaminer
Hero Member
*****
Offline Offline

Activity: 546



View Profile WWW
April 07, 2011, 06:04:40 AM
 #9

I took a break from my FPGA miner to throw together a JavaScript miner, mostly for educational purposes. It's on GitHub:
Bitcoin-JavaScript-Miner

If you upload it to a server, it functions. My system gets about 8khash/s, which is just cute  Tongue but that's actually a bit more than I expected.
It hasn't been tested for accuracy, so for all I know there's a bunch of bugs in the hashing code.
It doesn't do a real getwork, nor does it submit work (if it ever actually finds a share ...)

But I commented the code, and tried to make it as clear as possible. The real grunt work is in miner.js, so look there if you want to know how Bitcoins are mined.
work-manager.js is where miner.js is called from. Since a real getwork isn't actually used, there isn't much to see there. Normally it would talk to a mining pool server, and do a "getwork" request, which gives you the information you need to execute the code in miner.js. Once a valid hash is found, that would be returned to the mining pool server.


Enjoy! If I have the motivation and time I'll see what I can do to A) make sure it's bug free, and B) make it work with an actual mining pool ... just for giggles.

Comepradz
Jr. Member
*
Offline Offline

Activity: 49



View Profile
May 07, 2011, 01:09:16 AM
 #10

Hey fpgaminer, I just tested your javascript miner and it didn't work at all, I mean it didn't return any hash/s value. I try to manually execute 'begin_mining()' with console in Google Chrome's developer tool and got this:

Quote
begin_mining()
Error: SECURITY_ERR: DOM Exception 18

I'm no good programmer, so I don't know what exactly it means. Do you have any ideas about this issue? Thanks Smiley

This signature contains 37 characters
fpgaminer
Hero Member
*****
Offline Offline

Activity: 546



View Profile WWW
May 07, 2011, 04:39:07 AM
 #11

Hmm ... did you run it locally or on a server? It might need to be run on an actual webserver, but I don't remember for sure. Google Chrome in particular gets cranky when JavaScript is run off the filesystem.

Comepradz
Jr. Member
*
Offline Offline

Activity: 49



View Profile
May 07, 2011, 12:07:18 PM
 #12

I ran it locally, and yea it works after I place it on webserver. thanks a lot.

This signature contains 37 characters
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!