webminerpool icon indicating copy to clipboard operation
webminerpool copied to clipboard

Update to Cryptonight v4 aka CryptonightR

Open notgiven688 opened this issue 7 years ago • 34 comments

As always we misuse the bug-tracker as a forum: A new and improved version of webminerpool is out. Bugs and comments can be placed here.

notgiven688 avatar Feb 28 '19 15:02 notgiven688

Thank you so much for the new update, I wonder about the drop ratio with this new fork is 2% or more ?

focaeppe avatar Feb 28 '19 15:02 focaeppe

If drop ratio is defined by hashrate_new/hashrate_old then it is more like 50%. Probably the reason why coinhive gave up. You can test it by mining to http://killallasics.moneroworld.com/ . But if you mine at a pool with algo-switching you can get effective hashrates which are much higher than before (especially with cn-pico/trtl).

notgiven688 avatar Feb 28 '19 16:02 notgiven688

Thank you for the update @notgiven688

I will be testing later tonight.

And I may have stumbled upon something as my user base are return users and not blind mined... If you rename the /js/ folder to say /js2019/ and on the day of, change the html to point there, I think it will reload the files as new and not keep them cached. I also rename my js files so it could be that but I haven't confirmed.

Lastly, as far as using your issues for a forum, is there any Discord or other place fellow webminerpool admins can discuss issues? I seem to just ask MoneroOcean on his Discord since he is generally in the know, but I'm basically the only other webminer user on his Discord server.

Thanks again!

VidYen avatar Feb 28 '19 16:02 VidYen

Is there any chance to add BitTube algorithm which is most profitable cn algo for awhile

slayerulan avatar Feb 28 '19 17:02 slayerulan

@slayerulan Yes. Will be done after fork.

notgiven688 avatar Feb 28 '19 17:02 notgiven688

@VidYen I can open a discord server. But MoneroOcean's discoord is also a good meeting point ;)

notgiven688 avatar Feb 28 '19 20:02 notgiven688

@notgiven688 Well I suppose if you could talk MO into making us a channel for webmining, otherwise we would be mixed in the normie miners in their general.

But a dedicated Discord would also work.

I think it would cut down on a lot of issue rambling (including my own).

(Edit)

On thinking about it... Perhaps a dedicated server would be better since people that come in may have no interest in using MO's pool and I'm not sure how he'd feel about that. I mean I use it primarily, but I have run into end users who want to use other pools.

VidYen avatar Mar 01 '19 13:03 VidYen

@notgiven688 This might be a frivolous request, but is there currently a way to tell on the client side which algo they are mining? If not could it be added?

I fear that on algo switching servers, I will have end users complain that they don't know why the hash rate varies all the time when I already told them, it depends on what algo its mining at the time.

VidYen avatar Mar 02 '19 17:03 VidYen

@VidYen +1

focaeppe avatar Mar 02 '19 17:03 focaeppe

yes. This is trivial. The json object in the receivestack contains the current algo.

notgiven688 avatar Mar 03 '19 10:03 notgiven688

@notgiven688

Me being obtuse sometimes...

You are talking about this?

      if (obj.identifier === "job")
        elem.value += "new job: " + obj.job_id;
      else if (obj.identifier === "solved")
        elem.value += "solved job: " + obj.job_id;
      else if (obj.identifier === "hashsolved")
        elem.value += "pool accepted hash!";
      else if (obj.identifier === "error")
        elem.value += "error: " + obj.param;
      else elem.value += obj;

What obj.identifier should I be looking for?

(edit)

It would help if I'd just look at worker.js:

job.algo is the variable in question where:

console.log("current algo:" + job.algo);

Will get you what you need in output...

And putting it here seems to get the info at least while developing:

        if (obj.identifier === "job")
              {
                console.log("new job: " + obj.job_id);
                console.log("current algo:" + job.algo);
                document.getElementById('status-text').innerText = 'New job using ' + job.algo + ' algo';
              }

VidYen avatar Mar 03 '19 16:03 VidYen

Also... But I think this might have been in prior versions but appears to be affected by algo switching pools as well as old XMR...

iOS and Android Chrome WASM seems to over report the local hashes mined.

It isn't that serious as I have the rewards based off what the pool says, but it just seems odd that an iPhone 7 is pulling 6000 H/s.

It's possible I am pulling the H/s wrong locally. I just recently realized that you use the variable totalHashes as a global so pulled the that into a current and prior every 1000 ms with a js loop and find the difference. It works well enough, but does the receive stack actually have it built in?

Maybe I should simply see if hashRate and algo exists as variables like the totalHashes did but I never noticed...

VidYen avatar Mar 04 '19 10:03 VidYen

@VidYen Sorry for delayed answers I am currently on holiday. I remember a case with Iphone where the hashcalculation just silently failed - but the outer loop was running as fast as possible. Something I will fix soon.

The algorithm question: Yep. What you are doing is correct.

Edit: local hashrate calculation is also done like you describe it.

notgiven688 avatar Mar 05 '19 09:03 notgiven688

@notgiven688 Thanks and no problem! Sometimes the best learning tool is having to figure it out yourself.

Cool. Looking forward to the mobile fix.

In the meantime, I kind of poorly hacked in a work around with checking to see if on mobile and dividing totalHashes by 100.

VidYen avatar Mar 05 '19 16:03 VidYen

