janfiedler / mineiota

IOTA Faucet - Get IOTA through mining Monero and PIVX staking pool
52 stars 25 forks source link

Add ability to use a console miner and be able to mine on different pool #76

Open term2112 opened 6 years ago

term2112 commented 6 years ago

It would be much more efficient to be able to use a console miner instead of web-miner. It would also be possible to run with coinhive and a traditional pool like xmr nanopool. The setup could include the main wallet for xmr and the worker name would be our iota addresses. Not sure if it is possible to modify the algorithm to keep track of each worker and how much to pay them.

janfiedler commented 6 years ago

Hi, thanks for your message. I am already working on it. It will use xmr proxy, need make few changes. But first I need finish headless webminer (until this week), next finish few steps with staking pool and then on my todo list is finish cpu/gpu mining with native client.

I am happy to see, somebody is already interested about this function :) So please stay tuned, coming soon.

term2112 commented 6 years ago

I was actually looking at this and attempted to use a proxy to test this on a website with it failing. I was getting a low difficulty share error which I did see on this website a while ago which I am guessing is you trying to test a proxy server on this. The issue is when they upgraded the monero mining algorithm to version 7, it caused the proxy software to stop working which causes the invalid shares. The solution to this is to use a different webminer.

I have actually found a working website that uses this, https://www.monero.crypto-webminer.com/monero.html I Have tested this already and it seems to be submitting valid shares and you are also able to integrate it as an html script. I did not notice any difference in hash-rate between this and coinhive. They only take a 1% fee while coinhive takes 30%. This miner automatically uses the support xmr pool which has a 0.6% fee. 1.6% is a lot better than 30%.

The good thing about using this new webminer is that it would also make it easier for you to be able to integrate console miners into the website allowing people to mine much more efficiently. With me, I can get 34 h/s with the webminer and 130 h/s with the console miner.

term2112 commented 6 years ago

The thing is that JavaScript is extremely confusing to me and is preventing me from making my own websites. I know c++ and how everything works for it. JavaScript is just extremely confusing.

janfiedler commented 6 years ago

Who have webminer with only 1% fee? But webminer is good only for those who want few iota for testing.

There is lot of big miners on mineiota and I am writing xmr proxy pool, where you can mine with arm processors and better. It is more complex than already existing proxy or pool applications, because of exchanging to another coin. So for get fees to 1% with pool fee included, all rewards must be exchange in one time. So no when user want, but when pool reach target for example 1 xmr, it will ne exhanges for iota and send to all miners by they shares from mining hashes. Making possible withdraw any time get fees to high. This is why coinhive have to high fees. it is expensive cover diff and price moves.

term2112 commented 6 years ago

image I was thinking of something similar to this. I do understand the need for fees to cover the market changes and cost difference. The reason the fee for the miner is so low is that they are not using their own pool, the hashpower is applied to a standard pool. The one percent fee is taken for using their software. The pool used is also customizable and allows you to choose whichever one works best.

janfiedler commented 6 years ago

Nice graphic, I cannot find webminer with direct connect to stratum pool. For now I already tried: https://github.com/cazala/coin-hive-stratum for connecting coinhive webminer. This app must be connected to xmr proxy, because pools banned all miners with lot of warkers with low diff. I have already done this. But problem is as you wrote in previsous comment. Pool return invalid shares. So do you know about some javascript webminer for solve this problem?

For console mining is not possible also connect direct to pool by using xmraddress.iotaaddress because again pool will banned account for multuple low diff connection, but bigger problem is you dont have controle about data. Pool dont have api for fetch data about miners. This can be easy solve with proxy, I have list of all miners, only need to do save result to DB and some function for get this data. Also with proxy I can set min diff to 100, and to pool send it as 10000 diff for example. So no ban and miners can use low cpu.

janfiedler commented 6 years ago

With https://www.monero.crypto-webminer.com/monero.html I cannot find some api for control miner, also need proxy again to collent info about miners result with mining and set low diff. I think when proxy will be ready, webminer will be using only few random guys for get iota. So they can stay with coinhive and regular long term miners will be benetifing from proxy, because extreme low fees compare to coinhive. This is my priority be possible mine with cpu/gpu trought proxy connected to pool/pools.

janfiedler commented 6 years ago

nanopool have interesting api, maybe it can be used, and to local db only save last hashrate balance of miners and next time do minus from this number. I will test now how low diff can be on nano, if is possible mine on arm processor. Thanks for tip

term2112 commented 6 years ago

I was able to find proxy software that works https://github.com/Snipa22/xmr-node-proxy You need to install node.js and npm after you make the account and before you install the software haven't done much test on it yet

term2112 commented 6 years ago

image Something more like this

term2112 commented 6 years ago

Using a proxy feels like would make it a little more difficult to keep track of how much work the workers do

term2112 commented 6 years ago

If the proxy works, then I believe the web-miner I found could also possibly work in the same way it would keep track of the standard console miners as they are basically doing the same thing and sending the same type of information. this is there webcode

term2112 commented 6 years ago

xmrig may be a better proxy to use than the one I have. It might be able to track the miners better

janfiedler commented 6 years ago

I have already running https://github.com/MoneroOcean/xmr-node-proxy, I know about xmrig proxy for some reason dont working for me in past, maybe I can test it again. In both cases I must do some modification for keep track of all miners and collect their heshes.

I will check your tip on webminer, I thinks it can work with proxy, just only need again track miners hashes on proxy.

I hope it will be ready soon for testing :) I will let you know. Thank you very much for your assistance.

I

france193 commented 6 years ago

Hi @janfiedler! Are you working on the possibility to run this throught the console? I see you just added the new headless webminer on the 0.2.8 version, right?

janfiedler commented 6 years ago

Hi @france193 yets it is correct, I forked xmr proxy and adding ability use sqlite database and api for deposit/withdraw hashes like on coinhive. But with dirrect connect to pools, so fees are lower and cpu/gpu native miners can be used.

france193 commented 6 years ago

@janfiedler are you talking about this: https://github.com/janfiedler/xmr-node-proxy? So in other words this permits to change the pool?

There is a possibility to run from the command like the mineiota application? In this way I can manage it from remote and not only from web browser...

janfiedler commented 6 years ago

Yes xmr node proxy is app where you can collect hashes from miners and send it us one big diff pack to any pool, or multiple pools and get reward directly on monero pools, than when you reach withdraw limit exchange it for btc, than iota and send to all miners.

Web page will be still in future used for manage your rewards. There will be two solutions. 1) You want reward now, bigger fee will be included for handle price volation. 2) You wait until proxy reach profit target (1XMR) and than get automatit reward in iota for small fee around 5%. There is included fee for pool, exchanges, monero blockchain, ...

You can control from console your miners because you can use any win/linux cpu/gpu miner. On website you only see your actual and predicted reward and possibility manual withdraw.

france193 commented 6 years ago

Can you explain me how to run mineiota through command line? It is possible? Or only through a browser?

term2112 commented 6 years ago

Currently, It is run only run through the browser. A way to mine through command line (console miners) is being developed.

janfiedler commented 6 years ago

Thanks for help with answer, i missed this question. I am very close, I hope until end of this week I will publish beta of new mineiota with possibility use native miners. So you can run by xmrig, etc, ... from your console