Bitcoin Forum
April 23, 2024, 04:58:27 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is A Javascript Based Miner At All Possible?  (Read 2564 times)
gigabytecoin (OP)
Sr. Member
****
Offline Offline

Activity: 280
Merit: 252


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?
1713891507
Hero Member
*
Offline Offline

Posts: 1713891507

View Profile Personal Message (Offline)

Ignore
1713891507
Reply with quote  #2

1713891507
Report to moderator
Bitcoin addresses contain a checksum, so it is very unlikely that mistyping an address will cause you to lose money.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713891507
Hero Member
*
Offline Offline

Posts: 1713891507

View Profile Personal Message (Offline)

Ignore
1713891507
Reply with quote  #2

1713891507
Report to moderator
doublec
Legendary
*
Offline Offline

Activity: 1078
Merit: 1005


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 (OP)
Sr. Member
****
Offline Offline

Activity: 280
Merit: 252


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
Merit: 10


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
Merit: 500


View Profile
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
Merit: 10


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: 222
Merit: 100



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 (OP)
Sr. Member
****
Offline Offline

Activity: 280
Merit: 252


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: 560
Merit: 517



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
Newbie
*
Offline Offline

Activity: 49
Merit: 0



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
fpgaminer
Hero Member
*****
Offline Offline

Activity: 560
Merit: 517



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
Newbie
*
Offline Offline

Activity: 49
Merit: 0



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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!