m4rkw / minotaur

MIT License
7 stars 4 forks source link

Add support for excavator when mining on miningpoolhub #9

Open biesbjerg opened 6 years ago

biesbjerg commented 6 years ago

Nicehash blocked miningpoolhub in excavator.

MultiPoolMiner works around it by resolving domain and passing IP address to excavator instead.

I don't see anything in the EULA that seems to add the same change to Minotaur.

What do you think of adding a pass_endpoint_ip_to_miner (or similar) property to pools, that resolves domain and passes the IP address to the miner if set to true?

gordan-bobic commented 6 years ago

Pretty sure we tried that, and it didn't work. There is very little that excavator can do that ccminer cannot do similarly well, so just calibrate ccminer and you should be good to go.

biesbjerg commented 6 years ago

CPU load and 15% better performance for some algos are significant, But fair enough if you tried already. Just seems like it’s working for multipoolminer, which I linked to.

gordan-bobic commented 6 years ago

It might work via MPM proxies, but it definitely doesn't work directly via MPH. AFAICT excavator explicitly does nothing based on a hard coded list of hostnames and IPs.

biesbjerg commented 6 years ago

It does seem to work when using IP address (but doesn't when using domain, for example europe.equihash-hub.miningpoolhub.com) which means resolving domain and using IP would serve as a workaround.

You can test it yourself:

cat cmd.json

[
    {"time":1,"commands":[
    {"id":1,"method":"algorithm.add","params":["equihash","139.162.138.168:12023","biesbjerg.m002"]}
    ]}
]

excavator -c cmd.json -d0

=========================== www.nicehash.com =========================
           Excavator v1.4.4a_nvidia GPU Miner for NiceHash.
           Copyright (C) 2018 NiceHash. All rights reserved.
                              Developed by
        djeZo, dropky, voidstar, and agiz
                   with help and contributions from
           zawawa, pallas, Vorksholk, bitbandi, ocminer, and Genoil.
=========================== www.nicehash.com =========================

Build time: 2018-02-13 09:03:15+01:00
Build number: 450201690
[13:37:29][0x00007fe207572740][info] Log started
[13:37:29][0x00007fe207572740][info] core | Found CUDA device: GeForce GTX 1080 Ti
[13:37:29][0x00007fe207572740][info] core | Found CUDA device: GeForce GTX 1080 Ti
[13:37:29][0x00007fe207572740][info] core | Found CUDA device: GeForce GTX 1080 Ti
[13:37:29][0x00007fe207572740][info] core | Found CUDA device: GeForce GTX 1080 Ti
[13:37:29][0x00007fe207572740][info] core | Found CUDA device: GeForce GTX 1080 Ti
[13:37:29][0x00007fe207572740][info] core | Found CUDA device: GeForce GTX 1080 Ti
[13:37:29][0x00007fe207572740][info] api | Listening on 127.0.0.1:3456
[13:37:29][0x00007fe207572740][info] core | Initialized!
[13:37:30][0x00007fe202d1a700][info] net | Connecting to 139.162.138.168:12023 (139.162.138.168)
[13:37:31][0x00007fe202519700][info] net | Connected!
[13:37:31][0x00007fe202d1a700][info] net | Authorized as biesbjerg.m002
[13:37:31][0x00007fe202d1a700][info] algo-equihash | New job_0 '5249', diff=3855.06
[13:38:16][0x00007fe202d1a700][info] algo-equihash | New job_0 '524a', diff=3855.06
[13:38:24][0x00007fe202519700][info] algo-equihash | New job_0 '524b', diff=2698.54
gordan-bobic commented 6 years ago

You could also edit the excavator binary with a hex editor to replace the miningpoolhub matching string with something else of same length.

Be warned though that MPH's algorithm mining with coin auto-switching is never going to be as profitable as it appears to be at mining time. The reason for this is that you will end up mining whatever lolcoin is being pumped at the time, and you will never have a chance to auto-exchange it before it dumps due to the volume thresholds and exchange latencies involved.

biesbjerg commented 6 years ago

Sure, but modifying excavator is against the EULA, not upgrade-friendly and you need to setup local proxies/resolves + keep IPs up to date.

So much simpler to just lookup the IP at runtime and use it as the endpoint.

Wether MPH is profitable or not is a whole other discussion IMO. But having excavator do 72MH/s instead of ccminer's 60MH/s on Lyra2REV2 (which is the case for my 1080tis) is quite significant + CPU load of < 1 when using excavator vs. ccminer's 7+ (with stalled gpustatd values as a sideeffect) is a valid reason to want to use excavator instead, I think.

Ccminer doesn't support equihash either, which excavator does.

gordan-bobic commented 6 years ago

You don't need local proxies, by editing the binary you just neuter the conditional jump that makes it decide whether to work or not. As for EULA, I am arguably breaking it just by providing a repackaged unmodified binary.

I'll leave this open, but I suspect it will just rot in the backlog forever.