Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Update to Cryptonight v4 aka CryptonightR #102

Open
notgiven688 opened this issue Feb 28, 2019 · 34 comments
Open

Update to Cryptonight v4 aka CryptonightR #102

notgiven688 opened this issue Feb 28, 2019 · 34 comments

Comments

@notgiven688
Copy link
Owner

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 notgiven688 pinned this issue Feb 28, 2019
@focaeppe
Copy link

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

@notgiven688
Copy link
Owner Author

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).

@VidYen
Copy link

VidYen commented Feb 28, 2019

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!

@slayerulan
Copy link

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

@notgiven688
Copy link
Owner Author

@slayerulan Yes. Will be done after fork.

@notgiven688
Copy link
Owner Author

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

@VidYen
Copy link

VidYen commented Mar 1, 2019

@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
Copy link

VidYen commented Mar 2, 2019

@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.

@focaeppe
Copy link

focaeppe commented Mar 2, 2019

@VidYen +1

@notgiven688
Copy link
Owner Author

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

@VidYen
Copy link

VidYen commented Mar 3, 2019

@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
Copy link

VidYen commented Mar 4, 2019

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...

@notgiven688
Copy link
Owner Author

notgiven688 commented Mar 5, 2019

@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.

@VidYen
Copy link

VidYen commented Mar 5, 2019

@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.

@focaeppe
Copy link

focaeppe commented Mar 5, 2019

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

@VidYen
Copy link

VidYen commented Mar 5, 2019

@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
Copy link

VidYen commented Mar 6, 2019

@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.

@focaeppe
Copy link

focaeppe commented Mar 6, 2019

@VidYen Thank you it works

@slayerulan
Copy link

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

@notgiven688
Copy link
Owner Author

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

@focaeppe
Copy link

focaeppe commented Mar 9, 2019

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

@PiTi2k5
Copy link

PiTi2k5 commented Mar 9, 2019

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

@xmrmining
Copy link

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.

@VidYen
Copy link

VidYen commented Mar 10, 2019

@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.

@slax0r
Copy link

slax0r commented Mar 10, 2019

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:

<script src="webmr.js"></script>

To this:

<script src="webmr.js?X"></script>

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

Example:

<script src="webmr.js?5"></script>

Hope it helps.

@notgiven688
Copy link
Owner Author

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

@VidYen
Copy link

VidYen commented Mar 11, 2019

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.

@PiTi2k5
Copy link

PiTi2k5 commented Mar 14, 2019

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

@ghost
Copy link

ghost commented Mar 15, 2019

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/

@slayerulan
Copy link

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

@patrickbau
Copy link

@slayerulan for me 20%

@VidYen
Copy link

VidYen commented Mar 15, 2019

@tonisnark True, but so does the Webminer server and web site itself. In fact its easier to track you by your wallet on the payout pool back to your site and match the ip and trace it back to your webhost and/or ISP and domain to see how much you got in payouts after they identify you that way.

In fact, if I was the IRS, I'd subpoena your registrar and where the site was hosted to identify the owner of the XMR wallet that was paid out which is publicly visible on many pools rather than hunt you down on Discord.

Asking how to fix a line of code won't expose you unless you include your public URL or something, but the IRS already has access to that info already.

It's like putting your real name in a pool worker. Don't do that.

Also... Github is owned by Microsoft coughs They see where the downloads go.

Anyways...

@slayerulan I wouldn't know, but my XMR payouts have doubled with the algo switching on MO. (From $0.01 to $0.02 a day if you must know IRS) XMR may not be that easy to webmine as it used to be on some devices.

@focaeppe
Copy link

@slayerulan now it's much better then before with the algo switching

@slayerulan
Copy link

slayerulan commented May 6, 2019

Can anybody share current average hashrate/hashrate before new algo and daily profit at algo switching? @focaeppe

@notgiven688 notgiven688 unpinned this issue Sep 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants