You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Duke Leto 7fc5ff6e07 log what required key is missing 3 years ago
c log what required key is missing 3 years ago
js-backend clean up html index page without changing any functionality 7 years ago
js-emscripten update makefile, clean build dir 7 years ago
pool-emu javascript 7 years ago
.gitignore ignore vim swap files, please 7 years ago
README.md update URLs 3 years ago

README.md

Hush Web Miner

This miner turns 1 CPU + 256MB RAM + 1 browser tab into HUSH cryptocurrency, a zkSNARK coin related to Zcash.

Installation requirements

Perl 5.8 or higher as your system Perl, which just about every operating system has these days. No special CPAN modules are required to be installed, this repo comes with the CPAN module AnyEvent to implement asynchronous I/O.

No apache is required, no mysql, no php is required. Nginx is recommended to proxy requests in high traffic situations.

The server.pl in this repo implements it's own HTTP server, which is why nothing else is needed. It can serve static files and handle WebSocket connections.

Installing

You only need webassembly to compile new .WASM files, if you just want to host a webminer YOU DO NOT NEED the webassembly compiler on your server. Ignore any make or compile steps, just copy the .wasm file to the correct place, directly next to the similarly named .js :

hushwebminer.js hushwebminer.wasm

DO NOT edit the .js file directly, or the .wasm file will not load correctly. They are a pair.

git clone https://git.hush.is/hush/hushwebminer/
cd hushwebminer
cd js-emscripten/ && make  # only if you want to re-compile!!!

TODO: explain this stuff more

  • Install js-emscripten/miner.html and hushminer.js and hushminer.wasm on web server.
  • Install js-backend/ on server as /ws

CPU Javascript miner for HUSH

Reimplementation of xenoncat/Tromp algorithm, just to understand it better by myself. Performs around the same as Tromp's equi1. It's single-threaded on purpose, and uses 256 MB of memory now. The aim was the pure C miner with no dependencies, that works of either little-endian or big-endian platform (ultrasparc speed is so pathetic).

c/ is portable C sources to produce binary for your platform.

js-emscripten/ is a port to emscipten for mining in WebAssembly-compatible browser

js-backend/ is a server-side support for browser mining, allows many sessions (tested up to 30K sessions, many thanks to https://github.com/kosjak1)

pool-emu/ may be handy for debugging your miners.

Code used:

CPU mining Hush from the Command Line

Make sure you compile the binary first:

cd c/
make

How to run binary:

./hushminer -l $POOL -u $TADDR -d 3

Here is a full example specifying a port and using the CPU mining port of the CloudPools.net mining pool:

./hushminer -P 5032 -l hush.cloudpools.net -u t1gztohnPzP2F7dCUonvkoQsMToHA2vVJTb.hushminer -d 2

Additionally a worker name of hushminer was used, which is optional.

The -d command line argument sets your debug level, 3 is good for debugging problems, 1 or 2 for normal operation.

Note that you will need to use a "CPU mining" port of your mining pool, otherwise your miner will be pooled with GPU miners and most likely never earn any shares.