@VidYen Can you please explain where we need to add the current algo ?

focaeppe avatar Mar 05 '19 16:03 focaeppe

@focaeppe

Its a variable in the javascript so you can just grab it from the job.algo object and put it in anything...

In the VidYen Client I set it up on:

              //Adding back in console logs.
              if (obj.identifier === \"job\")
              {
                console.log(\"new job: \" + obj.job_id);
                console.log(\"current algo: \" + job.algo);
                document.getElementById('status-text').innerText = 'New job using ' + job.algo + ' algo.';
                setTimeout(function(){ document.getElementById('status-text').innerText = 'Working.'; }, 3000);
              }

Don't mind the \" as I'm pulling it thorugh php as its WordPress. If you are writing raw html or js it only needs to be ". (Yeah I could do '' instead of "", but maybe down the road).

What it is doing is every time the sendstack reports a "new job" it updates the console (for me) and then updates the 'status-text' span in the client.

<div id=\"timeBar\" style=\"width:1%; height: 30px; background-color: $timeBar_color;\"><div style=\"position: absolute; right:12%; color:$workerBar_text_color;\"><span id=\"status-text\">Spooling up.</span><span id=\"wait\">.</span><span id=\"hash_rate\"></span></div></div>

I could have it update every second with a js timer, but I figure when a new job happens it should be fine.

The code here will revert back to working in 3 seconds as it is just an OCD thing of mine.

VidYen avatar Mar 05 '19 18:03 VidYen

@notgiven688

About the Discord question...

If it would be easier on you, I could host a server specifically for discussions and code help between users.

I'd call it webminerpool consortium or something similar.

VidYen avatar Mar 06 '19 17:03 VidYen

@VidYen Thank you it works

focaeppe avatar Mar 06 '19 18:03 focaeppe

Any update regarding cn-heavy/tube? Which will be most used algo on moneroocean's algo switch after the fork

slayerulan avatar Mar 09 '19 12:03 slayerulan

cn-heavy is really slow on webassembly. I will add it soon.

notgiven688 avatar Mar 09 '19 14:03 notgiven688

Yes cn-heavy is not for webmining and also the new fork for monero "cnv4", the most profitable and fast for webassembly in this moment is cn-pico/trtl if you are using moneroocean

focaeppe avatar Mar 09 '19 16:03 focaeppe

Tube is not pure cn-heavy, only some mixed steps. It should be faster than pure cn-heavy, but i havent tested yet. On my personal tests pure cn-heavy like haven coin was run only with 25-30 h/s on i7-8700K with 11 threads....useless, so i dropped that support :D

PiTi2k5 avatar Mar 09 '19 18:03 PiTi2k5

I updated my server and client, but dont work ! all things is Ok in server : [3/10/2019 11:35:39 AM] heartbeat; connections client/pool: 68/3; jobqueue: 13.0k; speed: 0.0kH/s a1288b2e-3360-4bce-a4b9-93ac2afed3f6: closed Connecting: 5.116.*.* 51ccb253-1673-4d86-bd4c-fac52c39f8a7: connected with ip 5.116.*.* but don't mining! (speed: 0.0kH/) before update all things was good.

xmrmining avatar Mar 10 '19 11:03 xmrmining

@xmrmining This might seem dumb, but make sure you clear you and your users clear you internet cache as it will be using the old js files until then.

VidYen avatar Mar 10 '19 17:03 VidYen

This is a fairly common issue, not just with webminerpool javascript. There is also a much simpler solution than asking possibly hundreds of users to flush their browser cache.

Simply add versioning to your .js files like this:

Change this:

To this:

where X is the number you decide on. It is arbitrary but needs to be incremented when you change it.

Example:

Hope it helps.

slax0r avatar Mar 10 '19 17:03 slax0r

@xmrmining Do you get "outdated client" warnings at the server?

notgiven688 avatar Mar 10 '19 20:03 notgiven688

Hopefully it is ok to post this here, but as I seem to field question as well I have made a discord server called WebMinerPool Consortium

https://discord.gg/HhAXaNX

Currently, it's just me, but I could answer a lot of questions including how to avoid AV and Malwarebytes blocking.

VidYen avatar Mar 11 '19 14:03 VidYen

Hi Folks, if you want testing CN-Heavy you can try it on https://www.heavy-test.crypto-webminer.com Remember not all variants included. @notgiven688 If you want the source, i can send it to you. For now, it is an separate version, because merging to cn webassembly is a lot of work :/ But newest backend (server.exe) is compatible and frondend need some method rewrites than it will run

PiTi2k5 avatar Mar 14 '19 22:03 PiTi2k5

I have made a discord server

I'd strongly recommend against using Discord for comms related to privacy coins. Primarily because they do some heavy IP tracking which can be confirmed whenever you attempt to log in via proxy. But the greater concern is the Google reCAPTCHA they require you to pass to get in.

@notgiven688 if you do decide to create a chat I think it could be good for collaboration and to help improve privacy. My suggestion would be to create a private chatroom on Telegram and rotate the URL occasionally after adding it to the README as a plain hyperlink.

Edit: Alternatively... https://www.reddit.com/r/WebMining/

ghost avatar Mar 15 '19 08:03 ghost

Guys, how much % revenue drop you are facing when mining Monero?

slayerulan avatar Mar 15 '19 16:03 slayerulan