Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any open source solutions for mining bitcoins using WebAssembly?

I'm a little late to the game, but I just learned about Web Assembly and am considering using this to mine bitcoin instead of serving ads (which tend to expose a user's identity/data). I have never mined bitcoin and haven't learned Web Assembly yet, so it would be convenient to have an open source solution for this to begin my learning. Does anyone know of an open-source project for this? (Preferably written in Java or C#)

I did find this: https://github.com/altermarkive/JavaScript-Emscripten-Bitcoin-Miner/blob/master/native/miner.c But honestly, I'm not sure if it's what I need and it doesn't seem to create a web assembly, but a javascript.

like image 502
pcalkins Avatar asked Nov 17 '25 03:11

pcalkins


1 Answers

Contrary to what David Schwartz says, there are a significant number of people that think using WebAssembly to mine cryptocurrency on the web does make sense. A recent study found that 1 in 600 of the top 1,000,000 websites on the internet use WebAssembly. They estimated that approx. 50% of these sites were using it for cryptocurrency mining.

The paper points to CoinHive as the mining software often used for this purpose. It compiles to both WebAssembly and asm.js. However, I would strongly warn against going down this route. Hijacking a user's CPU cycles without consent is widely considered malicious.

Finally, there is anecdotal evidence that ventures of this type don't really make much money.

So - unless you've got an incredibly popular site, and you're willing to ask your users whether it's OK to mine on their hardware, I wouldn't even bother.

(and you're not going to find a Java or C# miner either, they require garbage collection so will be bloated and slow)

like image 58
ColinE Avatar answered Nov 20 '25 07:11

ColinE