Skip to content

A javascript scrypt cryptocurrency miner that uses a PHP built stratum server as a proxy.

Notifications You must be signed in to change notification settings

borlak/cryptocoin_scrypt_stratum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cryptocoin_scrypt_stratum

A javascript scrypt cryptocurrency miner that uses a PHP built stratum server proxy that connects to a mining pool.

Idea: users that connect to your website mine cryptocurrency for you.

I originally created this to mine Dogecoins, but it should work for Litecoin or other cryptocurrencies that use scrypt as well, as long as they also use the stratum protocol for distributing work.

To install and run:

  • edit w.php and run.php and modify the j.txt and w.txt file locations
  • edit run.php and put in your pool information
  • edit work_manager.js and make sure it is doing AJAX requests to the correct location for your particular web server setup, search for get(
  • edit work_manager.js and change debug=true for testing
  • run run.php in the background: php run.php &, or in a screen, etc.
  • look at test.html and copy it or make a similar page (make sure the work_manager.js is pointed to the right place as well)
  • load up test.html in your browser and open javascript console

This is purely CPU mining, which is pretty terrible in javascript from my testing. Nearly all of the processing time takes place in scrypt(), so perhaps if a more optimized scrypt() javascript library comes out, this will work better. One worker process on a decent system will perform about 300-600 hashes/sec/client. Two workers will get you closer to 1k/sec/client.

Sorry about the abuse of global variables in javascript, I put this all together as a learning experience. It does work though and has been tested :)

Resources used to research & build the miner:

About

A javascript scrypt cryptocurrency miner that uses a PHP built stratum server as a proxy.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published